mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-25 14:15:50 +00:00
Migrate code snippets from xrpl.js and xrpl-py
This commit is contained in:
@@ -22,6 +22,7 @@ async function multisigning(): Promise<void> {
|
||||
const { wallet: wallet1 } = await client.fundWallet()
|
||||
const { wallet: wallet2 } = await client.fundWallet()
|
||||
const { wallet: walletMaster } = await client.fundWallet()
|
||||
|
||||
const signerListSet: SignerListSet = {
|
||||
TransactionType: 'SignerListSet',
|
||||
Account: walletMaster.classicAddress,
|
||||
@@ -56,9 +57,14 @@ async function multisigning(): Promise<void> {
|
||||
const accountSetTx = await client.autofill(accountSet, 2)
|
||||
console.log('AccountSet transaction is ready to be multisigned:')
|
||||
console.log(accountSetTx)
|
||||
|
||||
const { tx_blob: tx_blob1 } = wallet1.sign(accountSetTx, true)
|
||||
const { tx_blob: tx_blob2 } = wallet2.sign(accountSetTx, true)
|
||||
const multisignedTx = multisign([tx_blob1, tx_blob2])
|
||||
|
||||
console.log("Successfully multisigned the transaction")
|
||||
console.log(multisignedTx)
|
||||
|
||||
const submitResponse = await client.submit(multisignedTx)
|
||||
|
||||
if (submitResponse.result.engine_result === 'tesSUCCESS') {
|
||||
@@ -79,4 +85,4 @@ async function multisigning(): Promise<void> {
|
||||
await client.disconnect()
|
||||
}
|
||||
|
||||
void multisigning()
|
||||
void multisigning()
|
||||
|
||||
Reference in New Issue
Block a user