DecentralChainDecentralChain
  • Technologysubmenu
    Why DecentralChainWhat sets this chain apartHow the chain worksPublic blocks, public validatorsBlockchain featuresWhat is on, what is being voted onFinalityThe rollback bound, and what is unverifiedRIDEContracts that cannot run foreverFor machinesUnsigned transactions and RIDE in processSolana bridgePhantom and Solflare, mainnet onlyNetwork statusHeight, sync and peers, read live
  • Ecosystemsubmenu
    DCC public saleOpens 26 SeptemberDecentralCoinSupply, allocation and tokenomicsDecentral.ExchangeexternalDecentralPropDecentralScansoonCubensis ConnectDecentralAmericasoon
  • Developerssubmenu
    QuickstartRead, compile and composeREST APIEvery endpoint, no key, no accountSDK packages19 on npm, 5 in the workspaceSigningAuthorising without custodyMCP & AgentsThe chain, and the tools we have builtDecentralChain NodeRun a validator, and what LPoS pays
  • Communitysubmenu
    ChannelsTelegram, X and the reposDCC AirdropAllocated, not yet arrangedGovernanceWho can actually decide anythingBrand kitThe mark, and how to use it
  • Documentation
XGitHub
Start buildingarrow
DecentralChainDecentralChain

An open Layer-1 with Leased Proof of Stake.

Native token: DecentralCoin (DCC)

Fixed supply 100,000,000 DCC
Minted at genesis, never inflated

  • X
  • GitHub
  • Telegram

Build

  • Quickstart
  • REST API
  • SDK packages
  • Signing
  • MCP & Agents
  • Documentation

Ecosystem

  • DCC public sale
  • DecentralCoin
  • Decentral.Exchange
  • DecentralProp
  • DecentralSwap
  • Cubensis Connect

Network

  • Blockchain features
  • Finality
  • RIDE
  • Solana bridge
  • Run a node
  • Network status

Project

  • Community
  • DCC Airdrop
  • Governance
  • Brand kit
  • GitHub
mainnetHeight—Node—read from your browser
© 2026 DecentralChainOperated by DecentralExchange · Cédula Jurídica 3-102-956858
Jacó, Garabito, Costa Rica
TermsPrivacySecurityLicensingdecentralchain.io
Documentation/RIDE language

Structures

RIDE language

  • Syntax Basics
  • Data Types
  • Functions
  • Script Types
  • Structures
  • Iterations with FOLD<N>
  • dApp-to-App Invocation

All structures in Ride are built-in — you cannot create your own structures. All structures have constructors.

Let's see an example of a code that creates an instance of the IntegerEntry structure and reads its key and value:

let data = IntegerEntry("Age", 33)
let key  = data.key
let val = data.value

Script Actions

Script actions are executed, that is, they make changes on the blockchain only if they are included in the resulting expression of the callable function. See more details in the callable function article.

Script Actions
ActionDescription
BinaryEntryAdd or modify a binary entry of the account data storage.
BooleanEntryAdd or modify a boolean entry.
BurnBurn a token.
DeleteEntryDelete an entry.
IntegerEntryAdd or modify an integer entry.
IssueIssue a token.
LeaseLease.
LeaseCancelCancel lease.
ReissueReissue a token.
ScriptTransferTransfer a token.
SponsorFeeSet up a sponsorship.
StringEntryAdd or modify a string entry.

Available script actions depend on the standard library version used.

BinaryEntry

BinaryEntry is a structure that sets key and value of binary entry account data storage. Adding or changing an entry is performed only if the structure is included in the callable function result>`.

Constructor

BinaryEntry(key: String, value: ByteVector)

Fields

BinaryEntry Fields
#NameData typeDescription
1keyStringEntry key. The maximum size is 400 bytes.
2valueByteVectorEntry value. The maximum size is 5 Kbytes.

BooleanEntry

BooleanEntry is a structure that sets the key and value of the account data storage boolean entry. Adding or changing an entry is performed only if the structure is included in the callable function result>`.

Constructor

BooleanEntry(key: String, value: Boolean)

Fields

BooleanEntry Fields
#NameData typeDescription
1keyStringEntry key. The maximum size is 400 bytes.
2valueBooleanEntry value.

Burn

Burn is a structure that sets the parameters of the token burning. The token burning is performed only if the structure is included in the callable function result>`. If the token is a smart asset, the asset script verifies the Burn action as if it were BurnTransaction with the fee of 0 and the version of 0. If the asset script denies the action, then the transaction that invoked the dApp script is either denied or saved on the blockchain as failed, see the transaction validation.

Constructor

Burn(assetId: ByteVector, quantity: Int)

Fields

Burn Fields
#NameData typeDescription
1assetIdByteVectorID of the token to burn.
2quantityIntAmount of the token.

DeleteEntry

DeleteEntry is a structure that sets the parameters of deletion of entry from the account data storage. Deleting an entry is performed only if the structure is included in the callable function result>`.

Constructor

DeleteEntry(key: String)

Fields

DeleteEntry Fields
#NameData typeDescription
1keyStringEntry key. The maximum size is 400 bytes.

Example

{-# STDLIB_VERSION 5 #-}
{-# SCRIPT_TYPE ACCOUNT #-}
   
@Callable(inv)
func default() = {
 (
   [
     DeleteEntry(inv.caller.toString())
   ],
   unit
 )
}

IntegerEntry

IntegerEntry is a structure that sets the key and value of account data storage integer entry. Adding or changing an entry is performed only if the structure is included in the callable function result>`.

Constructor

IntegerEntry(key: String, value: Int)

Fields

IntegerEntry Fields
#NameData typeDescription
1keyStringEntry key. The maximum size is 400 bytes.
2valueIntEntry value.

Issue

Issue is a structure that sets the parameters of the token issue. The token issue is performed only if the structure is included in the callable function result>`. The minimum fee for an invoke script transaction is increased by 1 DecentralCoin for each issued asset that is not NFT. You can get the ID of the issued token using the calculateAssetId function.

Constructor

Issue(name: String, description: String, quantity: Int, decimals: Int, isReissuable: Boolean, compiledScript: Script|Unit, nonce: Int)

or

Issue(name: String, description: String, quantity: Int, decimals: Int, isReissuable: Boolean) 

In the second case, compiledScript = unit and nonce = 0 values are inserted automatically.

Fields

Issue Fields
#NameData typeDescription
1nameStringToken name.
2descriptionStringToken description.
3quantityIntAmount of the token. Set to 1 for NFT.
4decimalsIntNumber of digits in decimal part. Set to 0 for NFT.
5isReissuableBooleanReissue ability flag. Set to 0 for NFT.
6compiledScriptScript | UnitSet it to unit. Smart asset issue is currently unavailable.
7nonceIntNonce that is used for token ID generation. If the callable function issues several tokens with the same parameters, you should use different nonce.

Example

Regular Token Issue

Issue("RegularToken", "This is an ordinary token", 10000, 2, true)

The structure sets the following parameters of token:

  • Name: RegularToken
  • Description: This is an ordinary token
  • Amount of tokens to issue: 100 (value of 10 000 is specified in the minimum fraction — “cents”)
  • Amount of decimals: 2
  • Reissue ability: yes

Multiple Token Issue

(
 [
   Issue("RegularToken", "This is an ordinary token", 10000, 2, true, unit, 0),
   Issue("RegularToken", "This is an ordinary token", 10000, 2, true, unit, 1)
 ],
 unit
)

NFT Issue

Issue("UberToken", "The ultimate token.", 1, 0, false)

The structure sets the following parameters of token:

  • Name: UberToken
  • Description: The ultimate token.
  • Amount of tokens to issue: 1
  • Amount of decimals: 0
  • Reissue ability: no

Lease

Lease is a structure that sets the lease parameters. The lease is performed only if the structure is included in the callable function result>`. More about lease. You can get the lease ID using the calculateLeaseId function.

Constructor

Lease(recipient: Address|Alias, amount: Int, nonce: Int)

or

Lease(recipient: Address|Alias, amount: Int) 

In the second case, nonce = 0 is inserted automatically.

Fields

Lease Fields
#NameData typeDescription
1recipientAddress | AliasLessee address or alias.
2amountIntAmount of DecentralCoins to lease (that is, amount of Decentralites multiplied by 10^{8}).
7nonceIntNonce that is used for lease ID generation. If the callable function creates several leases with the same parameters, you should use different nonces.

Example

{-# STDLIB_VERSION 5 #-}
{-# CONTENT_TYPE DAPP #-}
{-# SCRIPT_TYPE ACCOUNT #-}
 
@Callable(i)
func foo() = {
 let lease = Lease(Alias("merry"),100000000)
 let id = calculateLeaseId(lease)
 (
   [
     lease,
     BinaryEntry("lease", id)
   ],
   unit
 )
}

LeaseCancel

LeaseCancel is a structure that sets the lease cancellation parameters. The lease cancellation is performed only if the structure is included in the callable function result>`.

Constructor

LeaseCancel(leaseId: ByteVector)

Fields

LeaseCancel Fields
#NameData typeDescription
1leaseIdByteVectorLease ID

Reissue

Reissue is a structure that sets the parameters of the token reissue. The token reissue is performed only if the structure is included in the callable function result>`. The token reissue is only available for an asset that is issued by a dApp account. If the token is a smart asset, the asset script verifies the Reissue action as if it were ReissueTransaction with the fee of 0 and the version of 0. If the asset script denies the action, then the transaction that invoked the dApp script is either denied or saved on the blockchain as failed, see the transaction validation.

Constructor

Reissue(assetId: ByteVector, quantity: Int, isReissuable: Boolean)

Fields

Reissue Fields
#NameData typeDescription
1assetIdByteVectorID of the token to reissue.
2quantityIntAmount of the token.
3isReissuableBooleanReissue ability flag.

ScriptTransfer

ScriptTransfer is a structure that sets the parameters of the token transfer. The token transfer is performed only if the structure is included in the callable function result>`. If the token is a smart asset, the asset script verifies the ScriptTransfer action as if it were TransferTransaction with the fee of 0 and the version of 0. If the asset script denies the action, then the transaction that invoked the dApp script is either denied or saved on the blockchain as failed, see the transaction validation.

Constructor

ScriptTransfer(recipient: Address|Alias, amount: Int, asset: ByteVector|Unit)

Fields

ScriptTransfer Fields
#NameData typeDescription
1recipientAddress | Aliasaddress or the alias of a recipient of tokens.
2amountIntNumber of tokens.
3assetByteVector | UnitID of the token.

SponsorFee

SponsorFee is a structure that sets up sponsorship. For information about sponsorship, see the sponsored fee article. The sponsorship setup is performed only if the structure is included in the resulting expression of the callable function. See details in the callable function article. The sponsorship setup is only available if the asset is issued by a dApp account (by the same script invocation as well) and is not a smart asset.

Constructor

SponsorFee(assetId: ByteVector, minSponsoredAssetFee: Int|Unit)

Fields

SponsorFee Fields
#NameData typeDescription
1assetIdByteVectorAsset ID
2minSponsoredAssetFeeByteVector | UnitAmount of sponsored asset that is equivalent to 0.001 DecentralCoins, specified in the minimum fraction (“cent”) of the sponsored asset. unit — disable the sponsorship.

Example

{-# STDLIB_VERSION 5 #-}
{-# CONTENT_TYPE DAPP #-}
{-# SCRIPT_TYPE ACCOUNT #-}
 
@Callable(i)
func issueAndSponsor() = {
 let issue = Issue("Spring", "", 100000, 2, true, unit, 0)
 let id = calculateAssetId(issue)
 (
   [
     issue,
     SponsorFee(id, 300)
   ],
   unit
 )
}

The issueAndSponsor callable function issues an asset and enables sponsorship. The minimum fee in sponsored assets is 3 Spring.

StringEntry

StringEntry is a structure that sets key and value of account data storage string entry. Adding or changing an entry is performed only if the structure is included in the callable function result>`.

Constructor

BinaryEntry(key: String, value: String)

Fields

StringEntry Fields
#NameData typeDescription
1keyStringEntry key. The maximum size is 400 bytes.
2valueStringEntry value. The maximum size is 5 Kbytes.

Common Structures

Common Structures
NameDescription
AddressAccount address.
AliasAlias.
AssetToken info.
AssetPairPair of tokens of an order within the order structure.
AttachedPaymentPayment attached to the script invocation and available to the callable function.
BalanceDetailsAccount balance in DecentralCoins.
BlockInfoBlock header.
InvocationScript invocation fields that the callable function can use.
OrderOrder
TransferTransfer within the MassTransferTransaction structure.

Address

Structure of an address.

Constructor

Address(bytes: ByteVector)

Fields

Address Fields
#NameData typeDescription
1bytesByteVectorArray of bytes of the address.

Example

Get all types of balance in DecentralCoins for the current account (in a dApp script or an account script):

decentralchainBalance(this)

For any account:

let address=base58'3N4iKL6ikwxiL7yNvWQmw7rg3wGna8uL6LU'
decentralchainBalance(Address(address))

Get an entry value by key from the account data storage:

let address2=base58'3N6dFJ6XBQsWz1VV1i5aW4CyYpVKc39MUGZ'
getBoolean(Address(address2),"allow_orders")

Convert the address that invoked the function to a base58 string:

{-# STDLIB_VERSION 5 #-}
{-# CONTENT_TYPE DAPP #-}
{-# SCRIPT_TYPE ACCOUNT #-}

@Callable(i)
func foo(question: String) = {
 let callerAddress = toBase58String(i.caller.bytes)
 ...
}

Check the recipient's address in the transfer transaction:

{-# STDLIB_VERSION 5 #-}
{-# CONTENT_TYPE EXPRESSION #-}
{-# SCRIPT_TYPE ACCOUNT #-}

# Bank dApp address
let BANK = base58'3MpFRn3X9ZqcLimFoqNeZwPBnwP7Br5Fmgs'

match (tx) {
 case t: TransferTransaction => addressFromRecipient(t.recipient).bytes == BANK
 case _ => false
}

Alias

Structure of an alias.

Constructor

Alias(alias: String)

Fields

Alias Fields
#NameData typeDescription
1aliasStringAlias

Example

let alias = Alias("merry")
addressFromRecipient(alias)

Asset

Structure of a token. The structure is returned by the assetInfo built-in function.

Constructor

Asset(id: ByteVector, quantity: Int, decimals: Int, issuer: Address, issuerPublicKey: ByteVector, reissuable: Boolean, scripted: Boolean, minSponsoredFee: Int|Unit, name: String, description: String)

Fields

Asset Fields
#NameData typeDescription
1idByteVectortoken ID.
2quantityIntAmount of issued token, multiplied by 10^{decimals}. Up to 9 223 372 036 854 775 806.
3decimalsIntNumber of decimal places, 0 to 8.
4issuerAddressaddress of the account that issued a token.
5issuerPublicKeyByteVectorPublic key of the account that issued a token.
6reissuableBooleantrue — token can be reissued, false — cannot be reissued.
7scriptedBooleantrue — smart asset, false — regular token.
8minSponsoredFeeInt | UnitAmount of asset that is equivalent to 0.001 DecentralCoins (100,000 Decentralites), specified in the minimum fraction (“cents”) of asset. See the Sponsored fee article. unit: sponsorship is disabled.
9nameStringToken name, up to 16 characters.
10descriptionStringToken description, up to 1000 characters.

Example

Get the account balance in a given asset:

let address=base58'3Mw48B85LvkBUhhDDmUvLhF9koAzfsPekDb'
let assetId=base58'GpxmxorKXLz1V7xootrvGyFgqP2tTTBib5HEm8QGZTHX'
assetBalance(Address(address), assetId)

AssetPair

Structure of a pair of tokens of an order within the Order structure.

Constructor

AssetPair(amountAsset: ByteVector|Unit, priceAsset: ByteVector|Unit)

Fields

AssetPair Fields
#NameData typeDescription
1amountAssetByteVector | UnitThe first token of a pair.
2priceAssetByteVector | UnitThe second token of a pair.

Example

Get the account balance in a given asset:

let address=base58'3Mw48B85LvkBUhhDDmUvLhF9koAzfsPekDb'
let assetId=base58'GpxmxorKXLz1V7xootrvGyFgqP2tTTBib5HEm8QGZTHX'
assetBalance(Address(address), assetId)

AttachedPayment

Structure of a payment attached to the script invocation and available to the callable function. The structure is used in:

  • Invocation structure.
  • InvokeScriptTransaction structure.
  • Invoke and reentrantInvoke functions.

Constructor

AttachedPayment(assetId: ByteVector|Unit, amount: Int)

Fields

AttachedPayment Fields
#NameData typeDescription
1assetIdByteVector | UnitID of a token.
2amountIntPayment amount.

BalanceDetails

Structure that contains DecentralCoins balances of account. The structure is returned by the decentralchainBalance built-in function. For description of balance types, see the account balance article.

Constructor

BalanceDetails(available: Int, regular: Int, generating: Int, effective: Int)

Fields

BalanceDetails Fields
#NameData typeDescription
1availableIntAvailable balance.
2regularIntRegular balance.
3generatingIntGenerating balance.
4effectiveIntEffective balance.

All balances are given in Decentralites.

BlockInfo

Structure containing block headers. The structure is returned by the blockInfoByHeight built-in function.

Constructor

BlockInfo(timestamp: Int, height: Int, baseTarget: Int, generationSignature: ByteVector, generator: Address, generatorPublicKey: ByteVector, vrf: ByteVector|Unit)

Fields

BlockInfo Fields
#NameData typeDescription
1timestampIntBlock timestamp.
2heightIntBlock height.
3baseTargetIntBase target.
4generationSignatureByteVectorGeneration signature.
5generatorAddressaddress of the account that created a block.
6generatorPublicKeyByteVectorPublic key of the account that created a block.
7vrfByteVector | UnitVRF for block version 5, unit otherwise.

Invocation

Structure that contains the fields of the script invocation that the callable function can use.

Constructor

Invocation(caller: Address, callerPublicKey: ByteVector, originCaller: Address, originCallerPublicKey: ByteVector, payments: List[AttachedPayment], transactionId: ByteVector, fee: Int, feeAssetId: ByteVector|Unit)

Fields

The field values depend on how the callable function is invoked. If the callable function is invoked by an invoke script transaction:

Invocation Fields 1
#NameData typeDescription
1callerAddressaddress of the account that sent the invoke script transaction.
2callerPublicKeyByteVectorPublic key of the account that sent the invoke script transaction.
3originCallerAddressDuplicates the caller field.
4originCallerPublicKeyByteVectorDuplicates the callerPublicKey field.
5paymentsList [AttachedPayment]Payments indicated in the invoke script transaction.
6transactionIdByteVectorID of the invoke script transaction.
7feeIntTransaction fee.
8feeAssetIdByteVector | UnitID of the fee token.

If the callable function is invoked by the invoke or reentrantInvoke function (see the dApp-to-dApp invocation article):

Invocation Fields 2
#NameData typeDescription
1callerAddressaddress of the dApp that invokes the callable function.
2callerPublicKeyByteVectorPublic key of the dApp that invokes the callable function.
3originCallerAddressAddress of the account that sent the Invoke Script transaction.
4originCallerPublicKeyByteVectorPublic key of the account that sent the Invoke Script transaction.
5paymentsList [AttachedPayment]Payments indicated in the invoke or reentrantInvoke function.
6transactionIdByteVectorID of the Invoke Script transaction.
7feeIntTransaction fee.
8feeAssetIdByteVector | UnitID of the fee token.

The originCaller, originCallerPublicKey, transactionId, fee, and feeAssetId values are the same for all dApp-to-dApp invocations within a single Invoke Script transaction.

Example

The following function checks that the first payment in the Invoke Script transaction is at least 1 DecentralCoin or 5 in the specified asset.

{-# STDLIB_VERSION 5 #-}
{-# CONTENT_TYPE DAPP #-}
{-# SCRIPT_TYPE ACCOUNT #-}

func isPaymentOk(i: Invocation) = {
 let acceptableAssetId = base58'3JmaWyFqWo8YSA8x3DXCBUW7veesxacvKx19dMv7wTMg'
 if (size(i.payments) == 0) then {
   throw("Payment not attached")
 } else {
   let p = i.payments[0]
   match p.assetId {
     case assetId: ByteVector => assetId == acceptableAssetId && p.amount >= 500000000
     case _ => p.amount >= 100000000
   }
 }
}

@Callable(i)
func foo() = {
 if isPaymentOk(i) then ([],unit) else throw("Wrong payment amount or asset")
}

Order

Structure of an order dApp-to-dApp invocation. The structure is used:

  • When checking an outgoing order by the account script or the verifier function of the dApp script.
  • In the InvokeScriptTransaction structure.

Constructor

Order(id: ByteVector, matcherPublicKey: ByteVector, assetPair: AssetPair, orderType: Buy|Sell, price: Int, amount: Int, timestamp: Int, expiration: Int, matcherFee: Int, matcherFeeAssetId: ByteVector|Unit, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

Order Fields
#NameData typeDescription
1idByteVectorID of an order.
2matcherPublicKeyByteVectorPublic key of a matcher.
3assetPairAssetPairPair of tokens.
4orderTypeBuy|SellType of an order — selling or buying.
5priceIntPrice of a token to exchange.
6amountIntNumber of tokens to exchange.
7timestampIntUnix time of the validation of an order by a matcher.
8expirationIntUnix time when an uncompleted order will be cancelled.
9matcherFeeIntTransaction fee.
10matcherFeeAssetIdByteVector | UnitToken of a transaction fee. It can only be DecentralCoins.
11senderAddressaddress of the sender of an order.
12senderPublicKeyByteVectorPublic key of the sender of an order.
13bodyBytesByteVectorArray of bytes of an order.
14proofsList [ByteVector]Array of proofs.

Example

The script below enables buying from a sender's account:

  • Only the specified asset.
  • Only at a given price.
  • Only for DecentralCoins.
{-# STDLIB_VERSION 5 #-}
{-# CONTENT_TYPE EXPRESSION #-}
{-# SCRIPT_TYPE ACCOUNT #-}

let myAssetId = base58'8LLpj6yQLUu37KUt3rVo1S69j2gWMbgbM6qqgt2ac1Vb'

match tx {
  case o: Order =>
   let isDecentralChainPriceAsset = !isDefined(o.assetPair.priceAsset)
   let rightPair = (o.assetPair.amountAsset == myAssetId) && isDecentralChainPriceAsset
   sigVerify(o.bodyBytes, o.proofs[0], o.senderPublicKey)
   && rightPair
   && o.price == 500000
   && o.orderType == Buy
  case _ => false
}

Transfer

Structure of a single transfer within the MassTransferTransaction structure.

Constructor

Transfer(recipient: Address|Alias, amount: Int)

Fields

Transfer Fields
#NameData typeDescription
1recipientAddress | Aliasaddress of a recipient of tokens.
2amountIntNumber of tokens.

Transaction Structures

Tokenization

Tokenization
Transaction type IDNameDescription
3IssueTransactionStructure of issue transaction.
5ReissueTransactionStructure of reissue transaction.
6BurnTransactionStructure of burn transaction.
15SetAssetScriptTransactionStructure of set asset script transaction.
17UpdateAssetInfoTransactionStructure of update asset info transaction.

IssueTransaction

Structure of an issue transaction.

Constructor

IssueTransaction(quantity: Int, name: String, description: String, reissuable: Boolean, decimals: Int, script: ByteVector|Unit, id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

IssueTransaction Fields
#NameData typeDescription
1quantityIntAmount of the token.
2nameStringToken name.
3descriptionStringToken description.
4reissuableBooleanReissue ability flag.
5decimalsIntNumber of digits in decimal part.
6scriptByteVector | UnitScript that must be set for the generated token.
7idByteVectorTransaction ID.
8feeIntTransaction fee.
9timestampIntTransaction timestamp.
10versionIntTransaction version.
11senderAddressaddress of the transaction sender.
12senderPublicKeyByteVectorAccount public key of the transaction sender.
13bodyBytesByteVectorTransaction body bytes.
14proofsList [ByteVector]Array of proofs.

ReissueTransaction

Structure of a reissue transaction.

Constructor

ReissueTransaction(quantity: Int, assetId: ByteVector, reissuable: Boolean, id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

ReissueTransaction Fields
#NameData typeDescription
1quantityIntAmount of the token.
2assetIdByteVectortoken ID.
3reissuableBooleanReissue flag.
4idByteVectorTransaction ID.
5feeIntTransaction fee.
6timestampIntTransaction timestamp.
7versionIntTransaction version.
8senderAddressaddress of the transaction sender.
9senderPublicKeyByteVectorPublic key of the transaction sender.
10bodyBytesByteVectorTransaction body bytes.
11proofsList [ByteVector]Proofs.

BurnTransaction

Structure of an burn transaction.

Constructor

BurnTransaction(quantity: Int, assetId: ByteVector, id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

BurnTransaction Fields
#NameData typeDescription
1quantityIntAmount of the token to burn.
2assetIdByteVectorID of the token to burn.
3idByteVectorTransaction ID.
4feeIntTransaction fee.
5timestampIntTransaction timestamp.
6versionIntTransaction version.
7senderAddressaddress of the transaction sender.
8senderPublicKeyByteVectorPublic key of the transaction sender.
9bodyBytesByteVectorTransaction body bytes.
10proofsList [ByteVector]Array of proofs.

SetAssetScriptTransaction

Structure of an set asset script transaction.

Constructor

SetAssetScriptTransaction(script: ByteVector|Unit, assetId: ByteVector, id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

SetAssetScriptTransaction Fields
#NameData typeDescription
1scriptByteVector | UnitAsset script.
2assetIdByteVectortoken ID.
3idByteVectorTransaction ID.
4feeIntTransaction fee.
5timestampIntTransaction timestamp.
6versionIntTransaction version.
7senderAddressaddress of the transaction sender.
8senderPublicKeyByteVectorPublic key of the transaction sender.
9bodyBytesByteVectorTransaction body bytes.
10proofsList [ByteVector]Proofs.

UpdateAssetInfoTransaction

Structure of an update asset info transaction.

Constructor

UpdateAssetInfoTransaction(name: String, assetId: ByteVector, description: String, id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

UpdateAssetInfoTransaction Fields
#NameData typeDescription
1nameStringName of the token.
2assetIdByteVectortoken ID.
3descriptionStringDescription of the token.
4idByteVectorTransaction ID.
5feeIntTransaction fee.
6timestampIntTransaction timestamp.
7versionIntTransaction version.
8senderAddressAddress of a transaction sender.
9senderPublicKeyByteVectorAccount public key of a sender.
10bodyBytesByteVectorTransaction body bytes.
11proofsList [ByteVector]Array of proofs.

Usage

Usage
Transaction type IDNameDescription
4TransferTransactionStructure of transfer transaction.
7ExchangeTransactionStructure of exchange transaction.
10CreateAliasTransactionStructure of create alias transaction.
11MassTransferTransactionStructure of mass transfer transaction.
12DataTransactionStructure of data transaction.
13SetScriptTransactionStructure of set script transaction.
16InvokeScriptTransactionStructure of invoke script transaction.

TransferTransaction

Structure of an transfer transaction.

Constructor

TransferTransaction(feeAssetId: ByteVector|Unit, amount: Int, assetId: ByteVector|Unit, recipient: Address|Alias, attachment: ByteVector, id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

TransferTransaction Fields
#NameData typeDescription
1feeAssetIdByteVector | UnitToken to pay the commission.
2amountIntAmount of tokens to transfer.
3assetIdByteVector | UnitID of a token.
4recipientAddress | AliasAddress or alias of the recipient.
5attachmentByteVectorArbitrary data attached to transfer. The maximum data size is 140 bytes.
6idByteVectorTransaction ID.
7feeIntTransaction fee.
8timestampIntTransaction timestamp.
9versionIntTransaction version.
10senderAddressaddress of a transaction sender.
11senderPublicKeyByteVectorAccount public key of a sender.
12bodyBytesByteVectorTransaction body bytes.
13proofsList [ByteVector]Array of proofs.

ExchangeTransaction

Structure of an exchange transaction.

Constructor

ExchangeTransaction(buyOrder: Order, sellOrder: Order, price: Int, amount: Int, buyMatcherFee: Int, sellMatcherFee: Int, id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

ExchangeTransaction Fields
#NameData typeDescription
1buyOrderOrderToken purchase order.
2sellOrderOrderToken sell order.
3priceIntPrice of exchanging token.
4amountIntAmount of exchanging tokens.
5buyMatcherFeeIntMatcher's purchase fee.
6sellMatcherFeeIntMatcher's sell fee.
7idByteVectorTransaction ID.
8feeIntTransaction fee.
9timestampIntTransaction timestamp.
10versionIntTransaction version.
11senderAddressaddress of a transaction sender.
12senderPublicKeyByteVectorAccount public key of a sender.
13bodyBytesByteVectorTransaction body bytes.
14proofsList [ByteVector]Array of proofs.

CreateAliasTransaction

Structure of a create alias transaction.

Constructor

CreateAliasTransaction(alias: String, id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

CreateAliasTransaction Fields
#NameData typeDescription
1aliasStringAlias.
3idByteVectorTransaction ID.
4feeIntTransaction fee.
5timestampIntTransaction timestamp.
6versionIntTransaction version.
7senderAddressaddress of the transaction sender.
8senderPublicKeyByteVectorPublic key of the transaction sender.
9bodyBytesByteVectorTransaction body bytes.
10proofsList [ByteVector]Array of proofs.

MassTransferTransaction

Structure of a mass transfer transaction.

Constructor

MassTransferTransaction(assetId: ByteVector|Unit, totalAmount: Int, transfers: List[Transfer], transferCount: Int, attachment: ByteVector, id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

MassTransferTransaction Fields
#NameData typeDescription
1assetIdByteVector | Unittoken ID.
2totalAmountIntAmount of the token to be transferred.
3transfersList [Transfer]Transfers.
4transferCountIntNumber of transfers.
5attachmentByteVectorOptional data attached to the transaction. This field is often used to attach a comment to the transaction. The maximum data size is 140 bytes.
6idByteVectorTransaction ID.
7feeIntTransaction fee.
8timestampIntTransaction timestamp.
9versionIntTransaction version.
10senderAddressaddress of the transaction sender.
11senderPublicKeyByteVectorPublic key of the transaction sender.
12bodyBytesByteVectorTransaction body bytes.
13proofsList [ByteVector]Proofs.

DataTransaction

Structure of a data transaction.

Constructor

DataTransaction(data: List[BinaryEntry|BooleanEntry|DeleteEntry|IntegerEntry|StringEntry], id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

DataTransaction Fields
#NameData typeDescription
1dataList [BinaryEntry | BooleanEntry | DeleteEntry | IntegerEntry | StringEntry]Transaction's data array.
2idByteVectorTransaction ID.
3feeIntTransaction fee.
4timestampIntTransaction timestamp.
5versionIntTransaction version.
6senderAddressaddress of a transaction sender.
7senderPublicKeyByteVectorAccount public key of a sender.
8bodyBytesByteVectorTransaction body bytes.
9proofsList [ByteVector]Array of proofs.

SetScriptTransaction

Structure of a set script transaction.

Constructor

SetScriptTransaction(script: ByteVector|Unit, id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

SetScriptTransaction Fields
#NameData typeDescription
1scriptByteVector | UnitAccount script or dApp script.
2idByteVectorTransaction ID.
3feeIntTransaction fee.
4timestampIntTransaction timestamp.
5versionIntTransaction version.
6senderAddressaddress of the transaction sender.
7senderPublicKeyByteVectorPublic key of the transaction sender.
8bodyBytesByteVectorTransaction body bytes.
9proofsList [ByteVector]Proofs.

InvokeScriptTransaction

Structure of an invoke script transaction.

Constructor

InvokeScriptTransaction(dApp: Address|Alias, payments: List[AttachedPayments], feeAssetId: ByteVector|Unit, function: String, args: List[Boolean|ByteVector|Int|String|List[Boolean|ByteVector|Int|String]], id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

InvokeScriptTransaction Fields
#NameData typeDescription
1dAppAddress | Aliasaddress or alias of the account which is calling a function.
2paymentsList [AttachedPayment]Payments attached to the transaction.
3feeAssetIdByteVector | Unittoken to pay the commission.
4functionStringName of the callable function.
5argsList [Boolean | ByteVector | Int | String | List [Boolean | ByteVector | Int | String]]Parameters of the callable function.
6idByteVectorTransaction ID.
7feeIntTransaction fee.
8timestampIntTransaction timestamp.
9versionIntTransaction version.
10senderAddressaddress of the transaction sender.
11senderPublicKeyByteVectorAccount public key of the transaction sender.
12bodyBytesByteVectorTransaction body bytes.
13proofsList [ByteVector]Array of proofs.

Network

Network
Transaction type IDNameDescription
8LeaseTransactionStructure of lease transaction.
9LeaseCancelTransactionStructure of lease cancel transaction.
14SponsorFeeTransactionStructure of sponsor fee transaction.

LeaseTransaction

Structure of a lease transaction.

Constructor

LeaseTransaction(amount: Int, recipient: Address|Alias, id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

LeaseTransaction Fields
#NameData typeDescription
1amountIntAmount of the token to lease.
2recipientAddress | Aliasaddress or alias of the leasing recipient.
3idByteVectorTransaction ID.
4feeIntTransaction fee.
5timestampIntTransaction timestamp.
6versionIntTransaction version.
7senderAddressaddress of a transaction sender.
8senderPublicKeyByteVectorAccount public key of a sender.
9bodyBytesByteVectorTransaction body bytes.
10proofsList [ByteVector]Array of proofs.

LeaseCancelTransaction

Structure of a lease cancel transaction.

Constructor

LeaseCancelTransaction(leaseId: ByteVector, id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

LeaseCancelTransaction Fields
#NameData typeDescription
1leaseIdByteVectorLeasing ID.
2idByteVectorTransaction ID.
3feeIntTransaction fee.
4timestampIntTransaction timestamp.
5versionIntTransaction version.
6senderAddressaddress of the transaction sender.
7senderPublicKeyByteVectorPublic key of the transaction sender.
8bodyBytesByteVectorTransaction body bytes.
9proofsList [ByteVector]Proofs.

SponsorFeeTransaction

Structure of a sponsor fee transaction.

Constructor

SponsorFeeTransaction(assetId: ByteVector, minSponsoredAssetFee: Int|Unit, id: ByteVector, fee: Int, timestamp: Int, version: Int, sender: Address, senderPublicKey: ByteVector, bodyBytes: ByteVector, proofs: List[ByteVector])

Fields

SponsorFeeTransaction Fields
#NameData typeDescription
1assetIdByteVectortoken ID.
2minSponsoredAssetFeeInt | UnitAmount of asset that is equivalent to 0.001 DecentralCoins (100,000 Decentralites): an integer value specified in atomic units. unit – disable sponsorship.
3idByteVectorTransaction ID.
4feeIntTransaction fee.
5timestampIntTransaction timestamp.
6versionIntTransaction version.
7senderAddressaddress of the transaction sender.
8senderPublicKeyByteVectorPublic key of the transaction sender.
9bodyBytesByteVectorTransaction body bytes.
10proofsList [ByteVector]Proofs.

Genesis

Genesis
Transaction type IDNameDescription
1GenesisTransactionStructure of genesis transaction.

GenesisTransaction

Structure of a genesis transaction.

Constructor

GenesisTransaction(amount: Int, recipient: Address|Alias, id: ByteVector, fee: Int, timestamp: Int, version: Int)

Fields

GenesisTransaction Fields
#NameData typeDescription
1amountIntAmount of the token.
2recipientAddress | Aliasaddress or alias of the token recipient.
3idByteVectorTransaction ID.
4feeIntTransaction fee.
5timestampIntTransaction timestamp.
6versionIntTransaction version.
PreviousScript TypesNextIterations with FOLD<N>arrow

Elsewhere on this site

RIDE on DecentralChainarrowWhat the language guarantees, and why a script is priced before it deploys.SDK packagesarrowThe compiler and the SDKs, published to npm and runnable in a browser.