Documentation ¶
Index ¶
- type BIFAccountActivateOperation
- type BIFAccountGetBalanceRequest
- type BIFAccountGetInfoRequest
- type BIFAccountGetMetadatasRequest
- type BIFAccountGetNonceRequest
- type BIFAccountPrivRequest
- type BIFAccountSetMetadataOperation
- type BIFAccountSetMetadatasRequest
- type BIFAccountSetPrivilegeOperation
- type BIFAccountSetPrivilegeRequest
- type BIFBaseOperation
- type BIFBatchContractInvokeRequest
- type BIFBatchGasSendRequest
- type BIFBlockGetInfoRequest
- type BIFBlockGetTransactionsRequest
- type BIFBlockGetValidatorsRequest
- type BIFContractCallRequest
- type BIFContractCheckValidRequest
- type BIFContractCreateOperation
- type BIFContractCreateRequest
- type BIFContractGetAddressRequest
- type BIFContractGetInfoRequest
- type BIFContractInvokeOperation
- type BIFContractInvokeRequest
- type BIFCreateAccountRequest
- type BIFGasSendOperation
- type BIFPrivateContractCallOperation
- type BIFPrivateContractCreateOperation
- type BIFPrivateTransactionSendRequest
- type BIFRadioTransactionRequest
- type BIFTransactionCacheRequest
- type BIFTransactionEvaluateFeeRequest
- type BIFTransactionGasSendRequest
- type BIFTransactionGetInfoRequest
- type BIFTransactionPrivateContractCallRequest
- type BIFTransactionPrivateContractCreateRequest
- type BIFTransactionSerializeRequest
- type BIFTransactionSubmitRequest
- type Signature
- type Signer
- type TransactionSubmit
- type TransactionSubmitRequest
- type TypeThreshold
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BIFAccountActivateOperation ¶
type BIFAccountActivateOperation struct { BIFBaseOperation DestAddress string InitBalance int64 }
type BIFAccountGetBalanceRequest ¶
type BIFAccountGetBalanceRequest struct {
Address string `json:"address"` // 必填,待查询的区块链账户地址
}
BIFAccountGetBalanceRequest 获取指定账户的星火令的余额请求体
type BIFAccountGetInfoRequest ¶
type BIFAccountGetInfoRequest struct {
Address string `json:"address"` // 必填,待查询的区块链账户地址
}
BIFAccountGetInfoRequest 获取指定的账户信息请求体
type BIFAccountGetMetadatasRequest ¶
type BIFAccountGetMetadatasRequest struct { Address string `json:"address"` // 必填,待查询的账户地址 Key string `json:"key"` // 选填,metadata关键字,长度限制[1, 1024],有值为精确查找,无值为全部查找 }
BIFAccountGetMetadatasRequest 获取指定账户的metadatas信息请求体
type BIFAccountGetNonceRequest ¶
type BIFAccountGetNonceRequest struct {
Address string `json:"address"` // 必填,待查询的区块链账户地址
}
BIFAccountGetNonceRequest 获取指定账户的nonce值请求体
type BIFAccountPrivRequest ¶
type BIFAccountPrivRequest struct {
Address string `json:"address"` // 必填,待查询的区块链账户地址
}
BIFAccountPrivRequest 获取账户权限请求体
type BIFAccountSetMetadataOperation ¶
type BIFAccountSetMetadataOperation struct { BIFBaseOperation Key string Value string Version int64 DeleteFlag bool }
type BIFAccountSetMetadatasRequest ¶
type BIFAccountSetMetadatasRequest struct { SenderAddress string `json:"sender_address"` // 必填,交易源账号,即交易的发起方 PrivateKey string `json:"private_key"` // 必填,交易源账户私钥 CeilLedgerSeq int64 `json:"ceil_ledger_seq"` // 可选,区块高度限制, 如果大于0,则交易只有在该区块高度之前(包括该高度)才有效 Remarks string `json:"remarks"` // 可选,用户自定义给交易的备注,16进制格式 Key string `json:"key"` // 必填,metadata的关键词,长度限制[1, 1024] Value string `json:"value"` // 必填,metadata的内容,长度限制[0, 256000] Version int64 `json:"version"` // 选填,metadata的版本 DeleteFlag bool `json:"delete_flag"` // 选填,是否删除metadata FeeLimit int64 `json:"fee_limit"` GasPrice int64 `json:"gas_price"` }
BIFAccountSetMetadatasRequest 设置metadatas请求体
type BIFAccountSetPrivilegeOperation ¶
type BIFAccountSetPrivilegeOperation struct { BIFBaseOperation MasterWeight string Signers []response.BIFSigner TxThreshold string TypeThresholds []response.BIFTypeThreshold }
type BIFAccountSetPrivilegeRequest ¶
type BIFAccountSetPrivilegeRequest struct { SenderAddress string `json:"sender_address"` // 必填,交易源账号,即交易的发起方 PrivateKey string `json:"private_key"` // 必填,交易源账户私钥 CeilLedgerSeq int64 `json:"ceil_ledger_seq"` // 可选,区块高度限制, 如果大于0,则交易只有在该区块高度之前(包括该高度)才有效 Remarks string `json:"remarks"` // 可选,用户自定义给交易的备注,16进制格式 Signers []response.BIFSigner `json:"signers"` // 选填,签名者权重列表 TxThreshold string `json:"tx_threshold"` // 选填,交易门限,大小限制[0, Long.MAX_VALUE] TypeThresholds []response.BIFTypeThreshold `json:"type_threshold"` // 选填,指定类型交易门限 MasterWeight string // 选填 FeeLimit int64 `json:"fee_limit"` GasPrice int64 `json:"gas_price"` }
BIFAccountSetPrivilegeRequest 设置权限请求体
type BIFBaseOperation ¶
type BIFBatchContractInvokeRequest ¶
type BIFBatchContractInvokeRequest struct { SenderAddress string `json:"sender_address"` // 必填,交易源账号,即交易的发起方 FeeLimit int64 `json:"fee_limit"` // 可选,交易花费的手续费,默认1000000L Operations []BIFContractInvokeOperation `json:"operations"` PrivateKey string `json:"private_key"` // 必填,交易源账户私钥 CeilLedgerSeq int64 `json:"ceil_ledger_seq"` // 可选,区块高度限制, 如果大于0,则交易只有在该区块高度之前(包括该高度)才有效 Remarks string `json:"remarks"` // 可选,用户自定义给交易的备注,16进制格式 GasPrice int64 `json:"gas_price"` }
type BIFBatchGasSendRequest ¶
type BIFBatchGasSendRequest struct { SenderAddress string `json:"sender_address"` PrivateKey string `json:"private_key"` CeilLedgerSeq int64 `json:"ceil_ledger_seq"` Remarks string `json:"remarks"` FeeLimit int64 `json:"fee_limit"` GasPrice int64 `json:"gas_price"` Operations []BIFGasSendOperation `json:"operations"` }
BIFBatchGasSendRequest 批量交易请求体
type BIFBlockGetInfoRequest ¶
type BIFBlockGetInfoRequest struct {
BlockNumber int64 `json:"block_number"` // 必填,待查询的区块高度
}
BIFBlockGetInfoRequest 获取指定区块信息请求体
type BIFBlockGetTransactionsRequest ¶
type BIFBlockGetTransactionsRequest struct {
BlockNumber int64 `json:"block_number"` // 必填,最新的区块高度,对应底层字段seq
}
BIFBlockGetTransactionsRequest 查询指定区块高度下的所有交易请求体
type BIFBlockGetValidatorsRequest ¶
type BIFBlockGetValidatorsRequest struct {
BlockNumber int64 `json:"block_number"` // 必填,待查询的区块高度,必须大于0
}
BIFBlockGetValidatorsRequest 获取指定区块中所有验证节点数请求体
type BIFContractCallRequest ¶
type BIFContractCallRequest struct { SourceAddress string `json:"source_address"` // 选填,合约触发账户地址 ContractAddress string `json:"contract_address"` // 必填,合约账户地址 Input string `json:"input"` // 选填,合约入参 FeeLimit int64 `json:"fee_limit"` GasPrice int64 `json:"gas_price"` Type int `json:"type"` // 选填,合约类型 默认是0 , 0: javascript,1 :evm }
BIFContractCallRequest 合约查询接口请求体
type BIFContractCheckValidRequest ¶
type BIFContractCheckValidRequest struct {
ContractAddress string `json:"contract_address"` // 待检测的合约账户地址
}
BIFContractCheckValidRequest 检测合约账户的有效性请求体
type BIFContractCreateOperation ¶
type BIFContractCreateOperation struct { BIFBaseOperation InitBalance int64 Type int Payload string InitInput string }
type BIFContractCreateRequest ¶
type BIFContractCreateRequest struct { SenderAddress string `json:"sender_address"` // 必填,交易源账号,即交易的发起方 FeeLimit int64 `json:"fee_limit"` // 可选,交易花费的手续费,默认1000000L PrivateKey string `json:"private_key"` // 必填,交易源账户私钥 CeilLedgerSeq int64 `json:"ceil_ledger_seq"` // 可选,区块高度限制, 如果大于0,则交易只有在该区块高度之前(包括该高度)才有效 Remarks string `json:"metadata"` // 可选,用户自定义给交易的备注,16进制格式 InitBalance int64 `json:"init_balance"` // 必填,给合约账户的初始化星火令,单位PT,1 星火令 = 10^8 PT, 大小限制[1, Long.MAX_VALUE] Type int `json:"type"` // 选填,合约的类型,默认是0 , 0: javascript,1 :evm 。 Payload string `json:"payload"` // 必填,对应语种的合约代码 InitInput string `json:"init_input"` // 选填,合约代码中init方法的入参 GasPrice int64 `json:"gas_price"` }
BIFContractCreateRequest 创建合约请求体
type BIFContractGetAddressRequest ¶
type BIFContractGetAddressRequest struct {
Hash string `json:"hash"` // 创建合约交易的hash
}
BIFContractGetAddressRequest 根据交易Hash查询合约地址请求体
type BIFContractGetInfoRequest ¶
type BIFContractGetInfoRequest struct {
ContractAddress string `json:"contract_address"` // 待查询的合约账户地址
}
BIFContractGetInfoRequest 查询合约代码请求体
type BIFContractInvokeOperation ¶
type BIFContractInvokeOperation struct { BIFBaseOperation ContractAddress string BifAmount int64 Input string }
type BIFContractInvokeRequest ¶
type BIFContractInvokeRequest struct { SenderAddress string `json:"sender_address"` // 必填,交易源账号,即交易的发起方 FeeLimit int64 `json:"fee_limit"` // 可选,交易花费的手续费,默认1000000L PrivateKey string `json:"private_key"` // 必填,交易源账户私钥 CeilLedgerSeq int64 `json:"ceil_ledger_seq"` // 可选,区块高度限制, 如果大于0,则交易只有在该区块高度之前(包括该高度)才有效 Remarks string `json:"metadata"` // 可选,用户自定义给交易的备注,16进制格式 ContractAddress string `json:"contract_address"` // 必填,合约账户地址 BIFAmount int64 `json:"bif_amount"` // 必填,转账金额 Input string `json:"input"` // 选填,待触发的合约的main()入参 GasPrice int64 `json:"gas_price"` }
BIFContractInvokeRequest 合约调用请求体
type BIFCreateAccountRequest ¶
type BIFCreateAccountRequest struct { SenderAddress string `json:"sender_address"` // 必填,交易源账号,即交易的发起方 DestAddress string `json:"dest_address"` // 必填,目标账户地址 PrivateKey string `json:"private_key"` // 必填,交易源账户私钥 InitBalance int64 `json:"init_balance"` // 必填,初始化星火令,单位PT,1 星火令 = 10^8 PT CeilLedgerSeq int64 `json:"ceil_ledger_seq"` // 可选,区块高度限制, 如果大于0,则交易只有在该区块高度之前(包括该高度)才有效 Remarks string `json:"remarks"` // 可选,用户自定义给交易的备注,16进制格式 FeeLimit int64 `json:"fee_limit"` GasPrice int64 `json:"gas_price"` }
BIFCreateAccountRequest 创建账户请求体
type BIFGasSendOperation ¶
type BIFGasSendOperation struct { BIFBaseOperation DestAddress string `json:"dest_address"` Amount int64 `json:"amount"` }
type BIFPrivateTransactionSendRequest ¶
type BIFPrivateTransactionSendRequest struct { From string Payload string To []string DestAddress string }
BIFPrivateTransactionSendRequest ...
type BIFRadioTransactionRequest ¶
type BIFRadioTransactionRequest struct { SenderAddress string `json:"sender_address"` FeeLimit int64 `json:"fee_limit"` GasPrice int64 `json:"gas_price"` Operation interface{} `json:"operation"` CeilLedgerSeq int64 `json:"ceil_ledger_seq"` Remarks string `json:"remarks"` SenderPrivateKey string `json:"privateKey"` }
BIFRadioTransactionRequest 广播交易请求体
type BIFTransactionCacheRequest ¶
type BIFTransactionCacheRequest struct {
Hash string `json:"hash"`
}
type BIFTransactionEvaluateFeeRequest ¶
type BIFTransactionEvaluateFeeRequest struct { SourceAddress string // 模拟交易的原地址 SignatureNumber int64 // 签名个数,默认为1;不填写系统会设置为1 Remarks string // 可选,签名个数 Operation interface{} // 操作列表 GasPrice int64 FeeLimit int64 }
BIFTransactionEvaluateFeeRequest 交易费用评估请求体
type BIFTransactionGasSendRequest ¶
type BIFTransactionGasSendRequest struct { SenderAddress string `json:"sender_address"` // 必填,交易源账号,即交易的发起方 PrivateKey string `json:"private_key"` // 必填,交易源账户私钥 CeilLedgerSeq int64 `json:"ceil_ledger_seq"` // 可选,区块高度限制, 如果大于0,则交易只有在该区块高度之前(包括该高度)才有效 DestAddress string `json:"dest_address"` // 必填,发起方地址 Amount int64 `json:"amount"` // 必填,转账金额 Remarks string `json:"remarks"` // 可选,用户自定义给交易的备注,16进制格式 FeeLimit int64 `json:"fee_limit"` GasPrice int64 `json:"gas_price"` }
BIFTransactionGasSendRequest 发送交易请求体
type BIFTransactionGetInfoRequest ¶
type BIFTransactionGetInfoRequest struct {
Hash string `json:"hash"` // 交易hash
}
BIFTransactionGetInfoRequest 根据交易hash查询交易请求体
type BIFTransactionPrivateContractCallRequest ¶
type BIFTransactionPrivateContractCallRequest struct { SenderAddress string `json:"sender_address"` // 必填,交易源账号,即交易的发起方 PrivateKey string `json:"private_key"` // 必填,交易源账户私钥 CeilLedgerSeq int64 `json:"ceil_ledger_seq"` // 可选,区块高度限制, 如果大于0,则交易只有在该区块高度之前(包括该高度)才有效 Metadata string `json:"metadata"` // 可选,用户自定义给交易的备注,16进制格式 DestAddress string `json:"dest_address"` // 必填,发起方地址 Type int `json:"type"` // 必填,合约的语种 Input string `json:"input"` // 必填,合约代码中init方法的入参 From string `json:"from"` // 必填,发起方加密机公钥 To []string `json:"to"` // 必填,接收方加密机公钥 FeeLimit int64 `json:"fee_limit"` GasPrice int64 `json:"gas_price"` }
BIFTransactionPrivateContractCallRequest 私有化交易-合约调用请求体
type BIFTransactionPrivateContractCreateRequest ¶
type BIFTransactionPrivateContractCreateRequest struct { SenderAddress string `json:"sender_address"` // 必填,交易源账号,即交易的发起方 PrivateKey string `json:"private_key"` // 必填,交易源账户私钥 CeilLedgerSeq int64 `json:"ceil_ledger_seq"` // 可选,区块高度限制, 如果大于0,则交易只有在该区块高度之前(包括该高度)才有效 Metadata string `json:"metadata"` // 可选,用户自定义给交易的备注,16进制格式 Type int `json:"type"` // 必填,合约的语种 Payload string `json:"payload"` // 必填,对应语种的合约代码 InitInput string `json:"init_input"` // 必填,合约代码中init方法的入参 From string `json:"from"` // 必填,发起方加密机公钥 To []string `json:"to"` // 必填,接收方加密机公钥 FeeLimit int64 `json:"fee_limit"` GasPrice int64 `json:"gas_price"` }
BIFTransactionPrivateContractCreateRequest 私有化交易-合约创建请求体
type BIFTransactionSerializeRequest ¶
type BIFTransactionSerializeRequest struct { SourceAddress string `json:"source_address"` Nonce int64 `json:"nonce"` GasPrice int64 `json:"gas_price"` FeeLimit int64 `json:"fee_limit"` Operation interface{} `json:"operation"` CeilLedgerSeq int64 `json:"ceil_ledger_seq"` Metadata string `json:"metadata"` }
BIFTransactionSerializeRequest ...
type Signer ¶
type Signer struct { Address string `json:"address"` // 签名者区块链账户地址 Weight int64 `json:"weight"` // 选填,metadata的版本 }
Signer 签名者权重列表
type TransactionSubmit ¶
type TransactionSubmit struct { TransactionBlob string `json:"transaction_blob"` Signatures []Signature `json:"signatures"` }
TransactionSubmit ...
type TransactionSubmitRequest ¶
type TransactionSubmitRequest struct {
Items []TransactionSubmit `json:"items"`
}
TransactionSubmitRequest 交易提交请求体
type TypeThreshold ¶
type TypeThreshold struct { Type int64 `json:"type"` // 操作类型,必须大于0 Threshold int64 `json:"threshold"` // 门限值,大小限制[0, Long.MAX_VALUE] }
TypeThreshold 指定类型交易门限