Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ URLTokenBaseHTTPClient.constructor

#### Defined in

node_modules/algosdk/dist/types/client/urlTokenBaseHTTPClient.d.ts:27
node_modules/algosdk/types/client/urlTokenBaseHTTPClient.d.ts:27

## Properties

Expand Down
16 changes: 8 additions & 8 deletions docs/code/classes/types_app_arc56.Arc56Method.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ algosdk.ABIMethod.description

#### Defined in

node_modules/algosdk/dist/types/abi/method.d.ts:28
node_modules/algosdk/types/abi/method.d.ts:28

___

Expand All @@ -100,7 +100,7 @@ algosdk.ABIMethod.events

#### Defined in

node_modules/algosdk/dist/types/abi/method.d.ts:38
node_modules/algosdk/types/abi/method.d.ts:38

___

Expand All @@ -124,7 +124,7 @@ algosdk.ABIMethod.name

#### Defined in

node_modules/algosdk/dist/types/abi/method.d.ts:27
node_modules/algosdk/types/abi/method.d.ts:27

___

Expand All @@ -138,7 +138,7 @@ algosdk.ABIMethod.readonly

#### Defined in

node_modules/algosdk/dist/types/abi/method.d.ts:39
node_modules/algosdk/types/abi/method.d.ts:39

___

Expand Down Expand Up @@ -178,7 +178,7 @@ algosdk.ABIMethod.getSelector

#### Defined in

node_modules/algosdk/dist/types/abi/method.d.ts:42
node_modules/algosdk/types/abi/method.d.ts:42

___

Expand All @@ -196,7 +196,7 @@ algosdk.ABIMethod.getSignature

#### Defined in

node_modules/algosdk/dist/types/abi/method.d.ts:41
node_modules/algosdk/types/abi/method.d.ts:41

___

Expand Down Expand Up @@ -232,7 +232,7 @@ algosdk.ABIMethod.txnCount

#### Defined in

node_modules/algosdk/dist/types/abi/method.d.ts:43
node_modules/algosdk/types/abi/method.d.ts:43

___

Expand All @@ -256,4 +256,4 @@ algosdk.ABIMethod.fromSignature

#### Defined in

node_modules/algosdk/dist/types/abi/method.d.ts:45
node_modules/algosdk/types/abi/method.d.ts:45
40 changes: 40 additions & 0 deletions src/types/account-manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,44 @@ describe('AccountManager', () => {
expect(accountInfo.address.toString()).toBe(rekeyed.addr.toString())
expect(accountInfo.authAddr!.toString()).toBe(rekeyTo.addr.toString())
}, 10e6)

test('Logicsig account lmsig signing is supported', async () => {
const { algorand, generateAccount, testAccount } = localnet.context
const account1 = await generateAccount({ initialFunds: algo(1) })
const account2 = await generateAccount({ initialFunds: algo(1) })
const account3 = await generateAccount({ initialFunds: algo(1) })

// Setup the multisig delegated logicsig
const lsigAccount = new algosdk.LogicSigAccount(
Uint8Array.from([1, 32, 1, 1, 34]), // int 1
[Uint8Array.from([1]), Uint8Array.from([2, 3])],
)
lsigAccount.signMultisig(
{
version: 1,
threshold: 2,
addrs: [account1.addr, account2.addr, account3.addr],
} satisfies algosdk.MultisigMetadata,
account1.sk,
) // Make a 2 of 3 multisig delegated logicsig and sign with the first account
lsigAccount.appendToMultisig(account2.sk) // sign with the second account
await localnet.algorand.account.ensureFunded(lsigAccount.address(), testAccount, algo(1)) // Fund the lsig account

algorand.setSignerFromAccount(lsigAccount)

const result = await algorand.send.payment({
sender: lsigAccount.address(),
receiver: testAccount.addr,
amount: algo(0.1),
})

expect(result.confirmation.txn.lsig?.msig).toBeUndefined()
expect(result.confirmation.txn.lsig?.lmsig).toBeDefined()
expect(result.confirmation.txn.lsig?.lmsig?.thr).toBe(2)
expect(result.confirmation.txn.lsig?.lmsig?.v).toBe(1)
expect(result.confirmation.txn.lsig?.lmsig?.subsig.length).toBe(3)
expect(result.confirmation.txn.lsig?.lmsig?.subsig[0].s).toBeDefined()
expect(result.confirmation.txn.lsig?.lmsig?.subsig[1].s).toBeDefined()
expect(result.confirmation.txn.lsig?.lmsig?.subsig[2].s).toBeUndefined()
})
})