canton-network-docs/Release NotesWallet SDK
0.7.0
0.7.0
Release on September 18th, 2025
- Important!: scan api is not longer used for methods like
connectTopology use scan proxy instead
- Added support for multi-hosting a party upon creation against multiple validators
// setup config against multiple nodes to acquire signature
const multiHostedParticipantEndpointConfig = [
{
adminApiUrl: '127.0.0.1:2902',
baseUrl: new URL('http://127.0.0.1:2975'),
accessToken: adminToken.accessToken,
},
{
adminApiUrl: '127.0.0.1:3902',
baseUrl: new URL('http://127.0.0.1:3975'),
accessToken: adminToken.accessToken,
},
]
const participantIdPromises = multiHostedParticipantEndpointConfig.map(
async (endpoint) => {
return await sdk.topology?.getParticipantId(endpoint)
}
)
const participantIds = await Promise.all(participantIdPromises)
const participantPermissionMap = new Map<string, Enums_ParticipantPermission>()
// decide on Permission for each participant
participantIds.map((pId) =>
participantPermissionMap.set(pId!, Enums_ParticipantPermission.CONFIRMATION)
)
// setup multi-hosting for a party against
await sdk.topology?.prepareSignAndSubmitMultiHostExternalParty(
multiHostedParticipantEndpointConfig,
multiHostedParty.privateKey,
synchronizerId,
participantPermissionMap,
'bob'
)
- Verify signed transaction hash
we have also extended the executeSubmission and prepareSignAndExecuteTransaction to validate the hash before transmitting to the ledger
const hash = 'my-transaction-hash'
const publicKey = 'my-public-key'
const signature = 'my-signed-hash-with-private-key'
const isValid = sdk.userLedger?.verifyTxHash(hash, publicKey, signature)
- wait for command completion
//it is recommended to fetch ledger offset before preparing your command
const offsetLatest = (await sdk.userLedger?.ledgerEnd())?.offset ?? 0
const transferCommandId =
// prepareSignAndExecuteTransaction & prepareSign now returns the commandId
await sdk.userLedger?.prepareSignAndExecuteTransaction(
[{ ExerciseCommand: transferCommand }],
keyPairSender.privateKey,
v4(),
disclosedContracts2
)
//new command that scans the ledger to ensure the command have completed
const completion = await sdk.userLedger?.waitForCompletion(
offsetLatest, //where to start from
5000, //optional timeout in ms
transferCommandId! //the command to look for
)
- Added new endpoint to quickly fetch all pending 2-step incoming transfer to easily accept or reject
const pendingInstructions = await sdk.tokenStandard?.fetchPendingTransferInstructionView()
const [acceptTransferCommand, disclosedContracts3] =
await sdk.tokenStandard!.exerciseTransferInstructionChoice(
transferCid,
'Accept'
)
- optional expiry date for create transfer
const [transferCommand, disclosedContracts2] =
await sdk.tokenStandard!.createTransfer(
sender!.partyId,
receiver!.partyId,
'100',
{
instrumentId: 'Amulet',
instrumentAdmin: instrumentAdminPartyId,
},
utxos?.map((t) => t.contractId),
'memo-ref',
new Date(Date.now()+60*1000) // custom expiry of 1 hour
// default is 24 hours
)
- fetch transaction by update id
// convenient new endpoint to get transaction based on update id
// this will come out in same format as listHoldingTransactions
sdk.tokenStandard?.getTransactionById('my-update-id')
- The access token generated by the authController is now correctly passed to the scan proxy and registry