Transaction Examples

Transfer tokens & NFTs, manage account resources, and Interact with smart contracts

Sample Transactions (grouped by blockchain type)

Algorand

EOSIO

EVM

Using the samples

The code snippets in this section are passed into the createTransaction function as the transactionvalue.

const transaction = await oreId.createTransaction({
    chainAccount: signingAccount.chainAccount, // use account that was logged in
    chainNetwork: signingAccount.chainNetwork,
    transaction: transactionExample // txn samples passed in here
    signOptions: {
        broadcast: true,
        returnSignedTransaction: false,
    },
});

Signing the transaction and broadcasting to the blockchain for fulfillment is simple when using the ORE ID WebPopup.

oreId.popup
    .sign({ transaction })
    .then( onSuccess )
    .catch( onError );

The transactionExample can be also be encoded in base64 and submitted to the ORE ID API for signing and sending.

Submit a transaction to sign and/or broadcast.

POST https://service.oreid.io/api/transaction/sign

Headers

NameTypeDescription

api-key*

String

ORE ID dApp service key or api key.

Request Body

NameTypeDescription

account*

String

ORE ID User ID of the user performing the transaction.

chain_account*

String

Blockchain wallet performing the transaction.

chain_network*

String

Blockchain network of the transaction.

transaction

String

Base64 encoded transaction.

signed_transaction

String

Base64 encoded transaction containing at least one signature.

user_password*

String

Password used when creating the account.

broadcast

Boolean

Submit to the blockchain for fulfillment if true. Defaults to true.

return_signed_transaction

Boolean

Returns the signed transaction in the response. Defaults to true.

expire_seconds

Integer

Overrides default transaction timout of 3000 (5 Mins.).

{
    "processId":"daa0...fcb88",
    "transaction_id":"acad...e0364985ad513",
    "signed_transaction":{"actions":[...]}
}

Last updated