- Source:
Example
const cosmicLink = new CosmicLink({ memo: 'Donation', maxDate: 2019 })
.addOperation('payment', { destination: 'tips*cosmic.link', amount: 10 })
await cosmicLink.lock({ network: 'test', source: 'myaddress*example.org' })
console.log(cosmicLink.transaction.signers)
console.log(cosmicLink.transaction.hasSigner(GB...DXEZ))
Members
signers :Object
A table of the signers for each transaction source.
- Source:
Type:
-
Object
signersList :Array
A list of the legit signers for the transaction.
- Source:
Type:
-
Array
sources :Array
A list of the sources involved in the transaction.
- Source:
Type:
-
Array
Methods
hasSigned(accountId) → {boolean}
Tests if accountId has signed the transaction.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
accountId |
string
|
Returns:
- Type:
-
boolean
Example
if (transaction.hasSigned(GB...DEZX)) console.log('Has signed')
hasSigner(accountId) → {boolean}
Tests if accountId is a legit signer for the transaction.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
accountId |
string
|
Returns:
- Type:
-
boolean
Example
if (transaction.hasSigner(GB...DEZX)) console.log('Legit signer')