Dash Platform Evo JS SDK Documentation

Return types generated from @dashevo/evo-sdk@4.1.0 published declarations. Return type declarations.

Overview

The Dash Platform Evo JS SDK exposes a modern JavaScript interface for interacting with platform data and submitting state transitions. This documentation mirrors the legacy layout so you can quickly find queries and transitions while using the Evo SDK.

Key Concepts

Tip: Examples below execute against Dash Platform Testnet via the Evo SDK client. Click "Run" to invoke any example.

Test Identity: Examples use the testnet identity 5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk
This identity has activity on testnet and is safe to use for read-only demonstrations.

Queries

Identity Queries

sdk.identities.fetch

Get Identity

Fetch an identity by its identifier.

fetch(identityId: wasm.IdentifierLike): Promise<wasm.Identity | undefined>
Parameters
identityId wasm.IdentifierLike Required
Returns
Promise<wasm.Identity | undefined>
Example
// Evo SDK example return await sdk.identities.fetch('5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk')
sdk.identities.fetchUnproved

Get Identity (Unproved)

Fetch an identity without requesting cryptographic proofs.

fetchUnproved(identityId: wasm.IdentifierLike): Promise<wasm.Identity>
Parameters
identityId wasm.IdentifierLike Required
Returns
Promise<wasm.Identity>
Example
// Evo SDK example return await sdk.identities.fetchUnproved('5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk')
sdk.identities.getKeys

Get Identity Keys

Retrieve public keys for an identity, including support for specific key IDs or purpose searches.

getKeys(query: wasm.IdentityKeysQuery): Promise<wasm.IdentityPublicKey[]>
Parameters
query wasm.IdentityKeysQuery Required
identityId IdentifierLike Required

Identity identifier.

request IdentityKeysRequest Required

Requested key selection strategy.

limit number Optional

Maximum number of keys to return after applying request filters.

offset number Optional

Number of keys to skip from the beginning of the result set.

Returns
Promise<wasm.IdentityPublicKey[]>
Example
// Evo SDK example return await sdk.identities.getKeys({ identityId: '5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk', request: { type: 'all' }, limit: 10, offset: 0 })
sdk.identities.contractKeys

Get Contract Keys for Identities

Fetch contract-specific keys for one or more identities.

Disabled: Requires fix for upstream issue: https://github.com/dashpay/platform/issues/3028

contractKeys(query: wasm.IdentitiesContractKeysQuery): Promise<wasm.IdentityContractKeys[]>
Parameters
identityIds Array<IdentifierLike> Required

Identity identifiers to fetch keys for.

contractId IdentifierLike Required

Data contract identifier (reserved for future filtering).

purposes number[] Optional

Optional list of purposes to include.

Returns
Promise<wasm.IdentityContractKeys[]>
Example
// Evo SDK example return await sdk.identities.contractKeys({ identityIds: ['5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk'], contractId: 'GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec' })
sdk.identities.nonce

Get Identity Nonce

Retrieve the global nonce associated with an identity.

nonce(identityId: wasm.IdentifierLike): Promise<bigint | undefined>
Parameters
identityId wasm.IdentifierLike Required
Returns
Promise<bigint | undefined>
Example
// Evo SDK example return await sdk.identities.nonce('5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk')
sdk.identities.contractNonce

Get Identity Contract Nonce

Retrieve the per-contract nonce for an identity.

contractNonce(identityId: wasm.IdentifierLike, contractId: wasm.IdentifierLike): Promise<bigint | undefined>
Parameters
identityId wasm.IdentifierLike Required
contractId wasm.IdentifierLike Required
Returns
Promise<bigint | undefined>
Example
// Evo SDK example return await sdk.identities.contractNonce('5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk', 'GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec')
sdk.identities.balance

Get Identity Balance

Fetch the credit balance for an identity.

balance(identityId: wasm.IdentifierLike): Promise<bigint | undefined>
Parameters
identityId wasm.IdentifierLike Required
Returns
Promise<bigint | undefined>
Example
// Evo SDK example return await sdk.identities.balance('5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk')
sdk.identities.balances

Get Multiple Identity Balances

Fetch balances for multiple identities in a single request.

balances(identityIds: wasm.IdentifierLikeArray): Promise<Map<string, bigint | undefined>>
Parameters
identityIds wasm.IdentifierLikeArray Required
Returns
Promise<Map<string, bigint | undefined>>
Example
// Evo SDK example return await sdk.identities.balances(['5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk'])
sdk.identities.balanceAndRevision

Get Identity Balance & Revision

Retrieve both the balance and revision number for an identity.

balanceAndRevision(identityId: wasm.IdentifierLike): Promise<wasm.IdentityBalanceAndRevision | undefined>
Parameters
identityId wasm.IdentifierLike Required
Returns
Promise<wasm.IdentityBalanceAndRevision | undefined>
Example
// Evo SDK example return await sdk.identities.balanceAndRevision('5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk')
sdk.identities.byPublicKeyHash

Get Identity by Unique Public Key Hash

Lookup an identity via its unique public key hash.

byPublicKeyHash(publicKeyHash: wasm.PublicKeyHashLike): Promise<wasm.Identity | undefined>
Parameters
publicKeyHash wasm.PublicKeyHashLike Required
Returns
Promise<wasm.Identity | undefined>
Example
// Evo SDK example return await sdk.identities.byPublicKeyHash('b7e904ce25ed97594e72f7af0e66f298031c1754')
sdk.identities.byNonUniquePublicKeyHash

Get Identity by Non-Unique Public Key Hash

Lookup identities that match a non-unique public key hash.

byNonUniquePublicKeyHash(publicKeyHash: wasm.PublicKeyHashLike, startAfter?: wasm.IdentifierLike): Promise<wasm.Identity[]>
Parameters
publicKeyHash wasm.PublicKeyHashLike Required
startAfter wasm.IdentifierLike Optional
Returns
Promise<wasm.Identity[]>
Example
// Evo SDK example return await sdk.identities.byNonUniquePublicKeyHash('518038dc858461bcee90478fd994bba8057b7531')
sdk.identities.tokenBalances

Get Identity Token Balances

Retrieve balances for a set of token IDs held by an identity.

tokenBalances(identityId: wasm.IdentifierLike, tokenIds: wasm.IdentifierLikeArray): Promise<Map<string, bigint>>
Parameters
identityId wasm.IdentifierLike Required
tokenIds wasm.IdentifierLikeArray Required
Returns
Promise<Map<string, bigint>>
Example
// Evo SDK example return await sdk.identities.tokenBalances('5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk', ['Hqyu8WcRwXCTwbNxdga4CN5gsVEGc67wng4TFzceyLUv'])
sdk.tokens.balances

Get Token Balances for Identities

Fetch balances for multiple identities for a single token.

balances(identityIds: wasm.IdentifierLikeArray, tokenId: wasm.IdentifierLike): Promise<Map<string, bigint>>
Parameters
identityIds wasm.IdentifierLikeArray Required
tokenId wasm.IdentifierLike Required
Returns
Promise<Map<string, bigint>>
Example
// Evo SDK example return await sdk.tokens.balances(['5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk'], 'Hqyu8WcRwXCTwbNxdga4CN5gsVEGc67wng4TFzceyLUv')
sdk.tokens.identityTokenInfos

Get Identity Token Info

Retrieve token metadata and balances for an identity.

identityTokenInfos(identityId: wasm.IdentifierLike, tokenIds: wasm.IdentifierLikeArray): Promise<Map<string, wasm.IdentityTokenInfo>>
Parameters
identityId wasm.IdentifierLike Required
tokenIds wasm.IdentifierLikeArray Required
Returns
Promise<Map<string, wasm.IdentityTokenInfo>>
Example
// Evo SDK example return await sdk.tokens.identityTokenInfos('5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk', ['Hqyu8WcRwXCTwbNxdga4CN5gsVEGc67wng4TFzceyLUv'], { limit: 10, offset: 0 })
sdk.tokens.identitiesTokenInfos

Get Token Info for Identities

Retrieve token metadata for multiple identities for a single token.

identitiesTokenInfos(identityIds: wasm.IdentifierLikeArray, tokenId: wasm.IdentifierLike): Promise<Map<string, wasm.IdentityTokenInfo>>
Parameters
identityIds wasm.IdentifierLikeArray Required
tokenId wasm.IdentifierLike Required
Returns
Promise<Map<string, wasm.IdentityTokenInfo>>
Example
// Evo SDK example return await sdk.tokens.identitiesTokenInfos(['5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk'], 'Hqyu8WcRwXCTwbNxdga4CN5gsVEGc67wng4TFzceyLUv')

Data Contract Queries

sdk.contracts.fetch

Get Data Contract

Fetch a data contract by its identifier.

fetch(contractId: wasm.IdentifierLike): Promise<wasm.DataContract | undefined>
Parameters
contractId wasm.IdentifierLike Required
Returns
Promise<wasm.DataContract | undefined>
Example
// Evo SDK example return await sdk.contracts.fetch('GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec')
sdk.contracts.getHistory

Get Data Contract History

Retrieve the version history for a data contract.

getHistory(query: wasm.DataContractHistoryQuery): Promise<Map<bigint, wasm.DataContract>>
Parameters
dataContractId IdentifierLike Required

Data contract identifier.

limit number Optional

Maximum number of entries to return.

startAtMs number Optional

Millisecond timestamp (inclusive) to start from.

Returns
Promise<Map<bigint, wasm.DataContract>>
Example
// Evo SDK example return await sdk.contracts.getHistory({ dataContractId: 'HLY575cNazmc5824FxqaEMEBuzFeE4a98GDRNKbyJqCM', limit: 10, startAtMs: 0 })
sdk.contracts.getMany

Get Data Contracts

Fetch multiple data contracts by their identifiers.

getMany(contractIds: wasm.IdentifierLikeArray): Promise<Map<string, wasm.DataContract | undefined>>
Parameters
contractIds wasm.IdentifierLikeArray Required
Returns
Promise<Map<string, wasm.DataContract | undefined>>
Example
// Evo SDK example return await sdk.contracts.getMany([ 'GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec', 'ALybvzfcCwMs7sinDwmtumw17NneuW7RgFtFHgjKmF3A' ])

Document Queries

sdk.documents.query

Get Documents

Query documents from a data contract using optional filters.

query(query: wasm.DocumentsQuery): Promise<Map<string, wasm.Document | undefined>>
Parameters
query wasm.DocumentsQuery Required
dataContractId IdentifierLike Required

Data contract identifier.

documentTypeName string Required

Document type name.

where DocumentWhereClause[] Optional

Optional filter clauses expressed as [field, operator, value].

orderBy DocumentOrderByClause[] Optional

Optional sorting clauses expressed as [field, direction].

limit number Optional

Maximum number of documents to return.

startAfter IdentifierLike Optional

Exclusive document ID to resume from.

startAt IdentifierLike Optional

Inclusive document ID to start from.

groupBy string[] Optional

Count-query knob: SQL-shaped `GROUP BY` field list. Mirrors the v1 wire's `group_by: repeated string` directly. Ignored by the regular document-fetch path. - `[]` or omitted → aggregate count (a single row). - `["<in_field>"]` where `<in_field>` matches an `In` constraint → per-`In`-value entries (PerInValue). - `["<range_field>"]` where `<range_field>` matches a range constraint → per-distinct-value entries within the range (RangeDistinct). - `["<in_field>", "<range_field>"]` for compound `In + range` queries → compound distinct entries. Entry direction comes from the first `orderBy` clause's direction (which also drives walk order on the materialize + prove path); set `orderBy: [["<range_field>", "asc"|"desc"]]` alongside `groupBy: ["<range_field>"]` to control sort.

Returns
Promise<Map<string, wasm.Document | undefined>>
Example
// Evo SDK example return await sdk.documents.query({ dataContractId: 'GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec', documentTypeName: 'domain', where: [["normalizedParentDomainName", "==", "dash"]], orderBy: [["normalizedLabel", "asc"]], limit: 10 })
sdk.documents.get

Get Document

Fetch a specific document by ID.

get(contractId: wasm.IdentifierLike, type: string, documentId: wasm.IdentifierLike): Promise<wasm.Document | undefined>
Parameters
contractId wasm.IdentifierLike Required
type string Required
documentId wasm.IdentifierLike Required
Returns
Promise<wasm.Document | undefined>
Example
// Evo SDK example return await sdk.documents.get( 'GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec', 'domain', '7NYmEKQsYtniQRUmxwdPGeVcirMoPh5ZPyAKz8BWFy3r' )

DPNS Queries

sdk.dpns.username

Get Primary Username

Fetch the primary DPNS username for an identity.

username(identityId: wasm.IdentifierLike): Promise<string | undefined>
Parameters
identityId wasm.IdentifierLike Required
Returns
Promise<string | undefined>
Example
// Evo SDK example return await sdk.dpns.username('5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk')
sdk.dpns.usernames

List Usernames for Identity

Fetch all DPNS usernames owned by an identity.

usernames(query: wasm.DpnsUsernamesQuery): Promise<string[]>
Parameters
query wasm.DpnsUsernamesQuery Required
identityId IdentifierLike Required

Identity to fetch usernames for.

limit number Optional

Maximum number of usernames to return. Use 0 for default.

Returns
Promise<string[]>
Example
// Evo SDK example return await sdk.dpns.usernames({ identityId: '5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk', limit: 10 })
sdk.dpns.getUsernameByName

Get Username by Name

Fetch DPNS username details by full name.

getUsernameByName(username: string): Promise<wasm.DpnsUsernameInfo | undefined>
Parameters
username string Required
Returns
Promise<wasm.DpnsUsernameInfo | undefined>
Example
// Evo SDK example return await sdk.dpns.getUsernameByName('alice.dash')
sdk.dpns.resolveName

Resolve DPNS Name

Resolve a DPNS name to its identity information.

resolveName(name: string): Promise<string | undefined>
Parameters
name string Required
Returns
Promise<string | undefined>
Example
// Evo SDK example return await sdk.dpns.resolveName('alice.dash')
sdk.dpns.isNameAvailable

Check DPNS Availability

Check if a DPNS label is available for registration.

isNameAvailable(label: string): Promise<boolean>
Parameters
label string Required
Returns
Promise<boolean>
Example
// Evo SDK example return await sdk.dpns.isNameAvailable('alice')
sdk.dpns.convertToHomographSafe

Convert to Homograph Safe

Convert a label to its homograph-safe representation.

convertToHomographSafe(input: string): Promise<string>
Parameters
input string Required
Returns
Promise<string>
Example
// Evo SDK example return await sdk.dpns.convertToHomographSafe('ąlice')
sdk.dpns.isValidUsername

Validate Username

Validate whether a label conforms to DPNS username rules.

isValidUsername(label: string): Promise<boolean>
Parameters
label string Required
Returns
Promise<boolean>
Example
// Evo SDK example return sdk.dpns.isValidUsername('alice')
sdk.dpns.isContestedUsername

Is Contested Username

Check if a label is currently part of a contested DPNS registration.

isContestedUsername(label: string): Promise<boolean>
Parameters
label string Required
Returns
Promise<boolean>
Example
// Evo SDK example return sdk.dpns.isContestedUsername('alice')

Voting & Contested Resources

sdk.group.contestedResources

Get Contested Resources

List contested resources for a document type and index.

contestedResources(query: wasm.VotePollsByDocumentTypeQuery): Promise<any[]>
Parameters
dataContractId IdentifierLike Required

Data contract identifier.

documentTypeName string Required

Document type to query.

indexName string Required

Index name to query.

startIndexValues unknown[] Optional

Optional lower bound for index range, commonly an array of composite values.

endIndexValues unknown[] Optional

Optional upper bound for index range, commonly an array of composite values.

startAtValue unknown Optional

Cursor value to resume iteration from. Provide a JS value matching the index schema (e.g., string, number, array).

startAtValueIncluded boolean Optional

Whether to include `startAtValue` in the result set.

limit number Optional

Maximum number of records to return.

orderAscending boolean Optional

Sort order. When omitted, the query defaults to ascending order.

Returns
Promise<any[]>
Example
// Evo SDK example return await sdk.group.contestedResources({ dataContractId: 'GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec', documentTypeName: 'domain', indexName: 'parentNameAndLabel', startAtValue: null, limit: 10, orderAscending: true })
sdk.voting.contestedResourceVoteState

Get Contested Resource Vote State

Retrieve vote tallies for a contested resource.

contestedResourceVoteState(query: wasm.ContestedResourceVoteStateQuery): Promise<wasm.ContestedResourceVoteState>
Parameters
dataContractId IdentifierLike Required

Data contract identifier.

documentTypeName string Required

Contested document type name.

indexName string Required

Index name to query.

indexValues unknown[] Optional

Optional index values used as query parameters.

resultType 'documents' | 'voteTally' | 'documentsAndVoteTally' Optional

Result projection type.

limit number Optional

Maximum number of records to return.

startAtContenderId IdentifierLike Optional

Contender identifier to resume from (exclusive by default).

startAtIncluded boolean Optional

Include the start contender when true.

includeLockedAndAbstaining boolean Optional

Include locked and abstaining tallies when true.

Example
// Evo SDK example return await sdk.voting.contestedResourceVoteState({ dataContractId: 'GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec', documentTypeName: 'domain', indexName: 'parentNameAndLabel', indexValues: ['dash', 'alice'], resultType: 'documents', limit: 10, orderAscending: true })
sdk.group.contestedResourceVotersForIdentity

Get Voters for Identity

List voters that voted for a specific identity in a contested resource.

contestedResourceVotersForIdentity(query: wasm.ContestedResourceVotersForIdentityQuery): Promise<wasm.Identifier[]>
Parameters
dataContractId IdentifierLike Required

Data contract identifier.

documentTypeName string Required

Contested document type name.

indexName string Required

Index name used to locate the contested resource.

indexValues unknown[] Optional

Optional index values used as query arguments.

contestantId IdentifierLike Required

Contested identity identifier.

limit number Optional

Maximum number of voters to return.

startAtVoterId IdentifierLike Optional

Voter identifier to resume from (exclusive by default).

startAtIncluded boolean Optional

Include the `startAtVoterId` when true.

orderAscending boolean Optional

Sort order. When omitted, defaults to ascending.

Returns
Promise<wasm.Identifier[]>
Example
// Evo SDK example return await sdk.group.contestedResourceVotersForIdentity({ dataContractId: 'GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec', documentTypeName: 'domain', indexName: 'parentNameAndLabel', indexValues: ['dash', 'alice'], contestantId: '5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk', limit: 10, orderAscending: true })
sdk.voting.contestedResourceIdentityVotes

Get Identity Votes

Fetch contested resource votes submitted by a particular identity.

contestedResourceIdentityVotes(query: wasm.ContestedResourceIdentityVotesQuery): Promise<Map<string, wasm.ResourceVote>>
Parameters
identityId IdentifierLike Required

Identity identifier.

limit number Optional

Maximum number of votes to return.

startAtVoteId IdentifierLike Optional

Vote identifier to resume from (exclusive by default).

startAtIncluded boolean Optional

Include the `startAtVoteId` when true.

orderAscending boolean Optional

Sort order. When omitted, defaults to ascending.

Returns
Promise<Map<string, wasm.ResourceVote>>
Example
// Evo SDK example return await sdk.voting.contestedResourceIdentityVotes({ identityId: '5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk', limit: 10, orderAscending: true })
sdk.voting.votePollsByEndDate

Get Vote Polls by End Date

Fetch vote polls filtered by end time using millisecond timestamps.

votePollsByEndDate(query?: wasm.VotePollsByEndDateQuery): Promise<wasm.VotePollsByEndDateEntry[]>
Parameters
startTimeMs number Optional

Starting timestamp (milliseconds) to filter polls.

startTimeIncluded boolean Optional

Include the `startTimeMs` boundary when true.

endTimeMs number Optional

Ending timestamp (milliseconds) to filter polls.

endTimeIncluded boolean Optional

Include the `endTimeMs` boundary when true.

limit number Optional

Maximum number of buckets to return.

offset number Optional

Offset into the paginated result set.

orderAscending boolean Optional

Sort order for timestamps; ascending by default.

Returns
Promise<wasm.VotePollsByEndDateEntry[]>
Example
// Evo SDK example return await sdk.voting.votePollsByEndDate({ startTimeMs: null, endTimeMs: null, limit: 10, orderAscending: true, })

Protocol & Version

sdk.protocol.versionUpgradeState

Get Protocol Version Upgrade State

Retrieve protocol upgrade vote tallies.

versionUpgradeState(): Promise<wasm.ProtocolVersionUpgradeState>
Parameters

No parameters required

Example
// Evo SDK example return await sdk.protocol.versionUpgradeState()
sdk.protocol.versionUpgradeVoteStatus

Get Protocol Version Vote Status

Fetch voting status for masternodes on protocol upgrades.

versionUpgradeVoteStatus(startProTxHash: wasm.ProTxHashLike | undefined, count: number): Promise<Map<string, wasm.ProtocolVersionUpgradeVoteStatus>>
Parameters
startProTxHash wasm.ProTxHashLike | undefined Required
count number Required
Returns
Promise<Map<string, wasm.ProtocolVersionUpgradeVoteStatus>>
Example
// Evo SDK example return await sdk.protocol.versionUpgradeVoteStatus('143dcd6a6b7684fde01e88a10e5d65de9a29244c5ecd586d14a342657025f113', 10)

Epoch & Block Queries

sdk.epoch.epochsInfo

Get Epochs Info

Retrieve summary information for one or more epochs.

epochsInfo(query?: EpochsQuery): Promise<Map<number, wasm.ExtendedEpochInfo | undefined>>
Parameters
query EpochsQuery Optional
startEpoch number Optional

Starting epoch index.

count number Optional

Maximum number of epochs to return.

ascending boolean Optional

Sort order for returned epochs.

Returns
Promise<Map<number, wasm.ExtendedEpochInfo | undefined>>
Example
// Evo SDK example return await sdk.epoch.epochsInfo({ startEpoch: 8635, count: 5, ascending: true })
sdk.epoch.current

Get Current Epoch

Fetch the current platform epoch.

current(): Promise<wasm.ExtendedEpochInfo>
Parameters

No parameters required

Returns
Promise<wasm.ExtendedEpochInfo>
Example
// Evo SDK example return await sdk.epoch.current()
sdk.epoch.finalizedInfos

Get Finalized Epoch Infos

Retrieve finalized epoch information for a range.

finalizedInfos(query: FinalizedEpochsQuery): Promise<Map<number, wasm.FinalizedEpochInfo | undefined>>
Parameters
query FinalizedEpochsQuery Required
startEpoch number Required

Starting epoch index (required).

count number Optional

Maximum number of epochs to return.

ascending boolean Optional

Sort order for returned epochs.

Returns
Promise<Map<number, wasm.FinalizedEpochInfo | undefined>>
Example
// Evo SDK example return await sdk.epoch.finalizedInfos({ startEpoch: 8635, count: 5, ascending: true })
sdk.epoch.evonodesProposedBlocksByIds

Get Epoch Blocks by Evonode IDs

Fetch proposed blocks for specific evonode ProTx hashes.

evonodesProposedBlocksByIds(epoch: number, ids: wasm.ProTxHashLikeArray): Promise<Map<string, bigint>>
Parameters
epoch number Required
Returns
Promise<Map<string, bigint>>
Example
// Evo SDK example return await sdk.epoch.evonodesProposedBlocksByIds( 8635, ['143dcd6a6b7684fde01e88a10e5d65de9a29244c5ecd586d14a342657025f113'] )
sdk.epoch.evonodesProposedBlocksByRange

Get Epoch Blocks by Range

Fetch proposed blocks in range order.

evonodesProposedBlocksByRange(query: EvonodeProposedBlocksRangeQuery): Promise<Map<string, bigint>>
Parameters
epoch number Required

Epoch index to query.

limit number Optional

Maximum number of items to return.

startAfter ProTxHashLike Optional

ProTxHash to resume from (exclusive by default).

Returns
Promise<Map<string, bigint>>
Example
// Evo SDK example return await sdk.epoch.evonodesProposedBlocksByRange({ epoch: 8635, limit: 5 })

Token Queries

sdk.tokens.calculateId

Calculate Token ID

Calculate a token ID from a contract ID and token position. This is a utility method that does not require network connection.

calculateId(contractId: wasm.IdentifierLike, tokenPosition: number): Promise<string>
Parameters
contractId wasm.IdentifierLike Required
tokenPosition number Required
Returns
Promise<string>
Example
// Evo SDK example return await sdk.tokens.calculateId('ALybvzfcCwMs7sinDwmtumw17NneuW7RgFtFHgjKmF3A', 0)
sdk.tokens.statuses

Get Token Statuses

Retrieve status information for one or more tokens.

statuses(tokenIds: wasm.IdentifierLikeArray): Promise<Map<string, wasm.TokenStatus>>
Parameters
tokenIds wasm.IdentifierLikeArray Required
Returns
Promise<Map<string, wasm.TokenStatus>>
Example
// Evo SDK example return await sdk.tokens.statuses([ 'Hqyu8WcRwXCTwbNxdga4CN5gsVEGc67wng4TFzceyLUv', 'H7FRpZJqZK933r9CzZMsCuf1BM34NT5P2wSJyjDkprqy' ])
sdk.tokens.directPurchasePrices

Get Direct Purchase Prices

Fetch direct purchase prices for tokens.

directPurchasePrices(tokenIds: wasm.IdentifierLikeArray): Promise<Map<string, wasm.TokenPriceInfo>>
Parameters
tokenIds wasm.IdentifierLikeArray Required
Returns
Promise<Map<string, wasm.TokenPriceInfo>>
Example
// Evo SDK example return await sdk.tokens.directPurchasePrices([ 'Hqyu8WcRwXCTwbNxdga4CN5gsVEGc67wng4TFzceyLUv' ])
sdk.tokens.contractInfo

Get Token Contract Info

Retrieve metadata for a token contract.

contractInfo(tokenId: wasm.IdentifierLike): Promise<wasm.TokenContractInfo | undefined>
Parameters
tokenId wasm.IdentifierLike Required
Returns
Promise<wasm.TokenContractInfo | undefined>
Example
// Evo SDK example return await sdk.tokens.contractInfo('ALybvzfcCwMs7sinDwmtumw17NneuW7RgFtFHgjKmF3A')
sdk.tokens.perpetualDistributionLastClaim

Get Token Distribution Last Claim

Fetch the last perpetual distribution claim for an identity and token.

perpetualDistributionLastClaim(identityId: wasm.IdentifierLike, tokenId: wasm.IdentifierLike): Promise<wasm.RewardDistributionMoment | undefined>
Parameters
identityId wasm.IdentifierLike Required
tokenId wasm.IdentifierLike Required
Returns
Promise<wasm.RewardDistributionMoment | undefined>
Example
// Evo SDK example return await sdk.tokens.perpetualDistributionLastClaim( '5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk', 'Hqyu8WcRwXCTwbNxdga4CN5gsVEGc67wng4TFzceyLUv' )
sdk.tokens.totalSupply

Get Token Total Supply

Fetch the total supply for a token.

totalSupply(tokenId: wasm.IdentifierLike): Promise<wasm.TokenTotalSupply | undefined>
Parameters
tokenId wasm.IdentifierLike Required
Returns
Promise<wasm.TokenTotalSupply | undefined>
Example
// Evo SDK example return await sdk.tokens.totalSupply('Hqyu8WcRwXCTwbNxdga4CN5gsVEGc67wng4TFzceyLUv')
sdk.tokens.priceByContract

Get Token Price by Contract

Retrieve the price details for a token indexed by contract position.

priceByContract(contractId: wasm.IdentifierLike, tokenPosition: number): Promise<wasm.TokenPriceInfo>
Parameters
contractId wasm.IdentifierLike Required
tokenPosition number Required
Returns
Promise<wasm.TokenPriceInfo>
Example
// Evo SDK example return await sdk.tokens.priceByContract('ALybvzfcCwMs7sinDwmtumw17NneuW7RgFtFHgjKmF3A', 0)

Group Queries

sdk.group.info

Get Group Info

Fetch metadata for a specific group contract position.

info(contractId: wasm.IdentifierLike, groupContractPosition: number): Promise<wasm.Group | undefined>
Parameters
contractId wasm.IdentifierLike Required
groupContractPosition number Required
Returns
Promise<wasm.Group | undefined>
Example
// Evo SDK example return await sdk.group.info('49PJEnNx7ReCitzkLdkDNr4s6RScGsnNexcdSZJ1ph5N', 0)
sdk.group.infos

List Group Infos

List group information entries for a contract.

infos(query: wasm.GroupInfosQuery): Promise<Map<number, wasm.Group | undefined>>
Parameters
query wasm.GroupInfosQuery Required
dataContractId IdentifierLike Required

Data contract identifier.

startAt GroupInfosStartAt Optional

Cursor describing where to resume from.

limit number Optional

Maximum number of groups to return.

Returns
Promise<Map<number, wasm.Group | undefined>>
Example
// Evo SDK example return await sdk.group.infos({ dataContractId: '49PJEnNx7ReCitzkLdkDNr4s6RScGsnNexcdSZJ1ph5N', startAt: null, limit: 10 })
sdk.group.members

Get Group Members

Retrieve member entries for a group.

members(query: wasm.GroupMembersQuery): Promise<Map<string, bigint>>
Parameters
query wasm.GroupMembersQuery Required
dataContractId IdentifierLike Required

Data contract identifier.

groupContractPosition number Required

Group position inside the contract.

memberIds Array<Identifier | Uint8Array | string> Optional

Optional list of member IDs to retrieve. When provided, pagination options are ignored.

startAtMemberId IdentifierLike Optional

Member identifier to resume from.

limit number Optional

Maximum number of members to return when not requesting specific IDs.

Returns
Promise<Map<string, bigint>>
Example
// Evo SDK example return await sdk.group.members({ dataContractId: '49PJEnNx7ReCitzkLdkDNr4s6RScGsnNexcdSZJ1ph5N', groupContractPosition: 0, limit: 10 })
sdk.group.actions

Get Group Actions

Fetch actions associated with a group.

actions(query: wasm.GroupActionsQuery): Promise<Map<string, wasm.GroupAction | undefined>>
Parameters
query wasm.GroupActionsQuery Required
dataContractId IdentifierLike Required

Data contract identifier.

groupContractPosition number Required

Position of the group within the contract.

status GroupActionStatusFilter Required

Filter actions by status.

startAt GroupActionsStartAt Optional

Cursor describing where to resume from.

limit number Optional

Maximum number of actions to return.

Returns
Promise<Map<string, wasm.GroupAction | undefined>>
Example
// Evo SDK example return await sdk.group.actions({ dataContractId: '49PJEnNx7ReCitzkLdkDNr4s6RScGsnNexcdSZJ1ph5N', groupContractPosition: 0, status: 'ACTIVE', limit: 10 })
sdk.group.actionSigners

Get Group Action Signers

List signers for a specific group action.

actionSigners(query: wasm.GroupActionSignersQuery): Promise<Map<string, bigint>>
Parameters
dataContractId IdentifierLike Required

Data contract identifier.

groupContractPosition number Required

Position of the group within the contract.

status GroupActionStatusFilter Required

Action status filter.

actionId IdentifierLike Required

Group action identifier.

Returns
Promise<Map<string, bigint>>
Example
// Evo SDK example return await sdk.group.actionSigners({ dataContractId: '49PJEnNx7ReCitzkLdkDNr4s6RScGsnNexcdSZJ1ph5N', groupContractPosition: 0, status: 'ACTIVE', actionId: '6XJzL6Qb8Zhwxt4HFwh8NAn7q1u4dwdoUf8EmgzDudFZ' })
sdk.group.identityGroups

Get Identity Groups

Fetch group memberships for an identity.

identityGroups(query: wasm.IdentityGroupsQuery): Promise<wasm.IdentityGroupInfo[]>
Parameters
query wasm.IdentityGroupsQuery Required
identityId IdentifierLike Required

Identity identifier.

memberDataContracts Array<Identifier | Uint8Array | string> Optional

Data contracts where the identity participates as a member.

ownerDataContracts Array<Identifier | Uint8Array | string> Optional

Data contracts where the identity participates as an owner. (Currently not implemented server-side.)

moderatorDataContracts Array<Identifier | Uint8Array | string> Optional

Data contracts where the identity participates as a moderator. (Currently not implemented server-side.)

Returns
Promise<wasm.IdentityGroupInfo[]>
Example
// Evo SDK example return await sdk.group.identityGroups({ identityId: '5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk' })
sdk.group.groupsDataContracts

Get Groups Data Contracts

Fetch group configuration documents for the supplied data contracts.

groupsDataContracts(dataContractIds: wasm.IdentifierLikeArray): Promise<Map<string, Map<number, wasm.Group | undefined>>>
Parameters
dataContractIds wasm.IdentifierLikeArray Required
Returns
Promise<Map<string, Map<number, wasm.Group | undefined>>>
Example
// Evo SDK example return await sdk.group.groupsDataContracts(['GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec'])

System & Utility

sdk.system.status

Get Platform Status

Retrieve basic platform status information.

status(): Promise<wasm.StatusResponse>
Parameters

No parameters required

Returns
Promise<wasm.StatusResponse>
Example
// Evo SDK example return await sdk.system.status()
sdk.system.currentQuorumsInfo

Get Current Quorums Info

Fetch details about currently active quorums.

currentQuorumsInfo(): Promise<wasm.CurrentQuorumsInfo>
Parameters

No parameters required

Returns
Promise<wasm.CurrentQuorumsInfo>
Example
// Evo SDK example return await sdk.system.currentQuorumsInfo()
sdk.system.prefundedSpecializedBalance

Get Prefunded Specialized Balance

Retrieve a prefunded specialized balance entry.

prefundedSpecializedBalance(identityId: wasm.IdentifierLike): Promise<wasm.PrefundedSpecializedBalance>
Parameters
identityId wasm.IdentifierLike Required
Example
// Evo SDK example return await sdk.system.prefundedSpecializedBalance('AzaU7zqCT7X1kxh8yWxkT9PxAgNqWDu4Gz13emwcRyAT')
sdk.system.totalCreditsInPlatform

Get Total Credits in Platform

Fetch the total credit balance stored in the platform.

totalCreditsInPlatform(): Promise<bigint>
Parameters

No parameters required

Returns
Promise<bigint>
Example
// Evo SDK example return await sdk.system.totalCreditsInPlatform()
sdk.system.pathElements

Get Path Elements

Access items in the GroveDB state tree by specifying a path and keys.

pathElements(path: wasm.GrovePathSegment[], keys: wasm.GrovePathSegment[]): Promise<wasm.PathElement[]>
Parameters
path wasm.GrovePathSegment[] Required
keys wasm.GrovePathSegment[] Required
Returns
Promise<wasm.PathElement[]>
Example
// Evo SDK example return await sdk.system.pathElements(['96'], ['5DbLwAxGBzUzo81VewMUwn4b5P4bpv9FNFybi25XB5Bk'])
sdk.stateTransitions.waitForStateTransitionResult

Wait for State Transition Result

Wait for a state transition to be processed and return the result.

waitForStateTransitionResult(stateTransitionHash: string): Promise<wasm.StateTransitionResult>
Parameters
stateTransitionHash string Required
Returns
Promise<wasm.StateTransitionResult>
Example
// Evo SDK example return await sdk.stateTransitions.waitForStateTransitionResult('0000000000000000000000000000000000000000000000000000000000000000')

Platform Address Queries

sdk.addresses.get

Get Platform Address

Fetch information about a Platform address including its nonce and balance.

get(address: wasm.PlatformAddressLike): Promise<wasm.PlatformAddressInfo | undefined>
Parameters
address wasm.PlatformAddressLike Required

- The platform address to query (PlatformAddress, Uint8Array, or bech32m string)

Returns
Promise<wasm.PlatformAddressInfo | undefined>
Example
// Evo SDK example return await sdk.addresses.get('tdash1krt0z5hrcaphyuraxmk2h2ff8nyv5fmncsgf7evf')
sdk.addresses.getMany

Get Multiple Platform Addresses

Fetch information about multiple Platform addresses.

getMany(addresses: wasm.PlatformAddressLikeArray): Promise<Map<string, wasm.PlatformAddressInfo | undefined>>
Parameters
addresses wasm.PlatformAddressLikeArray Required

- Array of platform addresses to query

Returns
Promise<Map<string, wasm.PlatformAddressInfo | undefined>>
Example
// Evo SDK example return await sdk.addresses.getMany(['tdash1krt0z5hrcaphyuraxmk2h2ff8nyv5fmncsgf7evf'])

State Transitions

Evo SDK v4 state transitions accept constructed payload objects plus the appropriate public key and signer object. Build an IdentitySigner with addKeyFromWif; do not pass a WIF string directly in a transition call. Identity creation and asset-lock top ups instead take typed AssetLockProof and PrivateKey objects.

Identity Transitions

sdk.identities.create

Identity Create

Create a new identity with initial credits

create(options: wasm.IdentityCreateOptions): Promise<void>
Parameters
options wasm.IdentityCreateOptions Required
identity Identity Required

The identity to create (with public keys set up). Use Identity.create() to build the identity structure first.

assetLockProof AssetLockProof Required

Asset lock proof from the Core chain. Use AssetLockProof.createInstantAssetLockProof() or AssetLockProof.createChainAssetLockProof().

assetLockPrivateKey PrivateKey Required

Private key for signing the asset lock proof. This is the private key that controls the asset lock output.

signer IdentitySigner Required

Signer containing private keys for the identity's public keys. Use IdentitySigner to add keys for signing identity key proofs.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<void>
Example
// Evo SDK example (requires keys/funding) import { AssetLockProof, Identity, IdentityPublicKeyInCreation, IdentitySigner, KeyType, PrivateKey, Purpose, SecurityLevel } from '@dashevo/evo-sdk'; const assetLockProof = AssetLockProof.fromHex(assetLockProofHex); const assetLockPrivateKey = PrivateKey.fromWIF(assetLockPrivateKeyWif); const identityPrivateKey = PrivateKey.fromWIF(identityPrivateKeyWif); const identity = new Identity(assetLockProof.createIdentityId()); const masterKey = new IdentityPublicKeyInCreation({ keyId: 0, purpose: Purpose.AUTHENTICATION, securityLevel: SecurityLevel.MASTER, keyType: KeyType.ECDSA_SECP256K1, data: identityPrivateKey.getPublicKey().toBytes() }).toIdentityPublicKey(); identity.addPublicKey(masterKey); const signer = new IdentitySigner(); signer.addKey(identityPrivateKey); await sdk.identities.create({ identity, assetLockProof, assetLockPrivateKey, signer });
sdk.identities.topUp

Identity Top Up

Add credits to an existing identity

topUp(options: wasm.IdentityTopUpOptions): Promise<bigint>
Parameters
options wasm.IdentityTopUpOptions Required
identity Identity Required

The identity to top up.

assetLockProof AssetLockProof Required

Asset lock proof from the Core chain. Use AssetLockProof.createInstantAssetLockProof() or AssetLockProof.createChainAssetLockProof().

assetLockPrivateKey PrivateKey Required

Private key for signing the asset lock proof. This is the private key that controls the asset lock output.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<bigint>
Example
// Evo SDK example (requires keys/funding) import { AssetLockProof, PrivateKey } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch(identityId); if (!identity) throw new Error('Identity not found'); const assetLockProof = AssetLockProof.fromHex(assetLockProofHex); const assetLockPrivateKey = PrivateKey.fromWIF(assetLockPrivateKeyWif); await sdk.identities.topUp({ identity, assetLockProof, assetLockPrivateKey });
sdk.identities.update

Identity Update

Update identity keys (add or disable)

update(options: wasm.IdentityUpdateOptions): Promise<void>
Parameters
options wasm.IdentityUpdateOptions Required
identity Identity Required

The identity to update.

addPublicKeys IdentityPublicKeyInCreation[] Optional

Array of public keys to add to the identity. Use IdentityPublicKeyInCreation to create new keys.

disablePublicKeys number[] Optional

Array of key IDs to disable. Cannot disable master, critical auth, or transfer keys.

signer IdentitySigner Required

Signer containing the private key for the identity's master key. Use IdentitySigner to add the master key before calling.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<void>
Example
// Evo SDK example (requires keys/funding) import { IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch("<identityId>"); if (!identity) throw new Error('Identity not found'); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); const disabledKeyIds = disablePublicKeys?.split(',').map(value => Number(value.trim())); await sdk.identities.update({ identity, addPublicKeys, disablePublicKeys: disabledKeyIds, signer });
sdk.identities.creditTransfer

Identity Credit Transfer

Transfer credits between identities

creditTransfer(options: wasm.IdentityCreditTransferOptions): Promise<wasm.IdentityCreditTransferResult>
Parameters
identity Identity Required

The sender identity.

recipientId IdentifierLike Required

The identity ID of the recipient.

amount bigint Required

The amount of credits to transfer.

signer IdentitySigner Required

Signer containing the private key for the sender's transfer key. Use IdentitySigner to add the transfer key before calling.

signingKey IdentityPublicKey Optional

Optional identity public key to use for signing. If not provided, auto-selects an available transfer key.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Example
// Evo SDK example (requires keys/funding) import { IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch("<identityId>"); if (!identity) throw new Error('Identity not found'); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); await sdk.identities.creditTransfer({ identity, recipientId: "<recipientId>", amount: BigInt("<amount>"), signer, });
sdk.identities.creditWithdrawal

Identity Credit Withdrawal

Withdraw credits from identity to Dash address

creditWithdrawal(options: wasm.IdentityCreditWithdrawalOptions): Promise<bigint>
Parameters
identity Identity Required

The identity to withdraw from.

amount bigint Required

The amount of credits to withdraw.

toAddress string Optional

Optional Dash address to send the withdrawn credits to.

coreFeePerByte number Optional

Core (L1) fee per byte for the withdrawal transaction. This determines the mining fee for the Core blockchain transaction.

signer IdentitySigner Required

Signer containing the private key for the identity's transfer/owner key. Use IdentitySigner to add the key before calling.

signingKey IdentityPublicKey Optional

Optional identity public key to use for signing. If not provided, auto-selects a matching transfer or owner key.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<bigint>
Example
// Evo SDK example (requires keys/funding) import { IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch("<identityId>"); if (!identity) throw new Error('Identity not found'); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); await sdk.identities.creditWithdrawal({ identity, amount: BigInt("<amount>"), toAddress: "<toAddress>", coreFeePerByte: <coreFeePerByte>, signer, });

Data Contract Transitions

sdk.contracts.publish

Data Contract Create

Create a new data contract

publish(options: wasm.ContractPublishOptions): Promise<wasm.DataContract>
Parameters
options wasm.ContractPublishOptions Required
dataContract DataContract Required

The data contract to create. Use `new DataContract(...)` or `DataContract.fromJSON(...)` to construct it.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition. Get this from the owner identity's public keys.

signer IdentitySigner Required

Signer containing the private key that corresponds to the identity key. Use IdentitySigner to add the private key before calling.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<wasm.DataContract>
Example
// Evo SDK example (requires keys/funding) import { DataContract, IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch("<ownerId>"); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(keyId); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); const identityNonce = (await sdk.identities.nonce(identity.id)) + 1n; const dataContract = new DataContract({ ownerId: identity.id, identityNonce, schemas, tokens, fullValidation: false }); await sdk.contracts.publish({ dataContract, identityKey, signer });
sdk.contracts.update

Data Contract Update

Add document types, groups, or tokens to an existing data contract

update(options: wasm.ContractUpdateOptions): Promise<void>
Parameters
options wasm.ContractUpdateOptions Required
dataContract DataContract Required

The updated data contract. Use the existing contract and modify it, or create a new one with `DataContract.fromJSON(...)`. Version must be incremented.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition. Get this from the owner identity's public keys.

signer IdentitySigner Required

Signer containing the private key that corresponds to the identity key. Use IdentitySigner to add the private key before calling.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<void>
Example
// Evo SDK example (requires keys/funding) import { DataContract, IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch("<ownerId>"); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(keyId); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); const dataContract = await sdk.contracts.fetch("<dataContractId>"); if (!dataContract) throw new Error('Data contract not found'); dataContract.version += 1; dataContract.setSchemas({ ...dataContract.schemas, ...newDocumentSchemas }, undefined, false); await sdk.contracts.update({ dataContract, identityKey, signer });

Document Transitions

sdk.documents.create

Document Create

Create a new document

create(options: wasm.DocumentCreateOptions): Promise<void>
Parameters
options wasm.DocumentCreateOptions Required
document Document Required

The document to create. Use `new Document(...)` or `Document.fromJSON(...)` to construct it. Must include dataContractId, documentTypeName, ownerId, and entropy.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition. Get this from the owner identity's public keys.

signer IdentitySigner Required

Signer containing the private key that corresponds to the identity key. Use IdentitySigner to add the private key before calling.

tokenPaymentInfo DocumentTokenPaymentInfo Optional

Optional token payment agreement for document types with tokenCost.create.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<void>
Example
// Evo SDK example (requires keys/funding) import { IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch("<ownerId>"); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(0); if (!identityKey) throw new Error('Identity key not found'); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); import { Document } from '@dashevo/evo-sdk'; const document = new Document({ dataContractId: "<contractId>", documentTypeName: "<documentType>", ownerId: "<ownerId>", properties }); await sdk.documents.create({ document, identityKey, signer });
sdk.documents.replace

Document Replace

Replace an existing document

replace(options: wasm.DocumentReplaceOptions): Promise<void>
Parameters
options wasm.DocumentReplaceOptions Required
document Document Required

The document with updated data. Must have the same ID as the existing document. Revision should be set to current revision + 1.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition. Get this from the owner identity's public keys.

signer IdentitySigner Required

Signer containing the private key that corresponds to the identity key. Use IdentitySigner to add the private key before calling.

tokenPaymentInfo DocumentTokenPaymentInfo Optional

Optional token payment agreement for document types with tokenCost.replace.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<void>
Example
// Evo SDK example (requires keys/funding) import { IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch("<ownerId>"); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(0); if (!identityKey) throw new Error('Identity key not found'); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); import { Document } from '@dashevo/evo-sdk'; const document = new Document({ dataContractId, documentTypeName, ownerId, properties, id: documentId, revision: Number(BigInt(revision) + 1n) }); await sdk.documents.replace({ document, identityKey, signer });
sdk.documents.delete

Document Delete

Delete an existing document

delete(options: wasm.DocumentDeleteOptions): Promise<void>
Parameters
options wasm.DocumentDeleteOptions Required
document Document | { id: IdentifierLike; ownerId: IdentifierLike; dataContractId: IdentifierLike; documentTypeName: string; } Required

The document to delete - either a Document instance or an object with identifiers.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition. Get this from the owner identity's public keys.

signer IdentitySigner Required

Signer containing the private key that corresponds to the identity key. Use IdentitySigner to add the private key before calling.

tokenPaymentInfo DocumentTokenPaymentInfo Optional

Optional token payment agreement for document types with tokenCost.delete.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<void>
Example
// Evo SDK example (requires keys/funding) import { IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch("<ownerId>"); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(0); if (!identityKey) throw new Error('Identity key not found'); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); const document = { id: documentId, ownerId, dataContractId, documentTypeName }; await sdk.documents.delete({ document, identityKey, signer });
sdk.documents.transfer

Document Transfer

Transfer document ownership

transfer(options: wasm.DocumentTransferOptions): Promise<void>
Parameters
options wasm.DocumentTransferOptions Required
document Document Required

The document to transfer. Must include id, ownerId, dataContractId, documentTypeName, and revision.

recipientId Identifier Required

The new owner's identity ID.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition. Get this from the owner identity's public keys.

signer IdentitySigner Required

Signer containing the private key that corresponds to the identity key. Use IdentitySigner to add the private key before calling.

tokenPaymentInfo DocumentTokenPaymentInfo Optional

Optional token payment agreement for document types with tokenCost.transfer.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<void>
Example
// Evo SDK example (requires keys/funding) import { Identifier, IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch("<ownerId>"); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(0); if (!identityKey) throw new Error('Identity key not found'); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); const document = await sdk.documents.get("<contractId>", "<documentType>", "<documentId>"); if (!document) throw new Error('Document not found'); document.revision = BigInt(document.revision) + 1n; const recipientIdentifier = Identifier.fromBase58(recipientId); await sdk.documents.transfer({ document, recipientId: recipientIdentifier, identityKey, signer });
sdk.documents.purchase

Document Purchase

Purchase a document

purchase(options: wasm.DocumentPurchaseOptions): Promise<void>
Parameters
options wasm.DocumentPurchaseOptions Required
document Document Required

The document to purchase. Must include id, ownerId, dataContractId, documentTypeName, and revision.

buyerId Identifier Required

The buyer's identity ID.

price bigint Required

The purchase price in credits. Must match the document's listed price.

identityKey IdentityPublicKey Required

The public key to use for signing the transition. Get this from the buyer identity's public keys.

signer IdentitySigner Required

Signer containing the private key that corresponds to the identity key. Use IdentitySigner to add the private key before calling.

tokenPaymentInfo DocumentTokenPaymentInfo Optional

Optional token payment agreement for document types with tokenCost.purchase.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<void>
Example
// Evo SDK example (requires keys/funding) import { Identifier, IdentitySigner } from '@dashevo/evo-sdk'; const buyer = await sdk.identities.fetch("<buyerId>"); if (!buyer) throw new Error('Identity not found'); const identityKey = buyer.getPublicKeyById(0); if (!identityKey) throw new Error('Identity key not found'); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); const document = await sdk.documents.get("<contractId>", "<documentType>", "<documentId>"); if (!document) throw new Error('Document not found'); document.revision = BigInt(document.revision) + 1n; const buyerIdentifier = Identifier.fromBase58(buyerId); await sdk.documents.purchase({ document, buyerId: buyerIdentifier, price: BigInt(price), identityKey, signer });
sdk.documents.setPrice

Document Set Price

Set or update document price

setPrice(options: wasm.DocumentSetPriceOptions): Promise<void>
Parameters
options wasm.DocumentSetPriceOptions Required
document Document Required

The document to set a price on. Must include id, ownerId, dataContractId, documentTypeName, and revision.

price bigint Required

The price in credits. Set to 0 to remove the price and make the document not for sale.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition. Get this from the owner identity's public keys.

signer IdentitySigner Required

Signer containing the private key that corresponds to the identity key. Use IdentitySigner to add the private key before calling.

tokenPaymentInfo DocumentTokenPaymentInfo Optional

Optional token payment agreement for document types with tokenCost.update_price.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<void>
Example
// Evo SDK example (requires keys/funding) import { IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch("<ownerId>"); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(0); if (!identityKey) throw new Error('Identity key not found'); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); const document = await sdk.documents.get("<contractId>", "<documentType>", "<documentId>"); if (!document) throw new Error('Document not found'); document.revision = BigInt(document.revision) + 1n; await sdk.documents.setPrice({ document, price: BigInt(price), identityKey, signer });
sdk.dpns.registerName

DPNS Register Name

Register a new DPNS username

Disabled: Typed v4 preorder and registration flow is not covered by a usable credential fixture.

registerName(options: wasm.DpnsRegisterNameOptions): Promise<wasm.RegisterDpnsNameResult>
Parameters
options wasm.DpnsRegisterNameOptions Required
label string Required

The username label to register (without the .dash suffix). Must be a valid DPNS username (3-63 characters, alphanumeric and hyphens).

identity Identity Required

The identity that will own the username. Fetch the identity first using `getIdentity()`.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition. Get this from the identity's public keys.

signer IdentitySigner Required

Signer containing the private key that corresponds to the identity key. Use IdentitySigner to add the private key before calling.

preorderCallback (preorderDocument: Document) => void Optional

Optional callback called after the preorder document is submitted. Receives the preorder Document object.

Returns
Promise<wasm.RegisterDpnsNameResult>
Example
// Evo SDK example (requires keys/funding) await sdk.dpns.registerName({ label, identity, identityKey, signer, preorderCallback })

Token Transitions

sdk.tokens.burn

Token Burn

Burn tokens

burn(options: wasm.TokenBurnOptions): Promise<wasm.TokenBurnResult>
Parameters
options wasm.TokenBurnOptions Required
dataContractId Identifier Required

The ID of the data contract containing the token.

tokenPosition number Required

The position of the token in the contract (0-indexed).

amount bigint Required

The amount of tokens to burn.

identityId Identifier Required

The identity ID of the token holder burning tokens.

publicNote string Optional

Optional public note for the burn operation.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition.

signer IdentitySigner Required

Signer containing the private key that corresponds to the identity key. Use IdentitySigner to add the private key before calling.

groupInfo GroupStateTransitionInfoStatus Optional

Optional group action info for group-managed token burning. Use GroupStateTransitionInfoStatus.proposer() to propose a new group action, or GroupStateTransitionInfoStatus.otherSigner() to vote on an existing action.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<wasm.TokenBurnResult>
Example
// Evo SDK example (requires keys/funding) import { Identifier, IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch(identityId); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(keyId); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); await sdk.tokens.burn({ dataContractId: Identifier.fromBase58(contractId), tokenPosition: Number(tokenPosition), identityId: Identifier.fromBase58(identityId), amount: BigInt(amount), publicNote: publicNote || undefined, identityKey, signer, });
sdk.tokens.mint

Token Mint

Mint new tokens

mint(options: wasm.TokenMintOptions): Promise<wasm.TokenMintResult>
Parameters
options wasm.TokenMintOptions Required
dataContractId Identifier Required

The ID of the data contract containing the token.

tokenPosition number Required

The position of the token in the contract (0-indexed).

amount bigint Required

The amount of tokens to mint.

identityId Identifier Required

The identity ID of the minter.

recipientId Identifier Optional

Optional recipient identity ID. If not provided, mints to the minter's identity.

publicNote string Optional

Optional public note for the mint operation.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition. Get this from the minter identity's public keys.

signer IdentitySigner Required

Signer containing the private key that corresponds to the identity key. Use IdentitySigner to add the private key before calling.

groupInfo GroupStateTransitionInfoStatus Optional

Optional group action info for group-managed token minting. Use GroupStateTransitionInfoStatus.proposer() to propose a new group action, or GroupStateTransitionInfoStatus.otherSigner() to vote on an existing action.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<wasm.TokenMintResult>
Example
// Evo SDK example (requires keys/funding) import { Identifier, IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch(identityId); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(keyId); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); await sdk.tokens.mint({ dataContractId: Identifier.fromBase58(contractId), tokenPosition: Number(tokenPosition), identityId: Identifier.fromBase58(identityId), recipientId: issuedToIdentityId ? Identifier.fromBase58(issuedToIdentityId) : undefined, amount: BigInt(amount), publicNote: publicNote || undefined, identityKey, signer, });
sdk.tokens.claim

Token Claim

Claim tokens from a distribution

claim(options: wasm.TokenClaimOptions): Promise<wasm.TokenClaimResult>
Parameters
options wasm.TokenClaimOptions Required
dataContractId Identifier Required

The ID of the data contract containing the token.

tokenPosition number Required

The position of the token in the contract (0-indexed).

identityId Identifier Required

The identity ID claiming the tokens.

distributionType "preProgrammed" | "perpetual" Required

The type of distribution to claim from: "preProgrammed" or "perpetual".

publicNote string Optional

Optional public note for the claim operation.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition.

signer IdentitySigner Required

Signer containing the private key that corresponds to the identity key. Use IdentitySigner to add the private key before calling.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<wasm.TokenClaimResult>
Example
// Evo SDK example (requires keys/funding) import { Identifier, IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch(identityId); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(keyId); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); await sdk.tokens.claim({ dataContractId: Identifier.fromBase58(contractId), tokenPosition: Number(tokenPosition), identityId: Identifier.fromBase58(identityId), distributionType: distributionType, publicNote: publicNote || undefined, identityKey, signer, });
sdk.tokens.setPrice

Token Set Price

Set or update the price for direct token purchases

setPrice(options: wasm.TokenSetPriceOptions): Promise<wasm.TokenSetPriceResult>
Parameters
options wasm.TokenSetPriceOptions Required
dataContractId Identifier Required

The ID of the data contract containing the token.

tokenPosition number Required

The position of the token in the contract (0-indexed).

authorityId Identifier Required

The identity ID of the token authority setting the price.

price bigint | null Optional

The flat price in credits for one token (SinglePrice schedule). Set to null to disable direct purchases. Mutually exclusive with `priceTiers`.

priceTiers Record<string, bigint> Optional

Tiered direct-purchase pricing (SetPrices schedule). Maps the minimum bulk-buy amount (token amount, as a string key) to the per-token price in credits for that tier. Keys are unsigned integers encoded as strings; values are credit amounts as bigint. Example: `{ "1": 1_000n, "100": 900n, "1000": 800n }` charges 1000 credits/token for purchases of 1+, 900 for purchases of 100+, and 800 for purchases of 1000+. Mutually exclusive with `price`. Must contain at least one entry.

publicNote string Optional

Optional public note for the price change.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition.

signer IdentitySigner Required

Signer containing the private key for the authority's authentication key. Use IdentitySigner to add the authentication key before calling.

groupInfo GroupStateTransitionInfoStatus Optional

Optional group action info for group-managed price changes. Use GroupStateTransitionInfoStatus.proposer() to propose a new group action, or GroupStateTransitionInfoStatus.otherSigner() to vote on an existing action.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<wasm.TokenSetPriceResult>
Example
// Evo SDK example (requires keys/funding) import { Identifier, IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch(identityId); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(keyId); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); await sdk.tokens.setPrice({ dataContractId: Identifier.fromBase58(contractId), tokenPosition: Number(tokenPosition), authorityId: Identifier.fromBase58(identityId), price: priceData == null || priceData === '' ? null : BigInt(priceData), publicNote: publicNote || undefined, identityKey, signer, });
sdk.tokens.directPurchase

Token Direct Purchase

Purchase tokens directly at the configured price

directPurchase(options: wasm.TokenDirectPurchaseOptions): Promise<wasm.TokenDirectPurchaseResult>
Parameters
dataContractId Identifier Required

The ID of the data contract containing the token.

tokenPosition number Required

The position of the token in the contract (0-indexed).

buyerId Identifier Required

The identity ID purchasing the tokens.

amount bigint Required

The amount of tokens to purchase.

maxTotalCost bigint Required

The maximum total credits the buyer is willing to pay. The actual cost may be less if the token price is lower.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition.

signer IdentitySigner Required

Signer containing the private key for the buyer's authentication key. Use IdentitySigner to add the authentication key before calling.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Example
// Evo SDK example (requires keys/funding) import { Identifier, IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch(identityId); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(keyId); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); await sdk.tokens.directPurchase({ dataContractId: Identifier.fromBase58(contractId), tokenPosition: Number(tokenPosition), buyerId: Identifier.fromBase58(identityId), amount: BigInt(amount), maxTotalCost: BigInt(totalAgreedPrice), publicNote: publicNote || undefined, identityKey, signer, });
sdk.tokens.emergencyAction

Token Emergency Action

Perform an emergency action on a token

emergencyAction(options: wasm.TokenEmergencyActionOptions): Promise<wasm.TokenEmergencyActionResult>
Parameters
dataContractId Identifier Required

The ID of the data contract containing the token.

tokenPosition number Required

The position of the token in the contract (0-indexed).

authorityId Identifier Required

The identity ID of the token authority performing the action.

action "pause" | "resume" Required

The emergency action to perform: "pause" or "resume".

publicNote string Optional

Optional public note for the emergency action.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition.

signer IdentitySigner Required

Signer containing the private key for the authority's authentication key. Use IdentitySigner to add the authentication key before calling.

groupInfo GroupStateTransitionInfoStatus Optional

Optional group action info for group-managed emergency actions. Use GroupStateTransitionInfoStatus.proposer() to propose a new group action, or GroupStateTransitionInfoStatus.otherSigner() to vote on an existing action.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Example
// Evo SDK example (requires keys/funding) import { Identifier, IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch(identityId); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(keyId); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); await sdk.tokens.emergencyAction({ dataContractId: Identifier.fromBase58(contractId), tokenPosition: Number(tokenPosition), authorityId: Identifier.fromBase58(identityId), action: actionType, publicNote: publicNote || undefined, identityKey, signer, });
sdk.tokens.transfer

Token Transfer

Transfer tokens between identities

transfer(options: wasm.TokenTransferOptions): Promise<wasm.TokenTransferResult>
Parameters
options wasm.TokenTransferOptions Required
dataContractId Identifier Required

The ID of the data contract containing the token.

tokenPosition number Required

The position of the token in the contract (0-indexed).

amount bigint Required

The amount of tokens to transfer.

senderId Identifier Required

The sender's identity ID.

recipientId Identifier Required

The recipient's identity ID.

publicNote string Optional

Optional public note for the transfer.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition.

signer IdentitySigner Required

Signer containing the private key for the sender's authentication key. Use IdentitySigner to add the authentication key before calling.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<wasm.TokenTransferResult>
Example
// Evo SDK example (requires keys/funding) import { Identifier, IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch(identityId); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(keyId); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); await sdk.tokens.transfer({ dataContractId: Identifier.fromBase58(contractId), tokenPosition: Number(tokenPosition), senderId: Identifier.fromBase58(identityId), recipientId: Identifier.fromBase58(recipientId), amount: BigInt(amount), publicNote: publicNote || undefined, identityKey, signer, });
sdk.tokens.freeze

Token Freeze

Freeze tokens for a specific identity

freeze(options: wasm.TokenFreezeOptions): Promise<wasm.TokenFreezeResult>
Parameters
options wasm.TokenFreezeOptions Required
dataContractId Identifier Required

The ID of the data contract containing the token.

tokenPosition number Required

The position of the token in the contract (0-indexed).

authorityId Identifier Required

The identity ID of the token authority performing the freeze.

frozenIdentityId Identifier Required

The identity ID to freeze.

publicNote string Optional

Optional public note for the freeze operation.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition.

signer IdentitySigner Required

Signer containing the private key for the authority's authentication key. Use IdentitySigner to add the authentication key before calling.

groupInfo GroupStateTransitionInfoStatus Optional

Optional group action info for group-managed token freezing. Use GroupStateTransitionInfoStatus.proposer() to propose a new group action, or GroupStateTransitionInfoStatus.otherSigner() to vote on an existing action.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<wasm.TokenFreezeResult>
Example
// Evo SDK example (requires keys/funding) import { Identifier, IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch(identityId); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(keyId); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); await sdk.tokens.freeze({ dataContractId: Identifier.fromBase58(contractId), tokenPosition: Number(tokenPosition), authorityId: Identifier.fromBase58(identityId), frozenIdentityId: Identifier.fromBase58(identityToFreeze), publicNote: publicNote || undefined, identityKey, signer, });
sdk.tokens.unfreeze

Token Unfreeze

Unfreeze tokens for a specific identity

unfreeze(options: wasm.TokenUnfreezeOptions): Promise<wasm.TokenUnfreezeResult>
Parameters
options wasm.TokenUnfreezeOptions Required
dataContractId Identifier Required

The ID of the data contract containing the token.

tokenPosition number Required

The position of the token in the contract (0-indexed).

authorityId Identifier Required

The identity ID of the token authority performing the unfreeze.

frozenIdentityId Identifier Required

The identity ID to unfreeze.

publicNote string Optional

Optional public note for the unfreeze operation.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition.

signer IdentitySigner Required

Signer containing the private key for the authority's authentication key. Use IdentitySigner to add the authentication key before calling.

groupInfo GroupStateTransitionInfoStatus Optional

Optional group action info for group-managed token unfreezing. Use GroupStateTransitionInfoStatus.proposer() to propose a new group action, or GroupStateTransitionInfoStatus.otherSigner() to vote on an existing action.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<wasm.TokenUnfreezeResult>
Example
// Evo SDK example (requires keys/funding) import { Identifier, IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch(identityId); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(keyId); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); await sdk.tokens.unfreeze({ dataContractId: Identifier.fromBase58(contractId), tokenPosition: Number(tokenPosition), authorityId: Identifier.fromBase58(identityId), frozenIdentityId: Identifier.fromBase58(identityToUnfreeze), publicNote: publicNote || undefined, identityKey, signer, });
sdk.tokens.destroyFrozen

Token Destroy Frozen

Destroy frozen tokens

destroyFrozen(options: wasm.TokenDestroyFrozenOptions): Promise<wasm.TokenDestroyFrozenResult>
Parameters
dataContractId Identifier Required

The ID of the data contract containing the token.

tokenPosition number Required

The position of the token in the contract (0-indexed).

authorityId Identifier Required

The identity ID of the token authority performing the destruction.

frozenIdentityId Identifier Required

The frozen identity ID whose tokens will be destroyed.

publicNote string Optional

Optional public note for the destruction operation.

identityKey IdentityPublicKey Required

The identity public key to use for signing the transition.

signer IdentitySigner Required

Signer containing the private key for the authority's authentication key. Use IdentitySigner to add the authentication key before calling.

groupInfo GroupStateTransitionInfoStatus Optional

Optional group action info for group-managed token destruction. Use GroupStateTransitionInfoStatus.proposer() to propose a new group action, or GroupStateTransitionInfoStatus.otherSigner() to vote on an existing action.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Example
// Evo SDK example (requires keys/funding) import { Identifier, IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch(identityId); if (!identity) throw new Error('Identity not found'); const identityKey = identity.getPublicKeyById(keyId); const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); await sdk.tokens.destroyFrozen({ dataContractId: Identifier.fromBase58(contractId), tokenPosition: Number(tokenPosition), authorityId: Identifier.fromBase58(identityId), frozenIdentityId: Identifier.fromBase58(frozenIdentityId), publicNote: publicNote || undefined, identityKey, signer, });

Voting Transitions

sdk.voting.masternodeVote

DPNS Username

Cast a vote for a contested DPNS username

Disabled: Typed v4 masternode voting flow is not covered by a usable voting-key fixture.

masternodeVote(options: wasm.MasternodeVoteOptions): Promise<void>
Parameters
options wasm.MasternodeVoteOptions Required
masternodeProTxHash Identifier Required

The ProTxHash of the masternode.

votePoll VotePoll Required

The vote poll to vote on. Use VotePoll.createContestedDocumentResourceVotePoll() to create.

voteChoice ResourceVoteChoice Required

The vote choice. Use ResourceVoteChoice.towardsIdentity(), ResourceVoteChoice.abstain(), or ResourceVoteChoice.lock().

votingKey IdentityPublicKey Required

The masternode's voting public key. This should be the voting key associated with the masternode.

signer IdentitySigner Required

Signer containing the private key for the masternode's voting key. Use IdentitySigner to add the voting key before calling.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<void>
Example
// Evo SDK example (requires keys/funding) await sdk.voting.masternodeVote({ masternodeProTxHash, votePoll, voteChoice, votingKey, signer })
sdk.voting.masternodeVote

Contested Resource

Cast a vote for contested resources as a masternode

Disabled: Typed v4 masternode voting flow is not covered by a usable voting-key fixture.

masternodeVote(options: wasm.MasternodeVoteOptions): Promise<void>
Parameters
options wasm.MasternodeVoteOptions Required
masternodeProTxHash Identifier Required

The ProTxHash of the masternode.

votePoll VotePoll Required

The vote poll to vote on. Use VotePoll.createContestedDocumentResourceVotePoll() to create.

voteChoice ResourceVoteChoice Required

The vote choice. Use ResourceVoteChoice.towardsIdentity(), ResourceVoteChoice.abstain(), or ResourceVoteChoice.lock().

votingKey IdentityPublicKey Required

The masternode's voting public key. This should be the voting key associated with the masternode.

signer IdentitySigner Required

Signer containing the private key for the masternode's voting key. Use IdentitySigner to add the voting key before calling.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<void>
Example
// Evo SDK example (requires keys/funding) await sdk.voting.masternodeVote({ masternodeProTxHash, votePoll, voteChoice, votingKey, signer })

Platform Address Transitions

sdk.addresses.transfer

Address Transfer

Transfer credits between Platform addresses

transfer(options: wasm.AddressFundsTransferOptions): Promise<Map<string, wasm.PlatformAddressInfo>>
Parameters

- Transfer options including inputs, outputs, and signer

inputs PlatformAddressInput[] Required

Array of input addresses with amounts to spend. Use PlatformAddressInput for typed inputs (nonces fetched automatically).

outputs PlatformAddressOutput[] Required

Array of output addresses with amounts to receive. Use PlatformAddressOutput for typed outputs.

signer PlatformAddressSigner Required

Signer containing private keys for all input addresses. Use PlatformAddressSigner to add keys before calling transfer.

feeStrategy FeeStrategyStep[] Optional

Fee strategy defining how transaction fees are paid. Array of FeeStrategyStep, each specifying to deduct from an input or reduce an output.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<Map<string, wasm.PlatformAddressInfo>>
Example
// Evo SDK example (requires keys/funding) import { PlatformAddressSigner, PrivateKey } from '@dashevo/evo-sdk'; const signer = new PlatformAddressSigner(); const senderAddress = signer.addKey(PrivateKey.fromWIF(addressPrivateKeyWif)); const addressInfo = await sdk.addresses.get(senderAddress); if (!addressInfo) throw new Error('Platform Address is not funded'); const input = { address: senderAddress.toBech32m(network), amount: BigInt(amount) }; const output = { address: recipientAddress, amount: BigInt(amount) }; await sdk.addresses.transfer({ inputs: [input], outputs: [output], signer });
sdk.addresses.topUpIdentity

Top Up Identity from Address

Top up an identity using Platform address credits

topUpIdentity(options: wasm.IdentityTopUpFromAddressesOptions): Promise<wasm.IdentityTopUpFromAddressesResult>
Parameters

- Top up options including identity ID, inputs, and signer

identity Identity Required

The identity to top up.

inputs PlatformAddressInput[] Required

Array of input addresses with amounts to use for top up. Use PlatformAddressInput for typed inputs (nonces fetched automatically).

signer PlatformAddressSigner Required

Signer containing private keys for all input addresses. Use PlatformAddressSigner to add keys before calling top up.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Example
// Evo SDK example (requires keys/funding) const identity = await sdk.identities.fetch(identityId); if (!identity) throw new Error('Identity not found'); import { PlatformAddressSigner, PrivateKey } from '@dashevo/evo-sdk'; const signer = new PlatformAddressSigner(); const senderAddress = signer.addKey(PrivateKey.fromWIF(addressPrivateKeyWif)); const addressInfo = await sdk.addresses.get(senderAddress); if (!addressInfo) throw new Error('Platform Address is not funded'); const input = { address: senderAddress.toBech32m(network), amount: BigInt(amount) }; await sdk.addresses.topUpIdentity({ identity, inputs: [input], signer });
sdk.addresses.withdraw

Withdraw to Core

Withdraw Platform address credits to Dash Core

withdraw(options: wasm.AddressFundsWithdrawOptions): Promise<Map<string, wasm.PlatformAddressInfo>>
Parameters

- Withdrawal options including inputs, output script, pooling, and signer

inputs PlatformAddressInput[] Required

Array of input addresses with amounts to withdraw. Use PlatformAddressInput for typed inputs (nonces fetched automatically).

changeOutput PlatformAddressOutput Optional

Optional change output address and amount. If provided, specifies where to send any change from the withdrawal.

feeStrategy FeeStrategyStep[] Optional

Fee strategy defining how transaction fees are paid. Array of FeeStrategyStep, each specifying to deduct from an input or reduce an output.

coreFeePerByte number Required

Core (L1) fee per byte for the withdrawal transaction. This determines the mining fee for the Core blockchain transaction.

pooling Pooling Required

Pooling strategy for the withdrawal. - Pooling.Never: Create individual withdrawal transaction - Pooling.IfAvailable: Join pool if available, otherwise individual - Pooling.Standard: Wait to join pool (may take longer)

outputScript CoreScript Required

Core output script specifying the L1 destination address. Use CoreScript.newP2PKH() or CoreScript.newP2SH() to create.

signer PlatformAddressSigner Required

Signer containing private keys for all input addresses. Use PlatformAddressSigner to add keys before calling withdraw.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<Map<string, wasm.PlatformAddressInfo>>
Example
// Evo SDK example (requires keys/funding) import { PlatformAddressSigner, PrivateKey } from '@dashevo/evo-sdk'; const signer = new PlatformAddressSigner(); const senderAddress = signer.addKey(PrivateKey.fromWIF(addressPrivateKeyWif)); const addressInfo = await sdk.addresses.get(senderAddress); if (!addressInfo) throw new Error('Platform Address is not funded'); const input = { address: senderAddress.toBech32m(network), amount: BigInt(amount) }; import { CoreScript, PoolingWasm, wallet } from '@dashevo/evo-sdk'; const BASE58_ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'; async function coreScriptFromAddress(address) { if (!await wallet.validateAddress(address, network)) throw new Error('Dash Core address is invalid for the selected network'); let value = 0n; for (const character of address) { value = value * 58n + BigInt(BASE58_ALPHABET.indexOf(character)); } const decoded = []; while (value > 0n) { decoded.unshift(Number(value & 255n)); value >>= 8n; } for (const character of address) { if (character !== '1') break; decoded.unshift(0); } const payload = Uint8Array.from(decoded.slice(0, 21)); const hash = payload.slice(1); if ([0x4c, 0x8c].includes(payload[0])) return CoreScript.fromP2PKH(hash); if ([0x10, 0x13].includes(payload[0])) return CoreScript.fromP2SH(hash); throw new Error('Unsupported Dash Core address version'); } const outputScript = await coreScriptFromAddress(toAddress); const parsedCoreFeePerByte = coreFeePerByte == null || coreFeePerByte === '' ? 1 : Number(coreFeePerByte); if (!Number.isSafeInteger(parsedCoreFeePerByte) || parsedCoreFeePerByte < 0 || parsedCoreFeePerByte > 0xffffffff) throw new Error('Core fee per byte must be an unsigned 32-bit integer'); await sdk.addresses.withdraw({ inputs: [input], coreFeePerByte: parsedCoreFeePerByte, pooling: PoolingWasm.Never, outputScript, signer });
sdk.addresses.transferFromIdentity

Transfer from Identity to Address

Transfer credits from an identity to Platform addresses

transferFromIdentity(options: wasm.IdentityTransferToAddressesOptions): Promise<wasm.IdentityTransferToAddressesResult>
Parameters

- Transfer options including identity ID, outputs, and signer

identity Identity Required

The identity to transfer credits from.

outputs PlatformAddressOutput[] Required

Array of output addresses with amounts to receive. Use PlatformAddressOutput for typed outputs.

signer IdentitySigner Required

Signer containing the private key(s) for signing with identity transfer key(s). Use IdentitySigner to add keys before calling transfer.

signingTransferKeyId number Optional

Optional key ID to use for signing. If not specified, will auto-select a matching transfer key.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Example
// Evo SDK example (requires keys/funding) import { IdentitySigner } from '@dashevo/evo-sdk'; const identity = await sdk.identities.fetch(identityId); if (!identity) throw new Error('Identity not found'); const outputs = [{ address: recipientAddress, amount: BigInt(amount) }]; const signer = new IdentitySigner(); signer.addKeyFromWif(privateKeyWif); await sdk.addresses.transferFromIdentity({ identity, outputs, signer });
sdk.addresses.fundFromAssetLock

Fund Address from Asset Lock

Fund Platform addresses from an asset lock

fundFromAssetLock(options: wasm.AddressFundingFromAssetLockOptions): Promise<Map<string, wasm.PlatformAddressInfo>>
Parameters

- Funding options including asset lock proof, outputs, and signer

assetLockProof AssetLockProof Required

Asset lock proof from the Core chain. Use AssetLockProof.createInstantAssetLockProof() or AssetLockProof.createChainAssetLockProof().

assetLockPrivateKey PrivateKey Required

Private key for signing the asset lock proof. This is the private key that controls the asset lock output.

outputs PlatformAddressOutput[] Required

Array of output addresses with amounts to fund. Use PlatformAddressOutput for typed outputs.

signer PlatformAddressSigner Required

Signer containing private keys for all output addresses. Use PlatformAddressSigner to add keys before calling fund.

feeStrategy FeeStrategyStep[] Optional

Fee strategy defining how transaction fees are paid. Array of FeeStrategyStep, each specifying to deduct from an input or reduce an output.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Returns
Promise<Map<string, wasm.PlatformAddressInfo>>
Example
// Evo SDK example (requires keys/funding) import { AssetLockProof, FeeStrategyStep, PlatformAddressSigner, PrivateKey } from '@dashevo/evo-sdk'; const assetLockProof = AssetLockProof.fromHex(assetLockProofHex); const assetLockPrivateKey = PrivateKey.fromWIF(assetLockPrivateKeyWif); const signer = new PlatformAddressSigner(); signer.addKey(PrivateKey.fromWIF(addressPrivateKeyWif)); const outputs = [{ address: recipientAddress }]; const feeStrategy = [FeeStrategyStep.reduceOutput(0)]; await sdk.addresses.fundFromAssetLock({ assetLockProof, assetLockPrivateKey, outputs, feeStrategy, signer });
sdk.addresses.createIdentity

Create Identity from Address

Create a new identity funded from Platform addresses

createIdentity(options: wasm.IdentityCreateFromAddressesOptions): Promise<wasm.IdentityCreateFromAddressesResult>
Parameters

- Creation options including identity, inputs, and signers

identity Identity Required

The identity to create (with public keys set up). Use Identity.create() to build the identity structure first.

inputs PlatformAddressInput[] Required

Array of input addresses with amounts to use for funding. Use PlatformAddressInput for typed inputs (nonces fetched automatically).

changeOutput PlatformAddressOutput Optional

Optional change output address and amount. If provided, remaining credits will be sent to this address.

identitySigner IdentitySigner Required

Signer containing private keys for the identity's public keys. Use IdentitySigner to add keys for signing identity key proofs.

addressSigner PlatformAddressSigner Required

Signer containing private keys for all input addresses. Use PlatformAddressSigner to add keys for signing address inputs.

settings PutSettings Optional

Optional settings for the broadcast operation. Includes retries, timeouts, userFeeIncrease, etc.

Example
// Evo SDK example (requires keys/funding) import { Identifier, Identity, IdentityPublicKeyInCreation, IdentitySigner, KeyType, PlatformAddressSigner, PrivateKey, Purpose, SecurityLevel } from '@dashevo/evo-sdk'; const identityPrivateKey = PrivateKey.fromWIF(identityPrivateKeyWif); const identity = new Identity(Identifier.fromBytes(crypto.getRandomValues(new Uint8Array(32)))); const identityPublicKey = new IdentityPublicKeyInCreation({ keyId: 0, purpose: Purpose.AUTHENTICATION, securityLevel: SecurityLevel.MASTER, keyType: KeyType.ECDSA_SECP256K1, data: identityPrivateKey.getPublicKey().toBytes() }).toIdentityPublicKey(); identity.addPublicKey(identityPublicKey); const addressSigner = new PlatformAddressSigner(); const derivedAddress = addressSigner.addKey(PrivateKey.fromWIF(addressPrivateKeyWif)); const inputs = [{ address: derivedAddress.toBech32m(network), amount: BigInt(amount) }]; const identitySigner = new IdentitySigner(); identitySigner.addKey(identityPrivateKey); await sdk.addresses.createIdentity({ identity, inputs, identitySigner, addressSigner });