Versions in this module Expand all Collapse all v1 v1.0.2 Mar 21, 2023 v1.0.1 Mar 21, 2023 v1.0.0 Mar 17, 2023 Changes in this version + func SerializeBody(payment *ExecutableDeployItem, session *ExecutableDeployItem) []byte + func SerializeHeader(deployHeader *DeployHeader) []byte + type AccountDeploy struct + Account string + BlockHash string + Cost int + DeployHash string + ErrorMessage string + State string + type AccountDeploysResult struct + Data []AccountDeploy + ItemCount int + PageCount int + Pages []Page + type ActionThresholds struct + Deployment uint64 + KeyManagement uint64 + type Approval struct + Signature keypair.Signature + Signer keypair.PublicKey + type AssociatedKey struct + AccountHash string + Weight uint64 + type AuctionState struct + BlockHeight uint64 + EraValidators []EraValidators + StateRootHash string + type BlockBody struct + DeployHashes []string + Proposer string + TransferHashes []string + type BlockHeader struct + AccumulatedSeed string + BodyHash string + EraID int + Height int + ParentHash string + ProtocolVersion string + RandomBit bool + StateRootHash string + Timestamp time.Time + type BlockResponse struct + Body BlockBody + Hash string + Header BlockHeader + Proofs []Proof + type BlockResult struct + BlockHash string + DeployCount int + Deploys []string + Eraid int + Height uint64 + ParentHash string + Proposer string + State string + TimeStamp string + type BlocksResult struct + Data []BlockResult + ItemCount int + PageCount int + Pages []Page + type BoundContract struct + ContractStruct Contract + KeyPair keypair.KeyPair + func (b BoundContract) Deploy(args RuntimeArgs, paymentAmount big.Int, chainName string) *Deploy + type Contract struct + PaymentWasm []byte + SessionWasm []byte + func NewContract(sessionContractPath, paymentContractPath string) Contract + func (c Contract) Deploy(args RuntimeArgs, paymentAmount big.Int, pubKey keypair.PublicKey, ...) *Deploy + type Deploy struct + Approvals []Approval + Hash Hash + Header *DeployHeader + Payment *ExecutableDeployItem + Session *ExecutableDeployItem + func MakeDeploy(deployParam *DeployParams, payment *ExecutableDeployItem, ...) *Deploy + func NewDeploy(hash []byte, header *DeployHeader, payment *ExecutableDeployItem, ...) *Deploy + func NewTransferToUniqAddress(source keypair.PublicKey, target UniqAddress, amount *big.Int, ...) *Deploy + func (d *Deploy) IsStandardPayment() bool + func (d *Deploy) IsTransfer() bool + func (d *Deploy) SignDeploy(keys keypair.KeyPair) + func (d *Deploy) ValidateDeploy() bool + func (deploy *Deploy) AddArgToDeploy(key string, value types.CLValue) error + type DeployHash struct + BlockHash string + Cost int + DeployHash string + ErrorMessage string + State string + type DeployHeader struct + Account keypair.PublicKey + BodyHash Hash + ChainName string + Dependencies [][]byte + GasPrice uint64 + TTL Duration + Timestamp Timestamp + func NewDeployHeader(account keypair.PublicKey, timeStamp int64, ttl int64, gasPrice uint64, ...) *DeployHeader + func (d DeployHeader) ToBytes() []uint8 + type DeployParams struct + AccountPublicKey keypair.PublicKey + ChainName string + Dependencies [][]uint8 + GasPrice uint64 + Timestamp int64 + Ttl int64 + func NewDeployParams(accountPublicKey keypair.PublicKey, chainName string, dependencies [][]uint8, ...) *DeployParams + type DeployRes struct + Account string + BlockHash string + Cost int + DeployHash string + ErrorMessage string + State string + type DeployResult struct + Deploy JsonDeploy + ExecutionResults []JsonExecutionResult + type Duration time.Duration + func (d *Duration) UnmarshalJSON(data []byte) error + func (d Duration) MarshalJSON() ([]byte, error) + type EraValidators struct + EraId int + ValidatorWeights []ValidatorWeight + type EventService struct + Url string + func NewEventService(url string) *EventService + func (e EventService) GetAccountDeploy(accountHex string, page int, limit int) (AccountDeploysResult, error) + func (e EventService) GetBlockByHash(blockHash string) (BlockResult, error) + func (e EventService) GetBlocks(page int, count int) (BlocksResult, error) + func (e EventService) GetDeployByHash(deployHash string) (DeployResult, error) + func (e EventService) GetResponseData(endpoint string) ([]byte, error) + func (e EventService) GetTransfersByAccountHash(accountHash string) ([]TransferResult, error) + type ExecutableDeployItem struct + ModuleBytes *ModuleBytes + StoredContractByHash *StoredContractByHash + StoredContractByName *StoredContractByName + StoredVersionedContractByHash *StoredVersionedContractByHash + StoredVersionedContractByName *StoredVersionedContractByName + Transfer *Transfer + Type ExecutableDeployItemType + func NewModuleBytes(moduleBytes []byte, args RuntimeArgs) *ExecutableDeployItem + func NewStoredContractByHash(hash [32]byte, entryPoint string, args RuntimeArgs) *ExecutableDeployItem + func NewStoredContractByName(name, entryPoint string, args RuntimeArgs) *ExecutableDeployItem + func NewStoredVersionedContractByHash(hash [32]byte, version uint32, entryPoint string, args RuntimeArgs) *ExecutableDeployItem + func NewStoredVersionedContractByHashWithoutVersion(hash [32]byte, entryPoint string, args RuntimeArgs) *ExecutableDeployItem + func NewStoredVersionedContractByName(name string, version uint32, entryPoint string, args RuntimeArgs) *ExecutableDeployItem + func NewStoredVersionedContractByNameWithoutVersion(name string, entryPoint string, args RuntimeArgs) *ExecutableDeployItem + func NewTransfer(amount *big.Int, target *keypair.PublicKey, sourcePurse string, id uint64) *ExecutableDeployItem + func NewTransferWithoutId(amount *big.Int, target *keypair.PublicKey, sourcePurse string) *ExecutableDeployItem + func StandardPayment(amount *big.Int) *ExecutableDeployItem + func (e *ExecutableDeployItem) IsModuleBytes() bool + func (e *ExecutableDeployItem) IsStoredContractByHash() bool + func (e *ExecutableDeployItem) IsStoredContractByName() bool + func (e *ExecutableDeployItem) IsStoredVersionedContractByHash() bool + func (e *ExecutableDeployItem) IsStoredVersionedContractByName() bool + func (e *ExecutableDeployItem) IsTransfer() bool + func (e *ExecutableDeployItem) SetArg(key string, value types.CLValue) error + func (e *ExecutableDeployItem) ToBytes() []byte + func (e *ExecutableDeployItem) UnmarshalJSON(data []byte) error + func (e ExecutableDeployItem) ArmForSwitch(sw byte) (string, bool) + func (e ExecutableDeployItem) MarshalJSON() ([]byte, error) + func (e ExecutableDeployItem) SwitchFieldName() string + type ExecutableDeployItemType byte + const ExecutableDeployItemTypeModuleBytes + const ExecutableDeployItemTypeStoredContractByHash + const ExecutableDeployItemTypeStoredContractByName + const ExecutableDeployItemTypeStoredVersionedContractByHash + const ExecutableDeployItemTypeStoredVersionedContractByName + const ExecutableDeployItemTypeTransfer + type ExecutionResult struct + ErrorMessage *string + Success SuccessExecutionResult + type FaucetContract struct + func (f FaucetContract) MakeArgs(accountHash string) RuntimeArgs + type Hash []byte + func (h *Hash) UnmarshalJSON(data []byte) error + func (h Hash) MarshalJSON() ([]byte, error) + type JsonAccount struct + AccountHash string + ActionThresholds ActionThresholds + AssociatedKeys []AssociatedKey + MainPurse string + NamedKeys []NamedKey + type JsonApproval struct + Signature string + Signer string + type JsonCLValue struct + Bytes string + CLType string + Parsed interface{} + type JsonContractMetadata struct + ContractPackageHash string + ContractWasmHash string + ProtocolVersion string + type JsonDeploy struct + Approvals []JsonApproval + Hash string + Header JsonDeployHeader + type JsonDeployHeader struct + Account string + BodyHash string + ChainName string + Dependencies []string + GasPrice int + TTL string + Timestamp time.Time + type JsonDeployInfo struct + DeployHash string + From string + Gas string + Source string + Transfers []string + type JsonExecutionResult struct + BlockHash string + Result ExecutionResult + type JsonPutDeployRes struct + Hash string + type ModuleBytes struct + Args RuntimeArgs + ModuleBytes []byte + Tag ExecutableDeployItemType + func (m *ModuleBytes) UnmarshalModuleBytes(tempMap map[string]interface{}) error + func (m ModuleBytes) MarshalJSON() ([]byte, error) + func (m ModuleBytes) ToBytes() []byte + type NamedKey struct + Key string + Name string + type Page struct + Number int + Url string + type Peer struct + Address string + NodeId string + type PeerResult struct + Peers []Peer + type Proof struct + PublicKey string + Signature string + type RpcClient struct + func NewRpcClient(endpoint string) *RpcClient + func (c *RpcClient) GetAccountBalance(stateRootHash, balanceUref string) (big.Int, error) + func (c *RpcClient) GetAccountBalanceByKeypair(stateRootHash string, key keypair.KeyPair) (big.Int, error) + func (c *RpcClient) GetAccountMainPurseURef(accountHash string) string + func (c *RpcClient) GetBlockByHash(hash string) (BlockResponse, error) + func (c *RpcClient) GetBlockByHeight(height uint64) (BlockResponse, error) + func (c *RpcClient) GetBlockTransfersByHash(blockHash string) ([]TransferResponse, error) + func (c *RpcClient) GetBlockTransfersByHeight(height uint64) ([]TransferResponse, error) + func (c *RpcClient) GetDeploy(hash string) (DeployResult, error) + func (c *RpcClient) GetLatestBlock() (BlockResponse, error) + func (c *RpcClient) GetLatestBlockTransfers() ([]TransferResponse, error) + func (c *RpcClient) GetPeers() (PeerResult, error) + func (c *RpcClient) GetStateItem(stateRootHash, key string, path []string) (StoredValue, error) + func (c *RpcClient) GetStateRootHash(stateRootHash string) (StateRootHashResult, error) + func (c *RpcClient) GetStatus() (StatusResult, error) + func (c *RpcClient) GetValidator() (ValidatorPesponse, error) + func (c *RpcClient) PutDeploy(deploy Deploy) (JsonPutDeployRes, error) + type RpcError struct + Code int + Message string + type RpcRequest struct + Id string + Method string + Params interface{} + Version string + type RpcResponse struct + Error *RpcError + Id string + Result json.RawMessage + Version string + type RuntimeArgs struct + Args map[string]Value + KeyOrder []string + func NewRunTimeArgs(args map[string]Value, keyOrder []string) *RuntimeArgs + func ParseRuntimeArgs(args []interface{}) (RuntimeArgs, error) + func (r RuntimeArgs) FromMap(args map[string]Value, keyOrder []string) *RuntimeArgs + func (r RuntimeArgs) Insert(key string, value Value) + func (r RuntimeArgs) ToBytes() []byte + func (r RuntimeArgs) ToJSONInterface() []interface{} + type StateRootHashResult struct + StateRootHash string + type StatusResult struct + BuildVersion string + LastAddedBlock BlockResponse + type StoredContractByHash struct + Args RuntimeArgs + Entrypoint string + Hash [32]byte + Tag ExecutableDeployItemType + func (s *StoredContractByHash) UnmarshalStoredContractByHash(tempMap map[string]interface{}) error + func (s StoredContractByHash) MarshalJSON() ([]byte, error) + func (s StoredContractByHash) ToBytes() []byte + type StoredContractByName struct + Args RuntimeArgs + Entrypoint string + Name string + Tag ExecutableDeployItemType + func (s *StoredContractByName) UnmarshalStoredContractByName(tempMap map[string]interface{}) error + func (s StoredContractByName) MarshalJSON() ([]byte, error) + func (s StoredContractByName) ToBytes() []byte + type StoredValue struct + Account *JsonAccount + CLValue *JsonCLValue + Contract *JsonContractMetadata + ContractPackage *string + ContractWASM *string + DeployInfo *JsonDeployInfo + Transfer *TransferResponse + type StoredVersionedContractByHash struct + Args RuntimeArgs + Entrypoint string + Hash [32]byte + Tag ExecutableDeployItemType + Version *types.CLValue + func (s *StoredVersionedContractByHash) UnmarshalStoredVersionedContractByHash(tempMap map[string]interface{}) error + func (s StoredVersionedContractByHash) MarshalJSON() ([]byte, error) + func (s StoredVersionedContractByHash) ToBytes() []byte + type StoredVersionedContractByName struct + Args RuntimeArgs + Entrypoint string + Name string + Tag ExecutableDeployItemType + Version *types.CLValue + func (s *StoredVersionedContractByName) UnmarshalStoredVersionedContractByName(tempMap map[string]interface{}) error + func (s StoredVersionedContractByName) MarshalJSON() ([]byte, error) + func (s StoredVersionedContractByName) ToBytes() []byte + type SuccessExecutionResult struct + Cost string + Transfers []string + type Timestamp int64 + func (t *Timestamp) UnmarshalJSON(data []byte) error + func (t Timestamp) MarshalJSON() ([]byte, error) + type Transfer struct + Args RuntimeArgs + Tag ExecutableDeployItemType + func (t *Transfer) UnmarshalTransfer(tempMap map[string]interface{}) error + func (t Transfer) MarshalJSON() ([]byte, error) + func (t Transfer) ToBytes() []byte + type TransferContract struct + func (t TransferContract) MakeArgs(accountHash string, amount big.Int) RuntimeArgs + type TransferResponse struct + Amount string + DeployHash string + From string + Gas string + ID int64 + Source string + Target string + To string + type TransferResult struct + Amount string + DeployHash string + FromAccount string + Id string + SourcePurse string + TargetPurse string + ToAccount string + type UniqAddress struct + PublicKey *keypair.PublicKey + TransferId uint64 + type ValidatorPesponse struct + Version string + type ValidatorWeight struct + PublicKey string + Weight string + type Value struct + IsOptional bool + List *ValueList + Map *ValueMap + Optional *Value + StringBytes string + Tag types.CLType + func (v Value) MarshalJSON() ([]byte, error) + func (v Value) ToBytes() []uint8 + type ValueList struct + ElementType types.CLType + type ValueMap struct + KeyType types.CLType + ValueType types.CLType