This repo defines structures used to communicate with Core
of TokenD based networks.
Transactions are commands that modify the ledger state. If you think of the ledger as a database, then Operations are SQL commands and Trannsactions are SQL transactions.
Transactions allows you to combine several operations (even from different sources) into one atomic command (if one operation fails, whole transaction rollbacks). What is more, it's possible to specify different source account for different operation. This can be used to implement features like over-the-counter exchange (include into transaction two operations: one sending assets from A to B; one sending assets from B to A; such transaction requires signatures from both A and B).
Account | Resource Type | Action |
---|---|---|
source | TRANSACTION |
SEND |
Signers rules required on operation level.
Tx | object Transaction is a container for a set of operations
|
Signatures | Array of objects list of signatures used to authorize transaction |
FeeCharged | long |
Result | One of multiple values |
Ext | TransactionResultExtArmEmptyVersion (object) |
Allows creating account with specific role and signers.
Balances for assets with policy BASE_ASSET
will be created for the account automatically.
Account | Resource Type | Action |
---|---|---|
source | ACCOUNT |
CREATE |
Resource Type | Rule Action |
---|---|
ACCOUNT |
CREATE |
CreateAccountOp is used to create new account
Destination | AccountId ID of account to be created |
Referrer | AccountId ID of an another account that introduced this account into the system. If account with such ID does not exist or it's Admin Account. Referrer won't be set. |
RoleId | uint64 ID of the role that will be attached to an account |
SignersData | Array of objects Array of data about 'destination' account signers to be created |
Ext | CreateAccountOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Means that |
success | object (CreateAccountSuccess) Result of successful application of |
Allows to create or update CREATE_ASSET
reviewable request
CREATE_ASSET
request is used to create asset entry
Account | Resource Type | Rule Action | Condition |
---|---|---|---|
source | ASSET |
CREATE |
allTasks == null |
source | ASSET |
CREATE_WITH_TASKS |
allTasks != null |
Resource Type | Rule Action | Details |
---|---|---|
ASSET |
CREATE |
Resource includes code and type of asset |
ManageAssetOp is used to:
CREATE_ASSET
request;UPDATE_ASSET
request;CREATE_ASSET
or UPDATE_ASSET
requestRequestId | uint64 ID of a reviewable request
If |
Request | One of multiple values data is used to pass one of |
Ext | ManageAssetOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Specified action in |
success | object (ManageAssetSuccess) Is used to pass useful params after the successful operation application |
Describes the asset pairs as a set of properties and policies for two particular assets (i.e. base and quote assets).
Code | string Code of the asset |
Owner | AccountId Owner(creator) of the asset |
PreissuedAssetSigner | AccountId Account responsible for preissuance of the asset |
Details | string Arbitrary stringified JSON object that can be used to attach data to asset |
MaxIssuanceAmount | uint64 Maximal amount of tokens that can be issued |
AvailableForIssueance | uint64 Amount of tokens available for issuance |
Issued | uint64 Amount of tokens issued already |
PendingIssuance | uint64 Amount of tokens to be issued which is locked. |
Policies | uint32 Policies of the asset |
Type | uint64 Used to restrict usage. Used in account rules |
TrailingDigitsCount | uint32 Number of decimal places. Must be <= 6 |
Ext | EmptyExtArmEmptyVersion (object) Reserved for future use |
enum AssetPolicy { //: Defines whether or not asset can be transfered using payments TRANSFERABLE = 1, //: Defines whether or not asset is considered base BASE_ASSET = 2, //: [[Deprecated]] STATS_QUOTE_ASSET = 4, //: Defines whether or not asset can be withdrawed from the system WITHDRAWABLE = 8, //: Defines whether or not manual review for issuance of asset is required ISSUANCE_MANUAL_REVIEW_REQUIRED = 16, //: Defines whether or not asset can be base in atomic swap CAN_BE_BASE_IN_ATOMIC_SWAP = 32, //: Defines whether or not asset can be quote in atomic swap CAN_BE_QUOTE_IN_ATOMIC_SWAP = 64 }; struct AssetEntry { //: Code of the asset AssetCode code; //: Owner(creator) of the asset AccountID owner; //: Account responsible for preissuance of the asset AccountID preissuedAssetSigner; //: Arbitrary stringified JSON object that can be used to attach data to asset longstring details; //: Maximal amount of tokens that can be issued uint64 maxIssuanceAmount; //: Amount of tokens available for issuance uint64 availableForIssueance; //: Amount of tokens issued already uint64 issued; //: Amount of tokens to be issued which is locked. `pendingIssuance+issued <= maxIssuanceAmount` uint64 pendingIssuance; //: Policies of the asset uint32 policies; //: Used to restrict usage. Used in account rules uint64 type; //: Number of decimal places. Must be <= 6 uint32 trailingDigitsCount; //: Reserved for future use EmptyExt ext; };
Allows to create or update UPDATE_ASSET
reviewable request
UPDATE_ASSET
request is used to update asset entry
Account | Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|---|
source | REVIEWABLE_REQUEST |
UPDATE_ASSET |
CREATE |
allTasks == null |
source | REVIEWABLE_REQUEST |
UPDATE_ASSET |
CREATE_WITH_TASKS |
allTasks != null |
Resource Type | Rule Action | Details |
---|---|---|
ASSET |
UPDATE |
Resource includes code and type of asset |
ManageAssetOp is used to:
CREATE_ASSET
request;UPDATE_ASSET
request;CREATE_ASSET
or UPDATE_ASSET
requestRequestId | uint64 ID of a reviewable request
If |
Request | One of multiple values data is used to pass one of |
Ext | ManageAssetOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Specified action in |
success | object (ManageAssetSuccess) Is used to pass useful params after the successful operation application |
Allows to cancel CREATE_ASSET
or UPDATE_ASSET
reviewable request
No account rule required because only requestor can remove own request
Resource Type | Rule Action | Details |
---|---|---|
ASSET |
CANCEL |
Resource includes code and type of asset |
ManageAssetOp is used to:
CREATE_ASSET
request;UPDATE_ASSET
request;CREATE_ASSET
or UPDATE_ASSET
requestRequestId | uint64 ID of a reviewable request
If |
Request | One of multiple values data is used to pass one of |
Ext | ManageAssetOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Specified action in |
success | object (ManageAssetSuccess) Is used to pass useful params after the successful operation application |
Allows to change asset pre issuer
No account rule required because only current asset pre issuer can change asset pre issuer
No signer rule required because only current asset pre issuer can change asset pre issuer
ManageAssetOp is used to:
CREATE_ASSET
request;UPDATE_ASSET
request;CREATE_ASSET
or UPDATE_ASSET
requestRequestId | uint64 ID of a reviewable request
If |
Request | One of multiple values data is used to pass one of |
Ext | ManageAssetOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Specified action in |
success | object (ManageAssetSuccess) Is used to pass useful params after the successful operation application |
Removes asset.
Account | Resource Type | Action | Condition |
---|---|---|---|
source | ASSET |
REMOVE |
source == assetOwner |
source | ASSET |
REMOVE_FOR_OTHER |
source != assetOwner |
Resource Type | Rule Action |
---|---|
ASSET |
REMOVE |
ASSET |
REMOVE_FOR_OTHER |
RemoveAssetOp
changes the state of specified asset to removed
Code | string Defines an asset |
Ext | RemoveAssetOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Operation is successfully applied |
success | object (RemoveAssetSuccess) Result of successful |
Allows to change max issuance of asset
Account | Resource Type | Rule Action | Details |
---|---|---|---|
source | ASSET |
UPDATE_MAX_ISSUANCE |
Only asset owner can update max issuance of asset |
Resource Type | Rule Action |
---|---|
ASSET |
UPDATE_MAX_ISSUANCE |
ManageAssetOp is used to:
CREATE_ASSET
request;UPDATE_ASSET
request;CREATE_ASSET
or UPDATE_ASSET
requestRequestId | uint64 ID of a reviewable request
If |
Request | One of multiple values data is used to pass one of |
Ext | ManageAssetOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Specified action in |
success | object (ManageAssetSuccess) Is used to pass useful params after the successful operation application |
Allows to create request to transfer some amount of asset from source balance to destination account/balance.
Payment request is a reviewable request. It uses tasks - bitmask, where each bit represents conditions under which
request can be approved. Tasks can be set or cleared both manually(by reviewer) and automatically.
Tasks bit mask can be provided either from KeyValueEntry
by key payment_tasks:<asset_code>
(which specify tasks
for asset) or by key payment_tasks:*
if there are no payment tasks for provided asset.
If field allTasks
is set, KeyValueEntry
won't be used.
Account | Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|---|
receiver | ASSET |
- | RECEIVE_PAYMENT |
- |
source | REVIEWABLE_REQUEST |
CREATE_PAYMENT |
CREATE |
allTasks == null |
source | REVIEWABLE_REQUEST |
CREATE_PAYMENT |
CREATE_WITH_TASKS |
allTasks != null |
Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|
REVIEWABLE_REQUEST |
CREATE_PAYMENT |
CREATE |
allTasks == null |
REVIEWABLE_REQUEST |
CREATE_PAYMENT |
CREATE_WITH_TASKS |
allTasks != null |
Request | object Payment request details |
AllTasks | uint32 (optional) Bit mask whose flags must be cleared in order for CreateSale request to be approved, which will be used by key sale_create_tasks: |
Ext | EmptyExtArmEmptyVersion (object) reserved for future extension |
code | string Value: "SUCCESS" CreatePaymentRequestOp was successfully applied |
success | object (CreatePaymentRequestSuccessResult) Result of the successful payment request creation |
Allows to transfer some amount of asset from source balance to destination account/balance.
Account | Resource Type | Action |
---|---|---|
source | ASSET |
SEND |
destination | ASSET |
RECEIVE_PAYMENT |
Resource Type | Rule Action |
---|---|
ASSET |
SEND |
PaymentOp is used to transfer some amount of asset from the source balance to destination account/balance
SourceBalanceId | BalanceId ID of the source balance of payment |
Destination | PaymentOpDestinationArmAccount (object) or PaymentOpDestinationArmBalance (object)
|
Amount | uint64 Amount of payment |
FeeData | object
|
Subject | string
|
Reference | string
|
Ext | PaymentOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Payment was successfully completed |
paymentResponse | object (PaymentResponse)
|
Allows to create request to emit provided amount of specified asset to destination balance.
Issuance request is a reviewable request. It uses tasks - bitmask, where each bit represents conditions under which
request can be approved. Tasks can be set or cleared both manually(by reviewer) and automatically.
Tasks bit mask can be provided either from KeyValueEntry
by key issuance_tasks:<asset_code>
(which specify tasks
for asset) or by key issuance_tasks:*
if there are no issuance tasks for provided asset.
If field allTasks
is set, KeyValueEntry
won't be used.
Account | Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|---|
receiver | ASSET |
RECEIVE_ISSUANCE |
- | - |
source | REVIEWABLE_REQUEST |
CREATE_ISSUANCE |
CREATE |
allTasks == null |
source | REVIEWABLE_REQUEST |
CREATE_ISSUANCE |
CREATE_WITH_TASKS |
allTasks != null |
Resource Type | Reviewable Request Type | Action |
---|---|---|
REVIEWABLE_REQUEST |
CREATE_ISSUANCE |
CREATE |
CreateIssuanceRequestOp is used to create a reviewable request that, after reviewer's approval, will issue the specified amount of asset to a receiver's balance
Request | object Issuance request to create |
Reference | string Reference of the request |
AllTasks | uint32 (optional) Bit mask whose flags must be cleared in order for IssuanceRequest to be approved, which will be used by key issuance_tasks: |
Ext | CreateIssuanceRequestOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" CreateIssuanceRequest operation application was successful |
success | object (CreateIssuanceRequestSuccess) Result of successful application of CreateIssuanceRequest operation |
Allows creating CREATE_PRE_ISSUANCE
reviewable request.
CREATE_PRE_ISSUANCE
request is used to increase available for issuance amount of asset.
Account | Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|---|
source | REVIEWABLE_REQUEST |
CREATE_PRE_ISSUANCE |
CREATE |
allTasks == null |
source | REVIEWABLE_REQUEST |
CREATE_PRE_ISSUANCE |
CREATE_WITH_TASKS |
allTasks != null |
No singer rule required because only asset pre issuer can do pre issuance.
CreatePreIssuanceRequestOp is used to create a reviewable request,
which, after admin's approval, will change availableForIssuance
amount of asset
Request | object Body of PreIssuanceRequest to be created |
AllTasks | uint32 (optional) Bit mask whose flags must be cleared in order for PreIssuanceRequest to be approved, which will be used by key |
Ext | CreatePreIssuanceRequestOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Preissuance request is either successfully created or auto approved if pending tasks of requests is equal to 0 |
success | object (CreatePreIssuanceRequestResultSuccess) |
Allows to create request to withdraw assets from system. On request creation, withdrawn amount will be locked
on target balance.
For withdrawal reviewable request REJECT
action is not allowed.
On PERMANENT REJECT
, withdrawn amount is unlocked.
On APPROVE
, tasks can be added and removed.
If pendingTasks == 0
and action being performed is APPROVE
, withdrawn amount is sent to external account.
Withdrawn amount is subtracted for issued
field of the asset
Withdrawal request cannot be autoapproved, i.e. it's not allowed to set empty (zero tasks) in any way, either
through KeyValueEntry
or on request creation(through allTasks
).
Account | Resource Type | Action |
---|---|---|
source | WITHDRAW |
CREATE |
Resource Type | Reviewable Request Type | Action |
---|---|---|
REVIEWABLE_REQUEST |
CREATE_WITHDRAW |
CREATE |
CreateWithdrawalRequest operation is used to create a reviewable request, which, after reviewer's approval, will charge the specified amount from balance and send it to external wallet/account
Request | object Withdrawal request to create |
AllTasks | uint32 (optional) Bit mask whose flags must be cleared in order for WithdrawalRequest to be approved, which will be used by key withdrawal_tasks: |
Ext | CreateWithdrawalRequestOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" CreateWithdrawalRequest operation successfully applied |
success | object (CreateWithdrawalSuccess) Result of the successful withdrawal request creation |
Allows to create request to transfer some amount of asset from source balance to destination account/balance.
Payment request is a reviewable request. It uses tasks - bitmask, where each bit represents conditions under which
request can be approved. Tasks can be set or cleared both manually(by reviewer) and automatically.
Tasks bit mask can be provided either from KeyValueEntry
by key payment_tasks:<asset_code>
(which specify tasks
for asset) or by key payment_tasks:*
if there are no payment tasks for provided asset.
If field allTasks
is set, KeyValueEntry
won't be used.
Account | Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|---|
receiver | ASSET |
- | RECEIVE_PAYMENT |
- |
source | REVIEWABLE_REQUEST |
CREATE_PAYMENT |
CREATE |
allTasks == null |
source | REVIEWABLE_REQUEST |
CREATE_PAYMENT |
CREATE_WITH_TASKS |
allTasks != null |
Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|
REVIEWABLE_REQUEST |
CREATE_PAYMENT |
CREATE |
allTasks == null |
REVIEWABLE_REQUEST |
CREATE_PAYMENT |
CREATE_WITH_TASKS |
allTasks != null |
Request | object Payment request details |
AllTasks | uint32 (optional) Bit mask whose flags must be cleared in order for CreateSale request to be approved, which will be used by key sale_create_tasks: |
Ext | EmptyExtArmEmptyVersion (object) reserved for future extension |
code | string Value: "SUCCESS" CreatePaymentRequestOp was successfully applied |
success | object (CreatePaymentRequestSuccessResult) Result of the successful payment request creation |
Allows to transfer some amount of asset from source balance to destination account/balance.
Account | Resource Type | Action |
---|---|---|
source | ASSET |
SEND |
destination | ASSET |
RECEIVE_PAYMENT |
Resource Type | Rule Action |
---|---|
ASSET |
SEND |
PaymentOp is used to transfer some amount of asset from the source balance to destination account/balance
SourceBalanceId | BalanceId ID of the source balance of payment |
Destination | PaymentOpDestinationArmAccount (object) or PaymentOpDestinationArmBalance (object)
|
Amount | uint64 Amount of payment |
FeeData | object
|
Subject | string
|
Reference | string
|
Ext | PaymentOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Payment was successfully completed |
paymentResponse | object (PaymentResponse)
|
Allows to create new balance.
Account | Resource Type | Action | Condition |
---|---|---|---|
source | BALANCE |
CREATE |
source accountID is equal to destination accountID |
source | BALANCE |
CREATE_FOR_OTHER |
source accountID differs from destination accountID |
Resource Type | Rule Action | Condition |
---|---|---|
BALANCE |
CREATE_FOR_OTHER |
source accountID is equal to destination accountID |
BALANCE |
CREATE |
source accountID differs from destination accountID |
ManageBalanceOp
applies an action
of the ManageBalanceAction
type on the balance of a particular asset
(referenced to by its AssetCode)
of the destination
account (referenced to by its AccountID)
Action | string Enum: "CREATE" "DELETE_BALANCE" "CREATE_UNIQUE" Defines a ManageBalanceAction to be performed. |
Destination | AccountId Defines an account whose balance will be managed |
Asset | string Defines an asset code of the balance to which |
Ext | ManageBalanceOpExtArmEmptyVersion (object) |
code | string Value: "SUCCESS" Indicates that |
success | object (ManageBalanceSuccess) |
Describes the fee entry which could be set by SetFeesOp.
FeeEntry
is used in the system configuration to set fees for different assets, operations (according to FeeType), particular account roles, particular accounts,
or globally (only if both parameters particular account role and paticular account are not specified).
FeeType | string Enum: "PAYMENT_FEE" "OFFER_FEE" "WITHDRAWAL_FEE" "ISSUANCE_FEE" "INVEST_FEE" "CAPITAL_DEPLOYMENT_FEE" "OPERATION_FEE" "PAYOUT_FEE" "ATOMIC_SWAP_SALE_FEE" "ATOMIC_SWAP_PURCHASE_FEE" "SWAP_FEE" Type of a particular fee depending on the operation (e.g., PAYMENT_FEE for payment operation, WITHDRAWAL_FEE for withdrawal operation, etc.) |
Asset | string Code of an asset used in the operation for which the fee will be charged |
FixedFee | long Fixed amount of fee that will be charged for the operation |
PercentFee | long Percent from the operation amount that will be charged for the corresponding operation |
AccountId | AccountId (optional) Account for which a fee is set in the system |
AccountRole | uint64 (optional) Account for which a fee is set in the system |
Subtype | long Defines a |
LowerBound | long Defines the lower bound of operation amount for which this fee is applicable |
UpperBound | long Defines the upper bound of operation amount for which this fee is applicable |
Hash | array Hash of |
Ext | FeeEntryExtArmEmptyVersion (object) reserved for future use |
//: `FeeType` represents different types of fees for different operations (e.g. fee charged on withdrawal or on investment) enum FeeType { PAYMENT_FEE = 0, OFFER_FEE = 1, WITHDRAWAL_FEE = 2, ISSUANCE_FEE = 3, INVEST_FEE = 4, // fee to be taken while creating the sale participation CAPITAL_DEPLOYMENT_FEE = 5, // fee to be taken when the sale closes OPERATION_FEE = 6, PAYOUT_FEE = 7, ATOMIC_SWAP_SALE_FEE = 8, ATOMIC_SWAP_PURCHASE_FEE = 9 }; //: (not used) `EmissionFeeType` is a subtype of `ISSUANCE_FEE` enum EmissionFeeType { PRIMARY_MARKET = 1, SECONDARY_MARKET = 2 }; //: `PaymentFeeType` is a subtype of the Fee used for payments enum PaymentFeeType { OUTGOING = 1, INCOMING = 2 }; //: `FeeEntry` is used in the system configuration to set fees for different assets, operations (according to FeeType), particular account roles, particular accounts, //: or globally (only if both parameters particular account role and paticular account are not specified). struct FeeEntry { //: Type of a particular fee depending on the operation (e.g., PAYMENT_FEE for payment operation, WITHDRAWAL_FEE for withdrawal operation, etc.) FeeType feeType; //: Code of an asset used in the operation for which the fee will be charged AssetCode asset; //: Fixed amount of fee that will be charged for the operation int64 fixedFee; //: Percent from the operation amount that will be charged for the corresponding operation int64 percentFee; //: (optional) Account from which fee would be charged AccountID* accountID; //: (optional) Account role from which fee would be charged uint64* accountRole; //: Defines a `subtype` of a fee if such exists (e.g., `OUTGOING` or `INCOMING` for `PAYMENT_FEE`) int64 subtype; //: Defines the lower bound of operation amount for which this fee is applicable int64 lowerBound; //: Defines the upper bound of operation amount for which this fee is applicable int64 upperBound; //: Hash of `type:<feeType>asset:<asset>subtype:<subtype>` //: (Add `accountID:<accountID>` or `accountRole:<accountRole>` if corresponding fields are defined) Hash hash; //: reserved for future use union switch (LedgerVersion v) { case EMPTY_VERSION: void; } ext; };
Allows to set or remove relationships between fee entries and particular entities.
Account | Resource Type | Action |
---|---|---|
source | FEE |
MANAGE |
Resource Type | Rule Action |
---|---|
FEE |
MANAGE |
Allows to establish or remove a relationship between a particular fee entry with the different entities
Fee | object Fee entry to set |
IsDelete | boolean
|
Ext | SetFeesOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS"
|
success | object (SetFeesResultSuccess) |
Allows to bind source account to external system account ID pool. Only binded account can do deposits.
Account | Resource Type | Action |
---|---|---|
source | EXTERNAL_SYSTEM_ACCOUNT_ID_POOL_ENTRY |
BIND |
Resource Type | Action |
---|---|
EXTERNAL_SYSTEM_ACCOUNT_ID_POOL_ENTRY |
BIND |
BindExternalSystemAccountIdOp is used to bind a particular account to the external system account which is represented by account ID taken from the pool
ExternalSystemType | integer Type of external system to bind |
Ext | BindExternalSystemAccountIdOpExtArmEmptyVersion (object) Reserved for the future use |
code | string Value: "SUCCESS" Source account has been successfully bound to external system ID taken from the pool |
success | object (BindExternalSystemAccountIdSuccess)
|
Allows to create or remove external system account id pool entry External system account id pool entry can be binded to account.
Account | Resource Type | Action |
---|---|---|
source | EXTERNAL_SYSTEM_ACCOUNT_ID_POOL_ENTRY |
MANAGE |
Resource Type | Action |
---|---|
EXTERNAL_SYSTEM_ACCOUNT_ID_POOL_ENTRY |
MANAGE |
ManageExternalSystemAccountIdPoolEntryOp is used to create or remove an external system account ID from the external system ID pool
ActionInput | ManageExternalSystemAccountIdPoolEntryOpActionInputArmCreate (object) or ManageExternalSystemAccountIdPoolEntryOpActionInputArmRemove (object)
|
Ext | ManageExternalSystemAccountIdPoolEntryOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" Specified action in |
success | object (ManageExternalSystemAccountIdPoolEntrySuccess) Success result of operation application |
Allows to cancel atomic swap bid. If atomic swap bid has non zero locked amount
(it means that CREATE_ATOMIC_SWAP_BID
request is being processed).
It will be marked as canceled and will be removed after all
CREATE_ATOMIC_SWAP_BID
request will be approved of permament rejected.
No account rule required because only bid owner can perform such operation.
Resource Type | Action |
---|---|
ATOMIC_SWAP_ASK |
CANCEL |
CancelAtomicSwapAskOp is used to cancel existing atomic swap ask
AskId | uint64 id of existing atomic swap ask |
Ext | CancelAtomicSwapAskOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Atomic swap ask was successfully removed or marked as canceled |
success | object (CancelAtomicSwapAskResultSuccess) Success result of CancelASwapAskOp application |
Allows to create CREATE_ATOMIC_SWAP_ASK
request, which approving creates atomic swap ask.
Other accounts will have possibite to create CREATE_ATOMIC_SWAP_BID
request for such ask to
buy atomic swap ask base asset for the external system currency
Account | Resource Type | Action | Condition |
---|---|---|---|
source | ATOMIC_SWAP_ASK |
CREATE |
allTasks == null |
source | ATOMIC_SWAP_ASK |
CREATE_WITH_TASKS |
allTasks != null |
Resource Type | ReviewableRequestType | Action |
---|---|---|
REVIEWABLE_REQUEST |
CREATE_ATOMIC_SWAP_ASK |
CREATE |
CreateAtomicSwapAskRequestOp is used to create CREATE_ATOMIC_SWAP_ASK
request
Request | object Body of request which will be created |
AllTasks | uint32 (optional) Bit mask whose flags must be cleared in order for |
Ext | CreateAtomicSwapAskRequestOpExtArmEmptyVersion (object) reserved for the future use |
code | string Value: "SUCCESS"
|
success | object (CreateAtomicSwapAskRequestSuccess) Success result of CreateASwapAskCreationRequestOp application |
Allows to create CREATE_ATOMIC_SWAP_BID
request, which approving means:
Account | Resource Type | Action |
---|---|---|
source | ASSET |
RECEIVE_ATOMIC_SWAP |
Resource Type | ReviewableRequestType | Action |
---|---|---|
REVIEWABLE_REQUEST |
CREATE_ATOMIC_SWAP_BID |
CREATE |
CreateAtomicSwapBidRequestOp is used to create CREATE_ATOMIC_SWAP_BID
request
Request | object Body of request which will be created |
Ext | CreateAtomicSwapBidRequestOpExtArmEmptyVersion (object) reserved for the future use |
code | string Value: "SUCCESS" request was successfully created |
success | object (CreateAtomicSwapBidRequestSuccess) Success request of CreateAtomicSwapBidRequestOp application |
Allows creating REDEMPTION
reviewable request.
REDEMPTION
request is used to force redeem money from holder.
Account | Resource Type | Action | Condition |
---|---|---|---|
source | REVIEWABLE_REQUEST |
CREATE |
allTasks == null |
source | REVIEWABLE_REQUEST |
CREATE_WITH_TASKS |
allTasks != null |
destination | ASSET |
RECEIVE_REDEMPTION |
- |
Resource Type | Action |
---|---|
REVIEWABLE_REQUEST |
CREATE |
CreateRedemptionRequest operation creates a reviewable request that will transfer the specified amount from current holder's balance to destination balance after the reviewer's approval
Reference | string Reference of RedemptionRequest |
RedemptionRequest | object Parameters of RedemptionRequest |
AllTasks | uint32 (optional) Bit mask whose flags must be cleared in order for RedemptionRequest to be approved, which will be used by key redemption_tasks instead of key-value |
Ext | CreateRedemptionRequestOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" Operation has been successfully performed |
redemptionResponse | object (RedemptionRequestResponse) Result of successful application of |
Allow to unlock and send money from existing deferred payment
Resource Type | ReviewableRequestType | Action |
---|---|---|
REVIEWABLE_REQUEST |
CLOSE_DEFERRED_PAYMENT |
CANCEL |
CancelCloseDeferredPaymentRequestOp is used to cancel existing deferred payment creation request
RequestId | uint64 id of existing request |
Ext | CancelCloseDeferredPaymentRequestOpExtArmEmptyVersion (object) reserved for future use |
RequestId | uint64 id of existing request |
Ext | CancelCloseDeferredPaymentRequestOpExtArmEmptyVersion (object) reserved for future use |
Resource Type | ReviewableRequestType | Action |
---|---|---|
REVIEWABLE_REQUEST |
CREATE_DEFERRED_PAYMENT |
CANCEL |
CancelDeferredPaymentCreationRequestOp is used to cancel existing deferred payment creation request
RequestId | uint64 id of existing request |
Ext | CancelDeferredPaymentCreationRequestOpExtArmEmptyVersion (object) reserved for future use |
RequestId | uint64 id of existing request |
Ext | CancelDeferredPaymentCreationRequestOpExtArmEmptyVersion (object) reserved for future use |
Allow to unlock and send money from existing deferred payment
Account | Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|---|
source | REVIEWABLE_REQUEST |
CLOSE_DEFERRED_PAYMENT |
CREATE |
allTasks == null |
source | REVIEWABLE_REQUEST |
CLOSE_DEFERRED_PAYMENT |
CREATE_WITH_TASKS |
allTasks != null |
Resource Type | ReviewableRequestType | Action |
---|---|---|
REVIEWABLE_REQUEST |
CLOSE_DEFERRED_PAYMENT |
CREATE |
create_deferred_payment_close_tasks:<asset_code>
CreateCloseDeferredPaymentRequestOp is used to create CLOSE_DEFERRED_PAYMENT
request
RequestId | uint64 |
Request | object Body of request which will be created |
AllTasks | uint32 |
Ext | CreateCloseDeferredPaymentRequestOpExtArmEmptyVersion (object) reserved for the future use |
RequestId | uint64 |
Request | object Body of request which will be created |
AllTasks | uint32 |
Ext | CreateCloseDeferredPaymentRequestOpExtArmEmptyVersion (object) reserved for the future use |
Allow to create deferred payment and allow destination to manage this deferred payment
Account | Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|---|
source | REVIEWABLE_REQUEST |
CREATE_DEFERRED_PAYMENT |
CREATE |
allTasks == null |
source | REVIEWABLE_REQUEST |
CREATE_DEFERRED_PAYMENT |
CREATE_WITH_TASKS |
allTasks != null |
Resource Type | ReviewableRequestType | Action |
---|---|---|
REVIEWABLE_REQUEST |
CREATE_DEFERRED_PAYMENT |
CREATE |
create_deferred_payment_creation_tasks:<asset_code>
CreateDeferredPaymentCreationRequestOp is used to create CREATE_DEFERRED_PAYMENT
request
RequestId | uint64 |
Request | object Body of request which will be created |
AllTasks | uint32 (optional) Bit mask whose flags must be cleared in order for |
Ext | CreateDeferredPaymentCreationRequestOpExtArmEmptyVersion (object) reserved for the future use |
code | string Value: "SUCCESS"
|
success | object (CreateDeferredPaymentCreationRequestSuccess) Success result of CreateASwapAskCreationRequestOp application |
Allows to provide liquidity to the pool or create a new liquidity pool with provided assets amounts
Account | Resource Type | Action |
---|---|---|
source | LIQUIDITY_POOL |
LP_ADD_LIQUIDITY |
Resource Type | Action |
---|---|
LIQUIDITY_POOL |
LP_ADD_LIQUIDITY |
FirstAssetBalanceId | BalanceId Balance for first asset of the pair |
SecondAssetBalanceId | BalanceId Balance for second asset of the pair |
FirstAssetDesiredAmount | uint64 Desired amount of first asset to be provided |
SecondAssetDesiredAmount | uint64 Desired amount of second asset to be provided |
FirstAssetMinAmount | uint64 Minimal amount of first asset to be provided |
SecondAssetMinAmount | uint64 Minimal amount of second asset to be provided |
Ext | EmptyExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" LP add liquidity was successful |
success | object (LpAddLiquiditySuccess) |
Describes the liquidity pool state
Id | uint64 Unique sequential identifier of the liquidity pool |
LiquidityPoolAccount | AccountId Account that holds balances of the liquidity pool |
LpTokenAssetCode | string Asset code of the LP token |
FirstAssetBalance | BalanceId Balance of first asset |
SecondAssetBalance | BalanceId Balance of second asset |
LpTokensTotalCap | uint64 Total amount of all LP tokens |
FirstReserve | uint64 Amount of first asset stored in liquidity pool |
SecondReserve | uint64 Amount of second asset stored in liquidity pool |
Ext | EmptyExtArmEmptyVersion (object) Reserved for future usage |
struct LiquidityPoolEntry { //: Unique sequential identifier of the liquidity pool uint64 id; //: Account that holds balances of the liquidity pool AccountID liquidityPoolAccount; //: Asset code of the LP token AssetCode lpTokenAssetCode; //: Balance of first asset BalanceID firstAssetBalance; //: Balance of second asset BalanceID secondAssetBalance; //: Total amount of all LP tokens uint64 lpTokensTotalCap; //: Amount of first asset stored in liquidity pool uint64 firstReserve; //: Amount of second asset stored in liquidity pool uint64 secondReserve; //: Reserved for future usage EmptyExt ext; };
Allows to swap assets using a liquidity pool mechanism
Account | Resource Type | Action |
---|---|---|
source | LIQUIDITY_POOL |
LP_SWAP |
Resource Type | Action |
---|---|
LIQUIDITY_POOL |
LP_SWAP |
FromBalance | BalanceId Balance of the provided asset |
ToBalance | BalanceId Balance of the desired asset |
LpSwapRequest | LpSwapOpLpSwapRequestArmExactOutTokensForInTokens (object) or LpSwapOpLpSwapRequestArmExactInTokensForOutTokens (object) |
FeeData | object Fee data for the swap |
Ext | EmptyExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" LP swap was successful |
success | object (LpSwapSuccess) |
Allows to remove liquidity from the pool
Account | Resource Type | Action |
---|---|---|
source | LIQUIDITY_POOL |
LP_REMOVE_LIQUIDITY |
Resource Type | Action |
---|---|
LIQUIDITY_POOL |
LP_REMOVE_LIQUIDITY |
LpTokenBalance | BalanceId Balance of an LP token |
LpTokensAmount | uint64 Amount of the LP tokens to be exchanged for assets pair |
FirstAssetMinAmount | uint64 Minimal amount of first asset to be received |
SecondAssetMinAmount | uint64 Minimal amount of second asset to be received |
Ext | EmptyExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" LP remove liquidity was successful |
success | object (LpRemoveLiquiditySuccess) |
Allows managing signer for source account.
Account | Resource Type | Action |
---|---|---|
source | SIGNER |
MANAGE |
Resource Type | Action |
---|---|
SIGNER |
MANAGE |
ManageSignerOp is used to create, update or remove a signer
Data | One of multiple values data is used to pass one of |
Ext | EmptyExtArmEmptyVersion (object) reserved for future extension |
code | string Value: "SUCCESS" Specified action in |
ext | EmptyExtArmEmptyVersion (object) (EmptyExt) |
Signer Role - entry that consists of Signer Rules and can be attached to signer.
Allows to create, update or remove signer roles.
Account | Resource Type | Action |
---|---|---|
source | SIGNER_ROLE |
MANAGE |
Resource Type | Action |
---|---|
SIGNER_ROLE |
MANAGE |
ManageSignerRoleOp is used to create, update or remove a signer role
Data | One of multiple values data is used to pass one of |
Ext | ManageSignerRoleOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Means that the specified action in |
success | object (ManageSignerRoleResultSuccess) |
Signer Rule - entry that defines if action
can be performed for resource.
TokenD uses strict policy for rules matching.
List of requirements to the roles of participants is formed based on operation (transaction) details.
If one of the requirements is not fulfilled, operation is rejected.
Requirement is specified for signer and consits of resource and action to be performed.
Requirement is fulfilled if signer's role contains matching rule with forbids=false
.
If one of the matching rules has forbids=true
- operation is rejected.
If role does not contain any matching rules - operation is rejected.
Allows to create, update or remove signer rules.
Account | Resource Type | Action |
---|---|---|
source | SIGNER_RULE |
MANAGE |
Resource Type | Action |
---|---|
SIGNER_RULE |
MANAGE |
ManageSignerRuleOp is used to create, update or remove signer rule
Data | One of multiple values data is used to pass one of |
Ext | ManageSignerRuleOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Specified action in |
success | object (ManageSignerRuleResultSuccess) |
Describes the resources on which the signer can perform an action.
Describes properties of some entries that can be used to restrict the usage of entries
type | string Value: "REVIEWABLE_REQUEST" |
reviewableRequest | object (SignerRuleResourceReviewableRequest) |
//: Describes properties of some entries that can be used to restrict the use of entries union SignerRuleResource switch (LedgerEntryType type) { case REVIEWABLE_REQUEST: //: Describes properties which are equal to managed reviewable request entry fields struct { //: Describes properties of some reviewable request types that //: can be used to restrict the using of reviewable requests ReviewableRequestResource details; //: Bit mask of tasks which is allowed to add to reviewable request pending tasks uint64 tasksToAdd; //: Bit mask of tasks which is allowed to remove from reviewable request pending tasks uint64 tasksToRemove; //: Bit mask of tasks which is allowed to use as reviewable request pending tasks uint64 allTasks; EmptyExt ext; } reviewableRequest; case ASSET: //: Describes properties which are equal to managed asset entry fields struct { AssetCode assetCode; uint64 assetType; EmptyExt ext; } asset; case ANY: void; case OFFER_ENTRY: //: Describes properties which are equal to managed offer entry fields and their properties struct { //: type of base asset uint64 baseAssetType; //: type of quote asset uint64 quoteAssetType; //: code of base asset AssetCode baseAssetCode; //: code of quote asset AssetCode quoteAssetCode; bool isBuy; EmptyExt ext; } offer; case SALE: //: Describes properties which are equal to managed offer entry fields struct { uint64 saleID; uint64 saleType; EmptyExt ext; } sale; case ATOMIC_SWAP_BID: struct { uint64 assetType; AssetCode assetCode; EmptyExt ext; } atomicSwapBid; case SIGNER_RULE: //: Describes properties which are equal to managed signer rule entry fields struct { //: True means that resource will be triggered if default rule is managed //: or changing of `isDefault` property for signer rule bool isDefault; EmptyExt ext; } signerRule; case SIGNER_ROLE: //: Describes properties which are equal to managed signer role entry fields struct { //: For signer role creating resource will be triggered if `roleID` equals `0` uint64 roleID; EmptyExt ext; } signerRole; case SIGNER: //: Describes properties which are equal to managed signer entry fields struct { uint64 roleID; EmptyExt ext; } signer; case KEY_VALUE: //: Describes properties which are equal to managed key value entry fields struct { //: prefix of key longstring keyPrefix; //: reserved for future extension EmptyExt ext; } keyValue; default: //: reserved for future extension EmptyExt ext; };
Account Role - entry that consists of Account Rules and can be attached to account.
Allows to create, update or remove account roles.
Account | Resource Type | Action |
---|---|---|
source | ACCOUNT_ROLE |
MANAGE |
Resource Type | Action |
---|---|
ACCOUNT_ROLE |
MANAGE |
ManageAccountRoleOp is used to create, update or remove account role
Data | One of multiple values data is used to pass one of |
Ext | ManageAccountRoleOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" This means that the specified action in |
success | object (ManageAccountRoleResultSuccess) |
Account Rule defines if action
can be performed for resource.
TokenD uses strict policy for rules matching.
List of requirements to the roles of participants is formed based on operation (transaction) details.
If one of the requirements is not fulfilled, operation is rejected.
Requirement is specified for account and consits of resource and action to be performed.
Requirement is fulfilled if account's role contains matching rule with forbids=false
.
If one of the matching rules has forbids=true
- operation is rejected.
If role does not contain any matching rules - operation is rejected.
Describes the resources on which the account can perform an action.
Describes properties of some entries that can be used to restrict the usage of entries
type | string Value: "ASSET" |
asset | object (AccountRuleResourceAsset) |
//: Describes properties of some entries that can be used to restrict the use of entries union AccountRuleResource switch (LedgerEntryType type) { case ASSET: //: Describes properties which are equal to managed asset entry fields struct { AssetCode assetCode; uint64 assetType; EmptyExt ext; } asset; case REVIEWABLE_REQUEST: //: Describes properties which are equal to managed reviewable request entry fields struct { //: Describes properties of some reviewable request types that //: can be used to restrict the using of reviewable requests ReviewableRequestResource details; //: reserved for future extension EmptyExt ext; } reviewableRequest; case ANY: void; case OFFER_ENTRY: //: Describes properties which are equal to managed offer entry fields and their properties struct { //: type of base asset uint64 baseAssetType; //: type of quote asset uint64 quoteAssetType; //: code of base asset AssetCode baseAssetCode; //: code of quote asset AssetCode quoteAssetCode; bool isBuy; //: reserved for future extension EmptyExt ext; } offer; case SALE: //: Describes properties which are equal to managed offer entry fields struct { uint64 saleID; uint64 saleType; //: reserved for future extension EmptyExt ext; } sale; case ATOMIC_SWAP_BID: struct { uint64 assetType; AssetCode assetCode; EmptyExt ext; } atomicSwapBid; case KEY_VALUE: struct { //: prefix of key longstring keyPrefix; //: reserved for future extension EmptyExt ext; } keyValue; default: //: reserved for future extension EmptyExt ext; }; //: Describes properties of some reviewable request types that //: can be used to restrict the using of reviewable requests union ReviewableRequestResource switch (ReviewableRequestType requestType) { case CREATE_SALE: //: is used to restrict using of reviewable request with create_sale type struct { //: type of sale uint64 type; //: reserved for future extension EmptyExt ext; } createSale; case CREATE_ISSUANCE: //: is used to restrict using of reviewable request with create_issuance type struct { //: code of asset AssetCode assetCode; //: type of asset uint64 assetType; //: reserved for future extension EmptyExt ext; } createIssuance; case CREATE_WITHDRAW: //: is used to restrict using of reviewable request with create_withdraw type struct { //: code of asset AssetCode assetCode; //: type of asset uint64 assetType; //: reserved for future extension EmptyExt ext; } createWithdraw; default: //: reserved for future extension EmptyExt ext; };
Allows to create, update or remove account rules.
Account | Resource Type | Action |
---|---|---|
source | ACCOUNT_RULE |
MANAGE |
Resource Type | Action |
---|---|
ACCOUNT_RULE |
MANAGE |
ManageAccountRuleOp is used to create, update or remove account rule
Data | One of multiple values data is used to pass one of |
Ext | ManageAccountRuleOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Means that specified action in |
success | object (ManageAccountRuleResultSuccess) |
Account Specific Rules
are similar in functionality to Account Rules
- they define permissions to interact with various TokenD entities on account level. The main difference between Account Specific Rules
and Account Rules
is that with Account Specific Rules
it's possible to define permissions for particular account without need to create separate role for this account. What is more, Account Specific Rules
are managed by both Admins and entry owners.
Main use case for this feature is white/black lists for particular entity. In current version it's only possible to manage white/black lists for sales.
Allows to create account specific rules. Only rules for sales now supported.
No account rule required because only entry owner or admin can create specific rules
Resource Type | Action |
---|---|
ACCOUNT_SPECIFIC_RULE |
CREATE |
ManageAccountSpecificRuleOp is used to create or remove account specific rule
Data | ManageAccountSpecificRuleOpDataArmCreate (object) or ManageAccountSpecificRuleOpDataArmRemove (object) data is used to pass one of |
Ext | ManageAccountSpecificRuleOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Means that specified action in |
success | object (ManageAccountSpecificRuleResultSuccess) |
Allows to remove account specific rules.
No account rule required because only entry owner or admin can remove specific rules
Resource Type | Action |
---|---|
ACCOUNT_SPECIFIC_RULE |
REMOVE |
ManageAccountSpecificRuleOp is used to create or remove account specific rule
Data | ManageAccountSpecificRuleOpDataArmCreate (object) or ManageAccountSpecificRuleOpDataArmRemove (object) data is used to pass one of |
Ext | ManageAccountSpecificRuleOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Means that specified action in |
success | object (ManageAccountSpecificRuleResultSuccess) |
Allows to cancel change role reviewable request
Only reviewable request creator can cancel request
Resource Type | Reviewable Request Type | Action |
---|---|---|
REVIEWABLE_REQUEST |
CHANGE_ROLE |
CANCEL |
CancelChangeRoleRequestOp is used to cancel reviwable request for changing role. If successful, request with the corresponding ID will be deleted
RequestId | uint64 ID of the ChangeRoleRequest request to be canceled |
Ext | CancelChangeRoleRequestOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" Operation is successfully applied |
success | object (CancelChangeRoleSuccess) Result of successful |
Allows creating CHANGE_ROLE
reviewable request.
CHANGE_ROLE
request is used to change role of account.
Account | Resource Type | Action | Condition |
---|---|---|---|
source | REVIEWABLE_REQUEST |
CREATE |
allTasks == null && destAccountID == source |
source | REVIEWABLE_REQUEST |
CREATE_WITH_TASKS |
allTasks != null || destAccountID != source |
Resource Type | Action |
---|---|
REVIEWABLE_REQUEST |
CREATE |
CreateChangeRoleRequestOp
is used to create reviewable requests
that, with admin's approval, will change the role of destinationAccount
from current role to accountRoleToSet
RequestId | uint64 Set zero to create new request, set non zero to update existing request |
DestinationAccount | AccountId AccountID of an account whose role will be changed |
AccountRoleToSet | uint64 ID of account role that will be attached to |
CreatorDetails | string Arbitrary stringified json object that can be used to attach data to be reviewed by an admin |
AllTasks | uint32 Bit mask that will be used instead of the value from key-value entry by
|
Ext | CreateChangeRoleRequestOpExtArmEmptyVersion (object) |
code | string Value: "SUCCESS" Change role request has either been successfully created or auto approved |
success | object (CreateChangeRoleRequestResultSuccess) |
Allows creating KYC_RECOVERY
reviewable request.
KYC_RECOVERY
request is used to finish account recovery, i.e. add new signers for the account.
KYC_RECOVERY
can be created by either admin, or some account. On request creation requestor
is
being set to targetAccount
. It can be updated by targetAccount
(providing additional kyc data)
and is being reviewed by admin.
Account | Resource Type | Action | Condition |
---|---|---|---|
source | REVIEWABLE_REQUEST |
CREATE |
allTasks == null && targetAccount == source |
source | REVIEWABLE_REQUEST |
CREATE_WITH_TASKS |
allTasks != null || targetAccount == source |
source | REVIEWABLE_REQUEST |
CREATE_FOR_OTHER |
allTasks == null && targetAccount != source |
source | REVIEWABLE_REQUEST |
CREATE_FOR_OTHER_WITH_TASKS |
allTasks != null || targetAccount != source |
Resource Type | Action |
---|---|
REVIEWABLE_REQUEST |
CREATE |
CreateKYCRecoveryRequestOp to create KYC recovery request and set new signers for account
RequestId | uint64 ID of a reviewable request. If set 0, request is created, else - request is updated |
TargetAccount | AccountId Account for which signers will be set |
SignersData | Array of objects New signers to set |
CreatorDetails | string Arbitrary stringified json object that can be used to attach data to be reviewed by an admin |
AllTasks | uint32 (optional) Bit mask whose flags must be cleared in order for KYC recovery request to be approved, which will be used by key |
Ext | CreateKycRecoveryRequestOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" KYC Recovery request was successfully created |
success | object (CreateKycRecoveryRequestResultSuccess) |
Allows to initiate KYC recovery process. KYC recovery is the process of changing all of the account
signers. InitiateKYCRecovery
deletes all existing signers of account and creates the new one with
publicKey
provided in operation with role got by key kyc_recovery_signer_role
.
Account | Resource Type | Rule Action | Details |
---|---|---|---|
source | INITIATE_KYC_RECOVERY |
CREATE |
Resource includes id of the account role |
Resource Type | Action | Details |
---|---|---|
INITIATE_KYC_RECOVERY |
CREATE |
Resource includes id of the account role |
InitiateKYCRecoveryOp is used to start KYC recovery process
Account | AccountId Address of account to be recovered |
Signer | PublicKeyArmKeyTypeEd25519 (object) New signer to set |
Ext | InitiateKycRecoveryOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Means that KYC recovery was successfully initiated |
success | object (InitiateKycRecoveryResultSuccess) |
Anti money laundering alert request locks provided amount on target balance
until further investigation. On AMLAlertRequest approve locked amount is being voided.
Aml alert request is a reviewable request. It uses tasks - bitmask, where each bit represents conditions under which
request can be approved. Tasks can be set or cleared both manually(by reviewer) and automatically.
Tasks bit mask can be provided either from KeyValueEntry
by key aml_alert_create
(which specify tasks
for aml alert request) or field allTasks
, then KeyValueEntry
won't be used.
Account | Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|---|
source | REVIEWABLE_REQUEST |
CREATE_AML_ALERT |
CREATE |
allTasks == null |
source | REVIEWABLE_REQUEST |
CREATE_AML_ALERT |
CREATE_WITH_TASKS |
allTasks != null |
Resource Type | Reviewable Request Type | Action |
---|---|---|
REVIEWABLE_REQUEST |
CREATE_AML_ALERT |
CREATE |
CreateAMLAlertRequest operation creates a reviewable request that will void the specified amount from target balance after the reviewer's approval
Reference | string Reference of AMLAlertRequest |
AmlAlertRequest | object Parameters of AMLAlertRequest |
AllTasks | uint32 (optional) Bit mask whose flags must be cleared in order for AMLAlertRequest to be approved, which will be used by key aml_alert_tasks: |
Ext | CreateAmlAlertRequestOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" Operation has been successfully performed |
success | object (CreateAmlAlertRequestSuccess) Result of successful application of |
Allows either to create new UpdateLimits
reviewable request or update existing one
Account | Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|---|
source | REVIEWABLE_REQUEST |
UPDATE_LIMITS |
CREATE |
allTasks == null |
source | REVIEWABLE_REQUEST |
UPDATE_LIMITS |
CREATE_WITH_TASKS |
allTasks != null |
Resource Type | Rule Action |
---|---|
REVIEWABLE_REQUEST |
CREATE |
CreateManageLimitsRequestOp is used to create a reviewable request which, after approval, will update the limits set in the system
ManageLimitsRequest | object Body of the |
AllTasks | uint32 (optional) Bit mask whose flags must be cleared in order for ManageLimits request to be approved, which will be used instead of value from the key-value pair
by key |
RequestId | uint64 ID of the LimitsUpdateRequest
If |
Ext | CreateManageLimitsRequestOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Operation was successfully applied and ManageLimitsRequest was successfully created |
success | object (CreateManageLimitsRequestResultSuccess) |
Allows to create or remove the existing limits entries.
Account | Resource Type | Action |
---|---|---|
source | LIMITS_V2 |
MANAGE |
Resource Type | Rule Action |
---|---|
LIMITS_V2 |
MANAGE |
ManageLimitsOp
is used to update limits set in the system
Details | ManageLimitsOpDetailsArmCreate (object) or ManageLimitsOpDetailsArmRemove (object)
|
Ext | ManageLimitsOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS"
|
success | object (ManageLimitsResultSuccess) |
Describes the asset pairs as a set of properties and policies for two particular assets (i.e. base and quote assets).
AssetPairEntry
is used in system to group different assets into pairs and set particular policies and properties for them
Base | string Code of base asset of the asset pair |
Quote | string Code of quote asset of the asset pair |
CurrentPrice | long defines an asset pair price as quote asset divided by base asset (i.e., amount of quote asset per 1 base asset) |
PhysicalPrice | long Price of the asset pair assigned on creation. Can only be updated by application
the |
PhysicalPriceCorrection | long Price of the asset pair assigned on creation. Can only be updated by application
the |
MaxPriceStep | long Max price step in percent. User is allowed to set offer only if both of
|
Policies | integer Bitmask of asset policies set by creator or corrected by |
Ext | AssetPairEntryExtArmEmptyVersion (object) |
//: Policies that could be applied to AssetPair entry and define applicable operations for AssetPair enum AssetPairPolicy { //: If not set pair can not be traded on secondary market TRADEABLE_SECONDARY_MARKET = 1, //: If set, then prices for new offers must be greater then physical price with correction PHYSICAL_PRICE_RESTRICTION = 2, //: if set, then price for new offers must be in interval of (1 ± maxPriceStep)*currentPrice CURRENT_PRICE_RESTRICTION = 4 }; //: `AssetPairEntry` is used in system to group different assets into pairs and set particular policies and properties for them struct AssetPairEntry { //: Code of base asset of the asset pair AssetCode base; //: Code of quote asset of the asset pair AssetCode quote; //: defines an asset pair price as quote asset divided by base asset (i.e., amount of quote asset per 1 base asset) int64 currentPrice; //: Price of the asset pair assigned on creation. Can only be updated by application //: the `ManageAssetPair` operation with action `UPDATE_PRICE` int64 physicalPrice; //: Price of the asset pair assigned on creation. Can only be updated by application //: the `ManageAssetPair` operation with action `UPDATE_PRICE` int64 physicalPriceCorrection; //: Max price step in percent. User is allowed to set offer only if both of //: `price < (1 - maxPriceStep) * currentPrice` and `price > (1 + maxPriceStep) * currentPrice` are `true` int64 maxPriceStep; //: Bitmask of asset policies set by creator or corrected by `ManageAssetPair` operations int32 policies; // reserved for future use union switch (LedgerVersion v) { case EMPTY_VERSION: void; } ext; };
Allows to create new asset pairs or update either policies or prices of the existing asset pairs.
Account | Resource Type | Action |
---|---|---|
source | ASSET_PAIR |
MANAGE |
Resource Type | Rule Action |
---|---|
ASSET_PAIR |
MANAGE |
ManageAssetPairOp
either creates new asset pairs or updates prices or policies of existing asset pairs
Action | string Enum: "CREATE" "UPDATE_PRICE" "UPDATE_POLICIES" Defines a ManageBalanceAction that will be performed on an asset pair |
Base | string Defines a base asset of an asset pair |
Quote | string Defines a base asset of an asset pair |
PhysicalPrice | long New physical price of the asset pair which would be set after successful |
PhysicalPriceCorrection | long New correction of the asset pair physical price in percents |
MaxPriceStep | long New maximal price step of asset pair |
Policies | integer Bitmask of asset policies set by the creator or corrected by manage asset operations |
Ext | ManageAssetPairOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Indicates that |
success | object (ManageAssetPairSuccess)
|
Removes asset pairs.
Account | Resource Type | Action |
---|---|---|
source | ASSET_PAIR |
REMOVE |
Resource Type | Rule Action |
---|---|
ASSET_PAIR |
REMOVE |
RemoveAssetPairOp
removes specified asset pair
Base | string Defines a base asset of an asset pair |
Quote | string Defines a base asset of an asset pair |
Ext | RemoveAssetPairOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Operation is successfully applied |
success | object (RemoveAssetPairSuccess) Result of successful |
Allows to create request to make offer in some asset pair or participate in sale.
ManageOffer request is a reviewable request. It uses tasks - bitmask, where each bit represents conditions under which
request can be approved. Tasks can be set or cleared both manually(by reviewer) and automatically.
Tasks bit mask can be provided from KeyValueEntry
.
If field allTasks
is set, KeyValueEntry
won't be used.
Account | Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|---|
receiver | ASSET |
- | RECEIVE_PAYMENT |
- |
source | REVIEWABLE_REQUEST |
MANAGE_OFFER |
CREATE |
allTasks == null |
source | REVIEWABLE_REQUEST |
MANAGE_OFFER |
CREATE_WITH_TASKS |
allTasks != null |
Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|
REVIEWABLE_REQUEST |
MANAGE_OFFER |
CREATE |
allTasks == null |
REVIEWABLE_REQUEST |
MANAGE_OFFER |
CREATE_WITH_TASKS |
allTasks != null |
If `allTasks' field is not set, tasks for request will be taken from one of the following key values.
Key | Condition | Description |
---|---|---|
create_offer_tasks:<base>:<quote> |
offerID == 0 && orderBookID == 0 |
Used to set tasks on offer creation |
remove_offer_tasks:<base>:<quote> |
offerID != 0 && orderBookID == 0 && amount == 0 |
Used to set tasks on offer removal |
create_sale_participation_tasks:<base>:<quote> |
offerID == 0 && orderBookID != 0 |
Used to set tasks on sale participation creation |
remove_sale_participation_tasks:<base>:<quote> |
offerID != 0 && orderBookID != 0 && amount == 0 |
Used to set tasks on sale participation removal |
<base>
- order book base asset code. Usage of *
to match any asset code is allowed.
<quote>
- order book quote asset code. Usage of *
to match any asset code is allowed.
Request | object ManageOfferRequest details |
AllTasks | uint32 (optional) Bit mask whose flags must be cleared in order for CreateSale request to be approved, which will be used by key sale_create_tasks: |
Ext | EmptyExtArmEmptyVersion (object) reserved for future extension |
code | string Value: "SUCCESS" CreateManageOfferRequestOp was successfully applied |
success | object (CreateManagerOfferRequestSuccessResult) |
Allows to create offer with provided parameters
Account | Resource Type | Action |
---|---|---|
source | OFFER_ENTRY |
CREATE |
Resource Type | Action |
---|---|
OFFER_ENTRY |
CREATE |
ManageOfferOp is used to create or delete offer
BaseBalance | BalanceId Balance for base asset of an offer creator |
QuoteBalance | BalanceId Balance for quote asset of an offer creator |
IsBuy | boolean Direction of an offer (to buy or to sell) |
Amount | long Amount in base asset to buy or sell (to delete an offer, set 0) |
Price | long Price of base asset in the ratio of quote asset |
Fee | long Fee in quote asset to pay |
OfferId | uint64 ID of an offer to be managed. 0 to create a new offer, otherwise to edit an existing offer |
OrderBookId | uint64 ID of an orderBook to put an offer in and to find a match in |
Ext | ManageOfferOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" ManageOfferOp was successfully applied |
success | object (ManageOfferSuccessResult) Contains details of successful operation application |
Allows to remove offer by ID, providing amount = 0
Only offer owner can remove existing offer
Resource Type | Action |
---|---|
OFFER_ENTRY |
REMOVE |
ManageOfferOp is used to create or delete offer
BaseBalance | BalanceId Balance for base asset of an offer creator |
QuoteBalance | BalanceId Balance for quote asset of an offer creator |
IsBuy | boolean Direction of an offer (to buy or to sell) |
Amount | long Amount in base asset to buy or sell (to delete an offer, set 0) |
Price | long Price of base asset in the ratio of quote asset |
Fee | long Fee in quote asset to pay |
OfferId | uint64 ID of an offer to be managed. 0 to create a new offer, otherwise to edit an existing offer |
OrderBookId | uint64 ID of an orderBook to put an offer in and to find a match in |
Ext | ManageOfferOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" ManageOfferOp was successfully applied |
success | object (ManageOfferSuccessResult) Contains details of successful operation application |
Allows to cancel creation of the sale
Only sale creator can cancel request
Resource Type | Reviewable Request Type | Action |
---|---|---|
REVIEWABLE_REQUEST |
CREATE_SALE |
CANCEL |
CancelSaleCreationRequest operation is used to cancel sale creation request. If successful, request with the corresponding ID will be deleted SaleCreationRequest with provided ID
RequestId | uint64 ID of the SaleCreation request to be canceled |
Ext | CancelSaleCreationRequestOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" Operation is successfully applied |
success | object (CancelSaleCreationSuccess) Result of successful |
Allows to check sale state. If sale reached hard cap or end time has come and reached soft cap, it will be closed and exchange between sale owner and participants will be performed.
Account | Resource Type | Action |
---|---|---|
source | SALE |
CHECK |
Resource Type | Action |
---|---|
SALE |
CHECK |
CheckSaleState operation is used to perform check on sale state - whether the sale was successful or not
SaleId | uint64 ID of the sale to check |
Ext | CheckSaleStateOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" CheckSaleState operation was successfully applied |
success | object (CheckSaleStateSuccess) Result of the successful application of CheckSaleState operation |
Allows to create reviewable request which on approval will create sale for base asset. Quote assets are assets in which investments can be made. Base asset is an asset being sold.
There are 4 types of sale:
Account | Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|---|
source | REVIEWABLE_REQUEST |
CREATE_SALE |
CREATE |
allTasks == null |
source | REVIEWABLE_REQUEST |
CREATE_SALE |
CREATE_WITH_TASKS |
allTasks != null |
Resource Type | ReviewableRequestType | Action |
---|---|---|
REVIEWABLE_REQUEST |
CREATE_SALE |
CREATE |
CreateSaleCreationRequest operation creates SaleCreationRequest or updates the rejected request
RequestId | uint64 ID of the SaleCreationRequest. If set to 0, a new request is created |
Request | object SaleCreationRequest details |
AllTasks | uint32 (optional) Bit mask whose flags must be cleared in order for CreateSale request to be approved, which will be used by key sale_create_tasks: |
Ext | CreateSaleCreationRequestOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" CreateSaleCreationRequest operation was successfully applied |
success | object (CreateSaleCreationSuccess) Result of the successful application of CreateSaleCreationRequest operation |
Allows to create reviewable request which after approval will update sale details
Account | Resource Type | Reviewable Request Type | Action | Condition |
---|---|---|---|---|
source | REVIEWABLE_REQUEST |
UPDATE_SALE_DETAILS |
CREATE |
allTasks == null |
source | REVIEWABLE_REQUEST |
UPDATE_SALE_DETAILS |
CREATE_WITH_TASKS |
allTasks != null |
Resource Type | Action |
---|---|
SALE |
MANAGE |
ManageSaleOp is used to cancel a sale, or create a reviewable request which, after approval, will update sale details.
SaleId | uint64 ID of the sale to manage |
Data | One of multiple values data is used to pass ManageSaleAction along with required parameters |
Ext | ManageSaleOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" Operation is successfully applied |
success | object (ManageSaleResultSuccess) Result of ManageSale operation successful application |
Allows to cancel sale
Only sale owner or admin are able to manage sale
Resource Type | Action |
---|---|
SALE |
MANAGE |
ManageSaleOp is used to cancel a sale, or create a reviewable request which, after approval, will update sale details.
SaleId | uint64 ID of the sale to manage |
Data | One of multiple values data is used to pass ManageSaleAction along with required parameters |
Ext | ManageSaleOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" Operation is successfully applied |
success | object (ManageSaleResultSuccess) Result of ManageSale operation successful application |
Reserved keys (or key prefixes) which are used for system configuration.
Instead of certain value *
can be allowed and means than any parameter is appropriate.
Key value for reviewable request:
change_role_tasks:<currentAccountRoleID>:<accountRoleToSet>
(*
is allowed)issuance_tasks:<assetCode>
(*
is allowed)withdrawal_tasks:<assetCode>
(*
is allowed)preissuance_tasks:<assetCode>
(*
is allowed)asset_create_tasks
asset_update_tasks
sale_create_tasks:<assetCode>
(*
is allowed)sale_update_tasks:<saleID>
(*
is allowed)aml_alert_create
limits_update_tasks
atomic_swap_ask_tasks
atomic_swap_bid_tasks:<quote_asset>
(*
is allowed)create_poll_tasks:<permissionType>
(*
is allowed)Deposits:
ext_sys_exp_period:<externalSytemType>
(*
is NOT allowed)Withdraw:
withdraw_lower_bound:<assetCode>
(*
is allowed)char const *changeRoleTasks = "change_role_tasks"; char const *externalSystemPrefix = "ext_sys_exp_period"; char const *issuanceTasksPrefix = "issuance_tasks"; char const *withdrawalTasksPrefix = "withdrawal_tasks"; char const *preIssuanceTasksPrefix = "preissuance_tasks"; char const *assetCreateTasks = "asset_create_tasks"; char const *assetUpdateTasks = "asset_update_tasks"; char const *saleUpdateDetailsTasksPrefix = "sale_update_tasks"; char const *saleCreateTasksPrefix = "sale_create_tasks"; char const *amlAlertCreateTasks = "aml_alert_create"; char const *limitsUpdateTasks = "limits_update_tasks"; char const *atomicSwapTasksPrefix = "atomic_swap_bid_tasks"; char const *atomicSwapAskTasks = "atomic_swap_ask_tasks"; char const *withdrawLowerBoundPrefix = "withdraw_lower_bound"; char const *maxSaleRulesNumbersKey = "max_sale_rules_number"; char const *createPollTasks = "create_poll_tasks"; char const *createKycRecoveryTasks = "create_kyc_recovery_tasks"; char const *kycRecoveryEnabled = "kyc_recovery_enabled"; char const *kycRecoverySignerRole = "kyc_recovery_signer_role";
Operation allows to update key-value entry on successful application
Account | Resource Type | Action |
---|---|---|
source | KEY_VALUE |
MANAGE |
Resource Type | Rule Action |
---|---|
KEY_VALUE |
MANAGE |
ManageKeyValueOp
is used to create the manage key-value operation which, if applied successfully, will update the key-value entry present in the system
Key | string
|
Action | ManageKeyValueOpActionArmPut (object) or ManageKeyValueOpActionArmRemove (object)
|
Ext | ManageKeyValueOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS"
|
success | object (ManageLimitsResultSuccess) |
Allows to review pending reviewable requests. Operation performs specified action - APPROVE
, REJECT
or
PERMANENT_REJECT
on request.
It also sets or removes tasks - bit flags.
For request to be fulfilled, all tasks should be cleared, i.e. field pendingTasks
of request that is being
reviewed should be zero.
There are no account role requirements. Only Reviewer
can review request
Resource Type | Action | Details |
---|---|---|
REVIEWABLE_REQUEST |
REVIEW |
Reviewable request resource has subtype which should correspond to type of the request being reviewed |
Review Request operation
RequestId | uint64 ID of a request that is being reviewed |
RequestHash | array Hash of a request that is being reviewed |
RequestDetails | One of multiple values requestDetails is used to pass request type along with details specific to it. |
Action | string Enum: "APPROVE" "REJECT" "PERMANENT_REJECT" Review action defines an action performed on the pending ReviewableRequest |
Reason | string Contains reject reason |
ReviewDetails | object Details of the ReviewRequest operation |
Ext | ReviewRequestOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" Codes considered as "success" for an operation Operation is applied successfully |
success | object (ExtendedResult) Extended result of a Review Request operation containing details specific to certain request types |
License is used to increase allowed number of admins and set new due date. Auxilary signatures are used to validate license authenticity.
Account | Resource Type | Action |
---|---|---|
source | LICENSE |
CREATE |
Resource Type | Action |
---|---|
LICENSE |
CREATE |
License operation is used to increase the allowed number of admins and due date
AdminCount | uint64 Allowed number of admins to set in the system |
DueDate | uint64 Expiration date of the license |
LedgerHash | array Hash of a stamped ledger |
PrevLicenseHash | array Hash of the previous license |
Signatures | Array of objects Signatures are used to prove authenticity of license that is being submitted. |
Ext | LicenseOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" License submit was successful, provided adminCount and dueDate were set in the system |
success | object (LicenseSuccess) LicenseSuccess is a result of successful LicenseOp application |
Allows to save current license hash and currenct ledger hash for use in LicenseOp application
Account | Resource Type | Action |
---|---|---|
source | STAMP |
CREATE |
Resource Type | Action |
---|---|
STAMP |
CREATE |
StampOp is used to save current ledger hash and current license hash
Ext | StampOpExtArmEmptyVersion (object) Reserved for future use |
code | string Value: "SUCCESS" Stamp was successful |
success | object (StampSuccess) StampSuccess is used to pass saved ledger hash and license hash |
Allows to lock some amount of asset on source balance with ability to send it to destination account/balance if destination knows secret.
Swap can be closed if:
Account | Resource Type | Action |
---|---|---|
swapSource | SWAP |
EXCHANGE |
swapDest | SWAP |
EXCHANGE |
Resource Type | Rule Action |
---|---|
SWAP |
EXCHANGE |
SwapId | uint64 ID of the swap to close |
Secret | array (optional) Secret of the swap. Must be provided in order for destination of the swap to receive funds |
Ext | EmptyExtArmEmptyVersion (object) reserved for future extension |
code | string Value: "SUCCESS" CloseSwap was successful |
success | object (CloseSwapSuccess) CloseSwapSuccess is used to pass saved ledger hash and license hash |
Allows to lock some amount of asset on source balance with ability to send it to destination account/balance if destination knows secret.
Account | Resource Type | Action |
---|---|---|
source | SWAP |
EXCHANGE |
destination | SWAP |
EXCHANGE |
Resource Type | Rule Action |
---|---|
SWAP |
EXCHANGE |
SourceBalance | BalanceId Source balance of the swap |
Amount | uint64 Amount to send in swap |
Destination | OpenSwapOpDestinationArmAccount (object) or OpenSwapOpDestinationArmBalance (object)
|
FeeData | object Fee data for the swap |
Details | string Arbitrary stringified json object provided by swap source |
SecretHash | array Hash of the secret |
LockTime | long Time till which swapped funds can be received by destination if valid secret is provided |
Ext | EmptyExtArmEmptyVersion (object) reserved for future extension |
code | string Value: "SUCCESS" OpenSwap was successful |
success | object (OpenSwapSuccess) OpenSwapSuccess is used to pass saved ledger hash and license hash |
Allows to cancel (remove) CREATE_POLL
reviewable request
Only CREATE_POLL
request creator can cancel request
Resource Type | Reviewable Request Type | Rule Action |
---|---|---|
REVIEWABLE_REQUEST |
CREATE_POLL |
CANCEL |
ManageCreatePollRequestOp is used to create or remove a CREATE_POLL
request
Data | ManageCreatePollRequestOpDataArmCreate (object) or ManageCreatePollRequestOpDataArmCancel (object) data is used to pass one of |
Ext | ManageCreatePollRequestOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS"
|
success | object (ManageCreatePollRequestSuccessResult) Success result of operation application |
Allows to cancel poll. Only admin or poll owner can cancel poll.
Account | Resource Type | Rule Action |
---|---|---|
source | POLL |
CANCEL |
Resource Type | Rule Action |
---|---|
POLL |
CANCEL |
ManagePollOp is used to close, update end time or cancel the poll
PollId | uint64 ID of poll to manage |
Data | One of multiple values data is used to pass one of |
Ext | ManagePollOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Specified action in |
ext | EmptyExtArmEmptyVersion (object) (EmptyExt) |
Allows to submit poll result. Only resultProvider
can sumbit poll result
Account | Resource Type | Rule Action |
---|---|---|
source | POLL |
CLOSE |
Resource Type | Rule Action |
---|---|
POLL |
CLOSE |
ManagePollOp is used to close, update end time or cancel the poll
PollId | uint64 ID of poll to manage |
Data | One of multiple values data is used to pass one of |
Ext | ManagePollOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Specified action in |
ext | EmptyExtArmEmptyVersion (object) (EmptyExt) |
Allows to create CREATE_POLL
reviewable request.
CREATE_POLL
request is used to create poll entry
Account | Resource Type | Reviewable Request Type | Rule Action | Condition |
---|---|---|---|---|
source | REVIEWABLE_REQUEST |
CREATE_POLL |
CREATE |
allTasks == null |
source | REVIEWABLE_REQUEST |
CREATE_POLL |
CREATE_WITH_TASKS |
allTasks != null |
Resource Type | Reviewable Request Type | Rule Action | Details |
---|---|---|---|
REVIEWABLE_REQUEST |
CREATE_POLL |
CREATE |
Resource includes permission type of poll |
ManageCreatePollRequestOp is used to create or remove a CREATE_POLL
request
Data | ManageCreatePollRequestOpDataArmCreate (object) or ManageCreatePollRequestOpDataArmCancel (object) data is used to pass one of |
Ext | ManageCreatePollRequestOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS"
|
success | object (ManageCreatePollRequestSuccessResult) Success result of operation application |
Allows update poll end time. Only admin or poll owner can update poll end time.
Account | Resource Type | Rule Action |
---|---|---|
source | POLL |
UPDATE_END_TIME |
Resource Type | Rule Action |
---|---|
POLL |
UPDATE_END_TIME |
ManagePollOp is used to close, update end time or cancel the poll
PollId | uint64 ID of poll to manage |
Data | One of multiple values data is used to pass one of |
Ext | ManagePollOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Specified action in |
ext | EmptyExtArmEmptyVersion (object) (EmptyExt) |
Allows to create (send) vote
Account | Resource Type | Rule Action |
---|---|---|
source | VOTE |
CREATE |
Account | Resource Type | Rule Action | Condition |
---|---|---|---|
source | VOTE |
CREATE |
Always |
resultProvider | VOTE |
CREATE_FOR_OTHER |
voteConfirmationRequired == true |
ManageVoteOp is used to create (send) or remove (cancel) vote
Data | ManageVoteOpDataArmCreate (object) or ManageVoteOpDataArmRemove (object)
|
Ext | ManageVoteOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Specified action in |
ext | EmptyExtArmEmptyVersion (object) (EmptyExt) |
Allows to remove (cancel) own vote
Account | Resource Type | Rule Action |
---|---|---|
source | VOTE |
REMOVE |
Account | Resource Type | Rule Action |
---|---|---|
source | VOTE |
REMOVE |
ManageVoteOp is used to create (send) or remove (cancel) vote
Data | ManageVoteOpDataArmCreate (object) or ManageVoteOpDataArmRemove (object)
|
Ext | ManageVoteOpExtArmEmptyVersion (object) reserved for future use |
code | string Value: "SUCCESS" Specified action in |
ext | EmptyExtArmEmptyVersion (object) (EmptyExt) |
Allows to create data
Account | Resource Type | Rule Action | Details |
---|---|---|---|
source | DATA |
CREATE |
Resource contains data type |
Account | Resource Type | Rule Action | Condition | Details |
---|---|---|---|---|
source | DATA |
CREATE |
Always | Resource contains data type |
Type | uint64 Numeric type, used for access control |
Value | string Value to store |
Ext | EmptyExtArmEmptyVersion (object) Reserved for future extension |
code | string Value: "SUCCESS" Data entry was successfully created |
success | object (CreateDataSuccess) |
Describes the data pairs as a set of properties and policies for two particular datas (i.e. base and quote datas).
Id | uint64 ID of the data entry |
Type | uint64 Numeric type, used for access control |
Value | string Value stored |
Owner | AccountId Creator of the entry |
Ext | EmptyExtArmEmptyVersion (object) Reserved for future extension |
struct DataEntry { //: ID of the data entry uint64 id; //: Numeric type, used for access control uint64 type; //: Value stored longstring value; //: Owner of the entry AccountID owner; //: Reserved for future extension EmptyExt ext; };
Allows to remove data
Account | Resource Type | Rule Action | Condition | Details |
---|---|---|---|---|
source | DATA |
REMOVE |
source accountID is equal to data owner |
Resource contains data type |
source | DATA |
REMOVE_FOR_OTHER |
source accountID is not equal to data owner |
Resource contains data type |
Account | Resource Type | Rule Action | Condition | Details |
---|---|---|---|---|
source | DATA |
REMOVE |
source accountID is equal to data owner |
Resource contains data type |
source | DATA |
REMOVE_FOR_OTHER |
source accountID is not equal to data owner |
Resource contains data type |
DataId | uint64 ID of the data to remove |
Ext | EmptyExtArmEmptyVersion (object) Reserved for future extension |
code | string Value: "SUCCESS" Data successfully removed |
ext | EmptyExtArmEmptyVersion (object) (EmptyExt) |
Allows to update data
Account | Resource Type | Rule Action | Condition | Details |
---|---|---|---|---|
source | DATA |
UPDATE |
source accountID is equal to data owner |
Resource contains data type |
source | DATA |
UPDATE_FOR_OTHER |
source accountID is not equal to data owner |
Resource contains data type |
Account | Resource Type | Rule Action | Condition | Details |
---|---|---|---|---|
source | DATA |
UPDATE |
source accountID is equal to data owner |
Resource contains data type |
source | DATA |
UPDATE_FOR_OTHER |
source accountID is not equal to data owner |
Resource contains data type |
DataId | uint64 ID of the data entry to update |
Value | string New value to set |
Ext | EmptyExtArmEmptyVersion (object) Reserved for future extension |
code | string Value: "SUCCESS" Data was successfully updated |
ext | EmptyExtArmEmptyVersion (object) (EmptyExt) |
Allows to update an owner of data
Account | Resource Type | Rule Action | Condition | Details |
---|---|---|---|---|
source | DATA |
TRANSFER_OWNERSHIP |
source accountID is equal to data owner |
Resource contains data type |
Account | Resource Type | Rule Action | Condition | Details |
---|---|---|---|---|
source | DATA |
TRANSFER_OWNERSHIP |
source accountID is equal to data owner |
Resource contains data type |
DataId | uint64 ID of the data entry to update an owner |
NewOwner | AccountId A new owner of the entry |
Ext | EmptyExtArmEmptyVersion (object) Reserved for future extension |
code | string Value: "SUCCESS" An owner of the data was successfully updated |
success | object (UpdateDataOwnerSuccess) Result of successful application of |