Event class interface

1. Transfer event

1.1 Create transfer event

  • The full name of the interface: trTransferAsset
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trTransferAsset
  • Request parameters:
    interface TrTransferAsset extends TrCommonParam {
    /**The amount of transferred equity, composed of 0-9 and excluding the decimal point, must be greater than 0 */
    amount: string;
    /**The type of equity to be transferred, composed of uppercase letters, 3-5 characters */
    assetType?: string;
    /**The chain name of the transferred equity, composed of lowercase letters, 3-8 digits */
    sourceChainName?: string;
    /**The network identifier of the chain to which the transferred equity belongs, composed of uppercase letters or numbers, 5 characters, and the last digit is the check digit */
    sourceChainMagic?: string;
    /**The receiving account address of the event, base58-encoded hexadecimal string */
    recipientId: string;
    }
  • Return parameters:
    interface TrCommonParamResponse {
    /**whether succeed */
    success: boolean;
    result: {
        /** The buffer that needs to be signed is converted to a base64 string */
        buffer: string
    }
    }

    1.2 Create transfer event (with security key)

  • The full name of the interface: trTransferAssetWithSign
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trTransferAssetWithSign
  • Request parameters:
    interface TrTransferAssetWithSign {
    /**The buffer generated by the event body without signature is generated by TrTransferAsset */
    buffer: string;
    /**Event signature */
    signature: string;
    }
  • Return parameters:
    interface TrCommonParamResponse {
    /**whether succeed */
    success: boolean;
    result: {
        /** The buffer that needs to be signed is converted to a base64 string */
        buffer: string
    }
    }

    1.3 Send transfer event

  • The full name of the interface: transferAsset
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/send/transferAsset
  • Request parameters:
    interface SendTrCommonParam {
    /**The buffer that needs to be signed is converted to a base64 string */
    buffer: Buffer;
    /**Signature of the transaction */
    signature: string;
    /**Security signature of the transaction */
    signSignature: string;
    }
  • Return parameters:
    interface SendTrTransferAsset {
    /**whether succeed */
    success: boolean;
    /**Minimum handling fee */
    minFee: number;
    result: BFChainCore.TransactionJSON;
    }

    2. Set a security password event

    2.1 Create and set a security password event

  • The full name of the interface: trSignature
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trSignature
  • Request parameters:
    interface TrSignature extends TrCommonParam {
    /**New security password */
    newSecondSecret: string;
    }
  • Return parameters:
    interface TrCommonParamResponse {
    /**whether succeed */
    success: boolean;
    result: {
        /** Buffer that needs to be signed */
        buffer: Buffer
    }
    }

    2.2 Create and set a security password event (with security key)

  • The full name of the interface: trSignatureWithSign
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trSignatureWithSign
  • Request parameters:
    interface TrSignatureWithSign {
    /**The buffer generated by the event body without signature is generated by trSignature */
    buffer: string;
    /**Event signature */
    signature: string;
    }
  • Return parameters:
    interface TrCommonParamResponse {
    /**whether succeed */
    success: boolean;
    result: {
        /** Buffer that needs to be signed */
        buffer: Buffer
    }
    }

    2.3 Send setting security password event

  • The full name of the interface: signature
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/send/trSignature
  • Request parameters:
    interface SendTrCommonParam {
    /**The buffer that needs to be signed is converted to a base64 string */
    buffer: Buffer;
    /**Signature of the transaction */
    signature: string;
     /**Security signature of the transaction */
    signSignature: string;
    }
  • Return parameters:
    interface SendTrSignature {
    /**whether succeed */
    success: boolean;
    /**Minimum handling fee */
    minFee: number;
    result: BFChainCore.TransactionJSON;
    }

    3. Set username event

    3.1 Create a set username event

  • The full name of the interface: trUsername
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trUsername
  • Request parameters:
    interface TrUsername extends TrCommonParam {
    /**User name string, composed of uppercase and lowercase letters, numbers, and underscores, 1-20 characters, cannot contain the name of the current chain */
    alias: string;
    }
  • Return parameters:
    interface TrUsername {
    /**whether succeed */
    success: boolean;
    result: {
        /** Buffer that needs to be signed */
        buffer: Buffer
    }
    }

    3.2 Create and set user name event (with security key)

  • The full name of the interface: trUsernameWithSign
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trUsernameWithSign
  • Request parameters:
    interface TrUsernameWithSign {
    /**The buffer generated by the event body without signature is generated by trUsername */
    buffer: string;
    /**Event signature */
    signature: string;
    }
  • Return parameters:
    interface TrUsername {
    /**whether succeed */
    success: boolean;
    result: {
        /** Buffer that needs to be signed */
        buffer: Buffer
    }
    }

    3.3 Send setting user name event

  • The full name of the interface: username
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/send/username
  • Request parameters:
    interface SendTrCommonParam {
    /**The buffer that needs to be signed is converted to a base64 string */
    buffer: Buffer;
    /**Signature of the transaction */
    signature: string;
     /**Security signature of the transaction */
    signSignature: string;
    }
  • Return parameters:
    interface SendTrUsername {
    /**whether succeed */
    success: boolean;
    /**Minimum handling fee */
    minFee: number;
    result: BFChainCore.TransactionJSON;
    }

    4. Registered Trustee Events

    4.1 Create registered trustee event

  • The full name of the interface: trDelegate
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trDelegate
  • Request parameters:
    interface TrDelegate extends TrCommonParam {
    }
  • Return parameters:
    interface TrDelegate {
    /**whether succeed */
    success: boolean;
    result: {
        /** Buffer that needs to be signed */
        buffer: Buffer
    }
    }

    4.2 Create registered trustee event (with security key)

  • The full name of the interface: trDelegateWithSign
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trDelegateWithSign
  • Request parameters:
    interface TrDelegateWithSign {
    /**The buffer generated by the event body without signature is generated by trDelegate */
    buffer: string;
    /**Event signature */
    signature: string;
    }
  • Return parameters:
    interface SendTrDelegate {
    /**whether succeed */
    success: boolean;
    result: {
        /** Buffer that needs to be signed */
        buffer: Buffer
    }
    }

    4.3 Sending registered trustee events

  • The full name of the interface: delegate
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/send/delegate
  • Request parameters:
    interface SendTrCommonParam {
    /**The buffer that needs to be signed is converted to a base64 string */
    buffer: Buffer;
    /**Signature of the transaction */
    signature: string;
     /**Security signature of the transaction */
    signSignature: string;
    }
  • Return parameters:
    interface Delegate {
    /**whether succeed */
    success: boolean;
    /**Minimum handling fee */
    minFee: number;
    result: BFChainCore.TransactionJSON;
    }

    5. Receive voting events

    5.1 Create a receiving voting event

  • The full name of the interface: trAcceptVote
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trAcceptVote
  • Request parameters:
    interface TrAcceptVote extends TrCommonParam {
    }
  • Return parameters:
    interface TrAcceptVote {
     /**whether succeed */
    success: boolean;
    result: {
        /** Buffer that needs to be signed */
        buffer: Buffer
    }
    }

    5.2 Create a receiving voting event (with security key)

  • The full name of the interface: trAcceptVoteWithSign
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trAcceptVoteWithSign
  • Request parameters:
    interface TrAcceptVoteWithSign {
    /**The buffer generated by the event body without signature is generated by trAcceptVote */
    buffer: string;
    /**Event signature */
    signature: string;
    }
  • Return parameters:
    interface TrAcceptVote {
    /**whether succeed */
    success: boolean;
    result: {
        /** Buffer that needs to be signed */
        buffer: Buffer
    }
    }

    5.3 Send and receive voting events

  • The full name of the interface: acceptVote
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/send/acceptVote
  • Request parameters:
    interface SendTrCommonParam {
    /**The buffer that needs to be signed is converted to a base64 string */
    buffer: Buffer;
    /**Signature of the transaction */
    signature: string;
     /**Security signature of the transaction */
    signSignature: string;
    }
  • Return parameters:
    interface SendTrAcceptVote {
    /**whether succeed */
    success: boolean;
    /**Minimum handling fee */
    minFee: number;
    result: BFChainCore.TransactionJSON;
    }

    6. Refusal to vote event

    6.1 Create a rejection vote event

  • The full name of the interface: trRejectVote
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trRejectVote
  • Request parameters:
    interface TrRejectVote extends TrCommonParam {
    }
  • Return parameters:
    interface TrRejectVote {
    /**whether succeed */
    success: boolean;
    result: {
        /** Buffer that needs to be signed */
        buffer: Buffer
    }
    }

    6.2 Create a rejection vote event (with security key)

  • The full name of the interface: trRejectVoteWithSign
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trRejectVoteWithSign
  • Request parameters:
    interface TrRejectVoteWithSign {
    /**The buffer generated by the event body without signature is generated by trRejectVote */
    buffer: string;
    /**Event signature */
    signature: string;
    }
  • Return parameters:
    interface TrRejectVote {
    /**whether succeed */
    success: boolean;
    result: {
        /** Buffer that needs to be signed */
        buffer: Buffer
    }
    }

    6.3 Send rejection vote event

  • The full name of the interface: rejectVote
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/send/rejectVote
  • Request parameters:
    interface SendTrCommonParam {
    /**The buffer that needs to be signed is converted to a base64 string */
    buffer: Buffer;
    /**Signature of the transaction */
    signature: string;
     /**Security signature of the transaction */
    signSignature: string;
    }
  • Return parameters:
    interface SendTrRejectVote {
    /**whether succeed */
    success: boolean;
    /**Minimum handling fee */
    minFee: number;
    result: BFChainCore.TransactionJSON;
    }

    7. Voting event

    7.1 Create a voting event

  • The full name of the interface: trVote
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trVote
  • Request parameters:
    interface TrVote extends TrCommonParam {
    /**The number of equity voted, composed of 0-9 and excluding the decimal point, allowed to be 0 */
    equity: string;
    /**The receiving account address of the event, base58-encoded hexadecimal string */
    recipientId: string;
    }
  • Return parameters:
    interface TrVote {
    /**whether succeed */
    success: boolean;
    result: {
        /** Buffer that needs to be signed */
        buffer: Buffer
    }
    }

    7.2 Create voting event (with security key)

  • The full name of the interface: trVoteWithSign
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trVoteWithSign
  • Request parameters:
    interface TrVoteWithSign {
    /**The buffer generated by the event body without signature is generated by trVote */
    buffer: string;
    /**Event signature */
    signature: string;
    }
  • Return parameters:
    interface TrVote {
    /**whether succeed */
    success: boolean;
    result: {
        /** Buffer that needs to be signed */
        buffer: Buffer
    }
    }

    7.3 Send and receive voting events

  • The full name of the interface: vote
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/send/vote
  • Request parameters:
    interface SendTrCommonParam {
    /**The buffer that needs to be signed is converted to a base64 string */
    buffer: Buffer;
    /**Signature of the transaction */
    signature: string;
     /**Security signature of the transaction */
    signSignature: string;
    }
  • Return parameters:
    interface SendTrVote {
    /**whether succeed */
    success: boolean;
    /**Minimum handling fee */
    minFee: number;
    result: BFChainCore.TransactionJSON;
    }

    8. Issue dapp event

8.1 Create and release dapp event

  • The full name of the interface: trDapp
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trDapp
  • Request parameters:
interface TrDapp extends TrCommonParam {
  /**Dappid without check digit, composed of uppercase letters or numbers, 7 characters */
  newDappid: string;
  /**The type of dappid can only be 0 or 1. 0 means this dappid is paid for use, 1 means this dappid is free to use */
  type: number;
  /**The number of rights and interests required to purchase the right to use dappid (if dappid is a paid application, it must be carried, if it is a free application, it does not need to be carried), composed of 0-9 and does not include a decimal point, and must be greater than 0 */
  amount: string;
  /**The receiving account address of the event, base58-encoded hexadecimal string */
  recipientId?: string;
}
  • Return parameters:
interface TrCommonParamResponse {
  /**whether succeed */
  success: boolean;
  result: {
    /** The buffer that needs to be signed is converted to a base64 string */
    buffer: string;
  };
}

8.2 Create and release dapp event (with security key)

  • The full name of the interface: trDappWithSign
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trDappWithSign
  • Request parameters:
interface TrDappWithSign {
  /**The buffer generated by the event body without signature, generated by trDapp */
  buffer: string;
  /**Event signature */
  signature: string;
}
  • Return parameters:
interface TrCommonParamResponse {
  /**whether succeed */
  success: boolean;
  result: {
    /** The buffer that needs to be signed is converted to a base64 string */
    buffer: string;
  };
}

8.3 Send dapp release event

  • The full name of the interface: dapp
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/send/dapp
  • Request parameters:
interface SendTrCommonParam {
  /**The buffer that needs to be signed is converted to a base64 string */
  buffer: string;
  /**Signature of the event */
  signature: string;
  /**Security signature of the event */
  signSignature?: string;
}
  • Return parameters:
interface Dapp {
  /**whether succeed */
  success: boolean;
  /**Minimum handling fee */
  minFee: number;
  /**Complete release dapp event */
  result: BFChainCore.TransactionJSON;
}

9. dapp purchase event

9.1 Create dapp purchase event

  • The full name of the interface: trDappPurchasing
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trDappPurchasing
  • Request parameters:
interface TrDappPurchasing extends TrCommonParam {
  /**The receiving account address of the event, base58-encoded hexadecimal string */
  recipientId: string;
  /**The dappid to which the deposit certificate belongs, the uppercase letters get the array composition, 8 characters */
  dappid: string;
  /**The type of dappid can only be 0 or 1, 0 means dappid is a paid type, 1 means dappid is a free type */
  type: number;
  /**The number of equity spent to purchase dappid */
  purchaseAsset: number;
}
  • Return parameters:
interface TrCommonParamResponse {
  /**whether succeed */
  success: boolean;
  result: {
    /** The buffer that needs to be signed is converted to a base64 string */
    buffer: string;
  };
}

9.2 Create dapp purchase event (with security key)

  • The full name of the interface: trDappPurchasingWithSign
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trDappPurchasingWithSign
  • Request parameters:
interface TrDappPurchasingWithSign {
  /**The buffer generated by the event body without signature is generated by trDappPurchasing */
  buffer: string;
  /**Event signature */
  signature: string;
}
  • Return parameters:
interface TrCommonParamResponse {
  /**whether succeed */
  success: boolean;
  result: {
    /** The buffer that needs to be signed is converted to a base64 string */
    buffer: string;
  };
}

9.3 Send dapp purchase event

  • The full name of the interface: dappPurchasing
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/send/dappPurchasing
  • Request parameters:
interface SendTrCommonParam {
  /**The buffer that needs to be signed is converted to a base64 string */
  buffer: string;
  /**Signature of the event */
  signature: string;
  /**Security signature of the event */
  signSignature?: string;
}
  • Return parameters:
interface SendTrDappPurchasing {
  /**whether succeed */
  success: boolean;
  /**Minimum handling fee */
  minFee: number;
  /**Complete dappPurchasing event */
  result: BFChainCore.TransactionJSON;
}

10. Evidence Event

10.1 Create Attestation Event

  • The full name of the interface: trMark
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trMark
  • Request parameters:
interface TrMark extends TrCommonParam {
  /**Certificate content, any string */
  content: string;
  /**Certificate type, which is an arbitrary string, used to distinguish the certificate of deposit */
  action: string;
  /**The dappid to which the deposit certificate belongs, the uppercase letters get the array composition, 8 characters */
  dappid: string;
  /**The type of dappid can only be 0 or 1, 0 means dappid is a paid type, 1 means dappid is a free type */
  type: number;
  /**The number of equity spent to purchase dappid */
  purchaseAsset?: number;
}
  • Return parameters:
interface TrCommonParamResponse {
  /**whether succeed */
  success: boolean;
  result: {
    /** The buffer that needs to be signed is converted to a base64 string */
    buffer: string;
  };
}

10.2 Create Attestation Event (With Security Key)

  • The full name of the interface: trMarkWithSign
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trMarkWithSign
  • Request parameters:
interface TrMarkWithSign {
  /** Buffer generated by event body without signature, generated by trMark */
  buffer: string;
  /**Event signature */
  signature: string;
}
  • Return parameters:
interface TrCommonParamResponse {
  /**whether succeed */
  success: boolean;
  result: {
    /** The buffer that needs to be signed is converted to a base64 string */
    buffer: string;
  };
}

10.3 Send evidence event

  • The full name of the interface: mark
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/send/mark
  • Request parameters:
interface SendTrCommonParam {
   /**The buffer that needs to be signed is converted to a base64 string */
   buffer: string;
   /**Signature of the event */
   signature: string;
   /**Security signature of the event */
   signSignature?: string;
}
  • Return parameters:
interface SendTrMark {
   /**whether succeed */
   success: boolean;
   /**Minimum handling fee */
   minFee: number;
   /**Complete mark event */
   result: BFChainCore.TransactionJSON;
}

11. Equity Issuance Event

11.1 Create equity issuance event

  • The full name of the interface: trIssueAsset
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trIssueAsset
  • Request parameters:
interface TrIssueAsset extends TrCommonParam{
    /**The issued equity name, composed of uppercase letters, 3-5 characters */
    assetType: string;
    /**Total number of new equity issued. The number of equity consists of ten numbers from 0-9. The number of equity does not include a decimal point and must be greater than 0 */
    expectedIssuedAssets: string;
    /**The creation account address of the new equity, a base58-encoded hexadecimal string, the address must be transferred to the main equity of the chain to the originating account of this event */
    recipientId: string;
}
  • Return parameters:
interface TrCommonParamResponse {
  /**whether succeed */
  success: boolean;
  result: {
    /** The buffer that needs to be signed is converted to a base64 string */
    buffer: string;
  };
}

11.2 Create equity issuance event (with security key)

  • The full name of the interface: trIssueAssetWithSign
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trIssueAssetWithSign
  • Request parameters:
interface TrIssueAssetWithSign {
  /** Buffer generated by event body without signature, generated by trMark */
  buffer: string;
  /**Event signature */
  signature: string;
}
  • Return parameters:
interface TrCommonParamResponse {
  /**whether succeed */
  success: boolean;
  result: {
    /** The buffer that needs to be signed is converted to a base64 string */
    buffer: string;
  };
}

11.3 Sending equity issuance events

  • The full name of the interface: issueAsset
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/send/issueAsset
  • Request parameters:
interface SendTrCommonParam {
  /**The buffer that needs to be signed is converted to a base64 string */
  buffer: string;
  /**Signature of the event */
  signature: string;
  /**Security signature of the event */
  signSignature?: string;
}
  • Return parameters:
interface TrIssueAsset {
    /**whether succeed */
    success: boolean;
    /**Minimum handling fee */
    minFee: number;
    result: BFChainCore.TransactionJSON;
}

12. Equity destruction event

12.1 Create equity destruction event

  • The full name of the interface: trDestroyAsset
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trDestroyAsset
  • Request parameters:
interface TrDestroyAsset extends TrCommonParam{
    /**The number of equity to be destroyed, composed of 0-9 and excluding the decimal point, must be greater than 0 */
    amount: string;
    /**Destroyed equity name, composed of uppercase letters, 3-5 characters */
    assetType: string;
    /**The address of the equity issuing account, base58-encoded hexadecimal string */
    recipientId: string;
}
  • Return parameters:
interface TrCommonParamResponse {
  /**whether succeed */
  success: boolean;
  result: {
    /** The buffer that needs to be signed is converted to a base64 string */
    buffer: string;
  };
}

12.2 Create equity destruction event (with security key)

  • The full name of the interface: trDestroyAssetWithSign
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trDestroyAssetWithSign
  • Request parameters:
interface TrDestroyAssetWithSign {
  /** Buffer generated by event body without signature, generated by trMark */
  buffer: string;
  /**Event signature */
  signature: string;
}

-Return parameters:

interface TrCommonParamResponse {
  /**whether succeed */
  success: boolean;
  result: {
    /** The buffer that needs to be signed is converted to a base64 string */
    buffer: string;
  };
}

12.3 Send equity destruction event

  • The full name of the interface: destroyAsset
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/send/destroyAsset
  • Request parameters:
interface SendTrCommonParam {
  /**The buffer that needs to be signed is converted to a base64 string */
  buffer: string;
  /**Signature of the event */
  signature: string;
  /**Security signature of the event */
  signSignature?: string;
}

-Return parameters:

interface TrDestroyAsset {
    /**whether succeed */
    success: boolean;
    /**Minimum handling fee */
    minFee: number;
    result: BFChainCore.TransactionJSON;
}

13. Equity Exchange Event

13.1 Create equity exchange event

  • The full name of the interface: trToExchangeAsset
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trToExchangeAsset
  • Request parameters:
interface TrToExchangeAsset extends TrCommonParam{
    /**The network identifier of the equity source chain used for exchange, composed of uppercase letters or numbers, 5 characters, and the last digit is the check digit */
    toExchangeSource: string;
    /**The network identifier of the equity source chain to be exchanged, composed of uppercase letters or numbers, 5 characters, and the last digit is the check digit */
    beExchangeSource: string;
    /**The name of the equity source chain used for exchange, composed of lowercase letters, 3-8 digits */
    toExchangeChainName: string;
    /**The name of the equity source chain to be exchanged, composed of lowercase letters, 3-8 digits */
    beExchangeChainName: string;
    /**The equity name used for exchange, composed of uppercase letters, 3-5 characters */
    toExchangeAsset: string;
    /**The name of the equity to be exchanged, composed of uppercase letters, 3-5 characters */
    beExchangeAsset: string;
    /**The amount of equity used for exchange, composed of 0-9 and excluding the decimal point, must be greater than 0 */
    toExchangeNumber: string;
    /**Used as the denominator of the exchange ratio with equity, a positive integer. Exchanged equity = exchange equity * exchange ratio */
    prevWeight: string;
    /** The numerator of the exchange ratio with the equity is a positive integer. Exchanged equity = exchange equity * exchange ratio */
    nextWeight: string;
    /**Encryption key group, if the key is filled in, the event receiving the equity exchange must carry a signature pair generated by a certain key */
    ciphertexts?: string[];
}
  • Return parameters:
interface TrCommonParamResponse {
  /**whether succeed */
  success: boolean;
  result: {
    /** The buffer that needs to be signed is converted to a base64 string */
    buffer: string;
  };
}

13.2 Create equity exchange event (with security key)

  • The full name of the interface: trToExchangeAssetWithSign
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trToExchangeAssetWithSign
  • Request parameters:
interface TrToExchangeAssetWithSign {
  /** Buffer generated by event body without signature, generated by trMark */
  buffer: string;
  /**Event signature */
  signature: string;
}
  • Return parameters:
interface TrCommonParamResponse {
  /**whether succeed */
  success: boolean;
  result: {
    /** The buffer that needs to be signed is converted to a base64 string */
    buffer: string;
  };
}

13.3 Sending rights exchange events

  • The full name of the interface: trToExchangeAsset
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/send/trToExchangeAsset
  • Request parameters:
interface SendTrCommonParam {
  /**The buffer that needs to be signed is converted to a base64 string */
  buffer: string;
  /**Signature of the event */
  signature: string;
  /**Security signature of the event */
  signSignature?: string;
}
  • Return parameters:
interface TrToExchangeAsset {
    /**whether succeed */
    success: boolean;
    /**Minimum handling fee */
    minFee: number;
    result: BFChainCore.TransactionJSON;
}

14. Accept the rights exchange event

14.1 Create and accept equity exchange event

  • The full name of the interface: trBeExchangeAsset
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trBeExchangeAsset
  • Request parameters:
interface TrBeExchangeAsset extends TrCommonParam{
    /**to event signature, a 128-byte hexadecimal string */
    transactionSignature: string;
    /**The amount of equity used for exchange. The amount of equity consists of ten numbers from 0-9. The amount of equity does not include a decimal point and must be greater than 0 */
    beExchangeNumber: string;
    /**The amount of equity obtained by the exchange, the amount of equity is composed of a total of ten numbers from 0-9, the amount of equity does not include the decimal point and must be greater than 0 */
    toExchangeNumber: string;
    /**Encryption key, if the encryption key is filled in the equity exchange event, you must carry the specified key of a equity exchange event to generate a key signature pair */
    ciphertext?: string;
    /**to event originating account address, base58-encoded hexadecimal string */
    recipientId: string;
}
  • Return parameters:
interface TrCommonParamResponse {
  /**whether succeed */
  success: boolean;
  result: {
    /** The buffer that needs to be signed is converted to a base64 string */
    buffer: string;
  };
}

14.2 Create and accept equity exchange event (with security key)

  • The full name of the interface: trBeExchangeAssetWithSign
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/trBeExchangeAssetWithSign
  • Request parameters:
interface TrBeExchangeAssetWithSign {
  /** Buffer generated by event body without signature, generated by trMark */
  buffer: string;
  /**Event signature */
  signature: string;
}
  • Return parameters:
interface TrCommonParamResponse {
  /**whether succeed */
  success: boolean;
  result: {
    /** The buffer that needs to be signed is converted to a base64 string */
    buffer: string;
  };
}

14.3 Send and receive rights exchange events

  • The full name of the interface: destroyAsset
  • Callable methods: Http, Websocket, command line
  • Calling method: post
  • Interface url address: /api/transaction/send/destroyAsset
  • Request parameters:
interface SendTrCommonParam {
  /**The buffer that needs to be signed is converted to a base64 string */
  buffer: string;
  /**Signature of the event */
  signature: string;
  /**Security signature of the event */
  signSignature?: string;
}
  • Return parameters:
interface TrBeExchangeAsset {
    /**whether succeed */
    success: boolean;
    /**Minimum handling fee */
    minFee: number;
    result: BFChainCore.TransactionJSON;
}