Aptos

Aptos supports the following signature kinds:

  • Transaction, unsigned transaction.

Transaction

Signs an unsigned transaction in BCS format.

Field
Description
Type - Optional

blockchainKind

Aptos

String

kind

Transaction

String

transaction

The unsigned BCS format transaction in hex encoding. More details bellow.

String

{
  "blockchainKind": "Aptos",
  "kind": "Transaction",
  "transaction": "0xc5510ac408dcb78034b4fdcdaea6582c10f2e0d03dc684d32f9457b9d778e113020000000000000002000000000000000000000000000000000000000000000000000000000000000104636f696e087472616e73666572010700000000000000000000000000000000000000000000000000000000000000010a6170746f735f636f696e094170746f73436f696e0002205bdc24cb9033286ffe19f436145b9e2267dd03b0fd0d422459d381a6431d39ba080100000000000000400d0300000000006400000000000000cce1f2670000000002"
}

Transaction Format

We accept two transaction kinds to be signed:

  • RawTransactionarrow-up-right, this is the simplest transaction, no external fee payer, no secondary signers.

  • SignedTransactionarrow-up-right, for more complex transaction, you can pass a SignedTransaction that will contains the RawTransaction and an authenticator depending on the transaction. Accepted authenticator are:

    • TransactionAuthenticatorFeePayer for sponsored transactions (single/multi sig)

    • TransactionAuthenticatorMultiAgent for multi signature transactions (not sponsored)

All the passed transactions should be BCSarrow-up-right serialized and in hex encoding.

You can find advanced transaction constructs in our Dfns TypeScript SDKarrow-up-right.

Typescript Example with Aptos SDK

First install the Aptos SDK. You can find the source code here: https://github.com/aptos-labs/aptos-ts-sdkarrow-up-right

Here a code sample to generate a signature for a basic transaction via the Dfns TypeScript SDKarrow-up-right:

Last updated