-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Chun Lam edited this page Apr 3, 2024
·
4 revisions
ProximaX Blockchain SDK for Typescript Javascript
checkout Examples
Starting at v0.11.0, this SDK will support newer Sirius Chain transaction type. You will need to specify account is of version 1 or 2, different account version will use different Derivation Scheme which result in different public key, address and signature.
Account Version | Derivation Scheme |
---|---|
1 | Ed25519Sha3 |
2 | Ed25519Sha2 |
// Account and PublicAccount
// you can create account with v1 or v2, account existing previously is v1
// account and publicAccount must specify version to be able to verify signature, so it affect cosignature and encrypt/decrypt messsage.
// sign transaction
<Transasction>.signWith
<Account>.sign
// cosign transaction
<Account>.signCosignatureTransaction
// to aggregate transaction, public account must specify version
<Transasction>.toAggregate
// use aggregate complete/ bonded V2 instead of v1
<TransactionBuilderFactory>.aggregateComplete
<TransactionBuilderFactory>.aggregateBonded
AggregateTransaction.createComplete
AggregateTransaction.createBonded
// AggregateTransaction sign and cosign
<AggregateTransaction>.signTransactionWithCosignatories
<AggregateTransaction>.signTransactionGivenSignatures
// AggregateTransactionService
AggregateTransactionService.addCosignatures
v0.10.x will be LTS version to support the Sirius Chain before the upgrade.
// Account and PublicAccount
// please set all account and public account to version 1
// sign transaction
<Transasction>.preV2SignWith
<Account>.preV2Sign
// cosign transaction
<Account>.preV2SignCosignatureTransaction
// to aggregate transaction
<Transasction>.toAggregateV1
// use aggregate complete/ bonded V1
<TransactionBuilderFactory>.aggregateCompleteV1
<TransactionBuilderFactory>.aggregateBondedV1
AggregateTransaction.createCompleteV1
AggregateTransaction.createBondedV1
// AggregateTransaction sign and cosign
<AggregateTransaction>.signTransactionWithCosignatoriesV1
<AggregateTransaction>.signTransactionGivenSignaturesV1
// AggregateTransactionService
AggregateTransactionService.addCosignaturesV1