Latest online documentation available at: https://kaspa.aspectron.org/docs/
- Replace
MassCalculator
withcalculateTransactionMass
andcalculateTransactionFee
functions. - Change
createTransaction
function signature (remove requirement for change address). - Make
ITransactionInput.signatureScript
optional (if not supplied, the signatureScript is assigned an empty vector).
- Fix issues with deserializing manually-created objects matching
IUtxoEntry
interface. - Allow arguments expecting ScriptPublicKey to receive
{ version, script }
object or a hex string. - Fix
Transaction::serializeToObject()
return type (now returningISerializeTransaction
interface). - Adding
setUserTransactionMaturityDAA()
andsetCoinbaseTransactionMaturityDAA()
that allow customizing the maturity DAA periods for user and coinbase transactions.
- Fix
PublicKeyGenerator::change_address_as_string()
that was returning the receive address. - WASM SDK now builds as a GitHub artifact during the CI process.
State
renamed toPoW
- Docs now have a PoW section that unifies all PoW-related classes and functions.
TransactionRecord.data
(TransactionData
) now has correct TypeScript bindings.
- Adding utility functions:
payToAddressScript()
,payToScriptHashScript()
,payToScriptHashSignatureScript()
,addressFromScriptPublicKey()
,isScriptPayToPubkey()
,isScriptPayToPubkeyECDSA()
,isScriptPayToScriptHash()
. - Adding
UtxoProcessor::isActive
property to check if the processor is in active state (connected and running). This property can be used to validate the processor state before invoking it's functions (that can throw is the UtxoProcessor is offline). - Rename
UtxoContext::active
toUtxoContext::isActive
for consistency.
- IAccountsCreateRequest interface simplified by flattering it and now it is union for future expansion for multisig etc.
- IWalletEvent interface updated for Events with TransactionRecord
- WIP: wallet api example under wallet/wallet.js
- Bug fixes: wallet.ensure_default_account, ECDSA address creation methods
- Rename RPC "open" and "close" events to "connect" and "disconnect", TypeScript
RpcEventType.Open
andRpcEventType.Close
enums toRpcEventType.Connect
andRpcEventType.Disconnect
(the renaming is done to prevent confusion in other layers of the WASM SDK where "open" and "close" event names represent the Wallet open state). RpcClient.open
boolean state getter renamed toRpcClient.connected
- Fix examples missed during
publicKey()->toPublicKey()
rename.
- Transaction::addresses() returns a list of unique addresses used by transaction inputs
- PendingTransaction::addresses change from getter to a function
- Address::validate(string) static helper to test address validity
- Merge with Rusty Kaspa master (0.13.6)
- Change
signTransaction()
to acceptTransaction
instead ofSignableTransaction
- Remove
SignableTransaction
from the SDK (asTransaction
now provides all signing functionality) - Fix a bug in
TransactionRecord
that was returning incorrect getter forrecord.data
- Added
Transaction::addresses()
that returns address list for all UTXOs associated with transaction inputs. - Fix declarations of events (RpcClient,UtxoProcessor) that do not carry any event data (event data is now declared as
undefined
)
- Rename
kaspa-beacon
app tokaspa-resolver
- Change RpcClient, UtxoProcessor and Wallet event handlers in typescript to receive typed event data
- UtxoProcessor and Wallet event handlers now deliver TransactionRecord events (Discovery, Pending, etc.)
as Rust or WASM objects, allowing user to call
hasAddress(<address>)
on the receivedevent.data.record
object.
- Fix type checks when passing arrays to transaction
Generator
entries.
- Introduce IWASM32BindingsConfig for configuration of class naming when using WASM32 bindings.
- Introduce serializeToJSON for
PendingTransaction
class (deserializable withTransaction
class). - Introduce serializeToJSON and deserializeFromJSON methods for
Transaction
class.
- Fix
requestAnimationFrame
use in chrome extension environment. - Add rejection in
Generator
whenpriorityFee
isundefined
while outputs are present. - Introduce
CryptoBox
class for encryption/decryption of data using public/private keys. - sha256x and other hash functions now have two variants sha256FromBinary and sha256FromText
- Changed
XPub.publicKey()
toXPub.toPublicKey()
- Most functions returning key strings now return
PrivateKey
orPublicKey
; this allows function chainingxpub.deriveChild(0).toPublicKey().toAddress(networkId).toString()
PrivateKey
now hastoPublicKey()
,toAddress()
,toAddressECDSA()
methods- Introduce
XOnlyPublicKey
which can be obtained fromPublicKey
:xpub.toXOnlyPublicKey()
andxpub.toXOnlyPublicKey().toAddress(networkId)
.
- Add
UtxoProcessor.start()/stop()
methods for explicit start/stop of theUtxoProcessor
event processing. - Remove
async
markers from UtxoProcessor and UtxoContext constructors. - Add
UtxoProcessor.setNetworkId()
method to change the network ID for existingUtxoProcessor
(UtxoProcessor
must be stopped before changing the network id). - Add
UtxoProcessor.networkId
property to get the current network ID. - Add
UtxoContext.matureLength()
andmatureRange(from,to)
for access to mature UTXO entries.
- Event Listener API has been refactored to mimic DOM standard (similar to
addEventListener
/removeEventListener
available in the browser, but with additional features) - replace
RpcClient.notify()
withRpcClient.addEventListener()
/RpcClient.removeEventListener()
addEventListener()
calls have been standardized between RPC, UtxoProcessor, Wallet- You can now register multiple listeners for the same event type and unregister them individually
- A single registration can accept an array of events to listen to e.g.
["open", "close"]
- RpcClient events now support
open
,close
events to signal the RPC connection state - RPC events now contain
type
anddata
fields (instead of listeners receiving 2 arguments) - Rename client-side
Beacon
class toResolver
- ITransactionRecord properties now have appropriate interfaces
- ITransactionData serialization fields have changed from (
transaction = {}
todata = {}
)
- Fix large RPC response deserialization errors in NodeJS caused by the default WebSocket frame size limit.
- Fix event processing in UtxoContext
- Renamed
XPrivateKey
toPrivateKeyGenerator
andXPublicKey
toPublicKeyGenerator
- Simplify conversion between different key types (
XPrv->Keypair
,XPrv->XPub->Pubkey
, etc) - Introduced
Beacon
class that provides connectivity to the community-operated public node infrastructure (backed bykaspa-beacon
load balancer & node status monitor) - Created TypeScript type definitions across the entire SDK and refactored
RpcClient
class (as well as many other components) to use TypeScript interfaces - Changed documentation structure to use
typedoc
available as a part of redistributables or online at https://kaspa.aspectron.org/docs/ - Project-wide documentation updates
- Additional self-contained Web Browser examples
- Modified the structure of WASM32 SDK release to include all variants of libraries (both release and dev builds), examples and documentation in a single package.