Documentation
¶
Index ¶
- Constants
- Variables
- func OpaqueCall(ext interface{}) (*submodel.MultiOpaqueCall, error)
- func TransformHasher(Hasher string) types.StorageHasherV10
- type ChainExtrinsic
- type GsrpcClient
- func (sc *GsrpcClient) AccountInfo(who []byte) (*types.AccountInfo, error)
- func (sc *GsrpcClient) Address() string
- func (sc *GsrpcClient) BatchTransfer(receives []*submodel.Receive) error
- func (sc *GsrpcClient) BondOrUnbondCall(bond, unbond *big.Int) (*submodel.MultiOpaqueCall, error)
- func (sc *GsrpcClient) ExistentialDeposit() (types.U128, error)
- func (sc *GsrpcClient) FindCallIndex(call string) (types.CallIndex, error)
- func (sc *GsrpcClient) FindStorageEntryMetadata(module string, fn string) (types.StorageEntryMetadata, error)
- func (sc *GsrpcClient) FlashApi() (*gsrpc.RPCS, error)
- func (sc *GsrpcClient) FreeBalance(who []byte) (types.U128, error)
- func (sc *GsrpcClient) GetAccountInfo() (*types.AccountInfo, error)
- func (sc *GsrpcClient) GetBlock(blockHash string) (*rpc.Block, error)
- func (sc *GsrpcClient) GetBlockHash(blockNum uint64) (string, error)
- func (sc *GsrpcClient) GetBlockNumber(blockHash types.Hash) (uint64, error)
- func (sc *GsrpcClient) GetChainEvents(blockHash string) ([]*submodel.ChainEvent, error)
- func (sc *GsrpcClient) GetConst(prefix, name string, res interface{}) error
- func (sc *GsrpcClient) GetEvents(blockNum uint64) ([]*submodel.ChainEvent, error)
- func (sc *GsrpcClient) GetExtrinsics(blockHash string) ([]*submodel.Transaction, error)
- func (sc *GsrpcClient) GetFinalizedBlockNumber() (uint64, error)
- func (sc *GsrpcClient) GetFinalizedHead() (types.Hash, error)
- func (sc *GsrpcClient) GetHeader(blockHash types.Hash) (*types.Header, error)
- func (sc *GsrpcClient) GetHeaderLatest() (*types.Header, error)
- func (sc *GsrpcClient) GetLatestBlockNumber() (uint64, error)
- func (sc *GsrpcClient) GetLatestNonce() (types.U32, error)
- func (sc *GsrpcClient) GetLatestRuntimeVersion() (*types.RuntimeVersion, error)
- func (sc *GsrpcClient) GetPaymentQueryInfo(encodedExtrinsic string) (paymentInfo *rpc.PaymentQueryInfo, err error)
- func (sc *GsrpcClient) NewUnsignedExtrinsic(callMethod string, args ...interface{}) (interface{}, error)
- func (sc *GsrpcClient) NewVersionAccountInfo(who []byte) (*submodel.AccountInfo, error)
- func (sc *GsrpcClient) NominateCall(validators []types.Bytes) (*submodel.MultiOpaqueCall, error)
- func (sc *GsrpcClient) PublicKey() []byte
- func (sc *GsrpcClient) QueryStorage(prefix, method string, arg1, arg2 []byte, result interface{}) (bool, error)
- func (sc *GsrpcClient) SignAndSubmitTx(ext interface{}) error
- func (sc *GsrpcClient) SingleTransferTo(accountId []byte, value types.UCompact) error
- func (sc *GsrpcClient) StakingLedger(ac types.AccountID) (*submodel.StakingLedger, error)
- func (sc *GsrpcClient) TransferCall(accountId []byte, value types.UCompact) (*submodel.MultiOpaqueCall, error)
- func (sc *GsrpcClient) WithdrawCall() (*submodel.MultiOpaqueCall, error)
- type Logger
Constants ¶
View Source
const ( ChainTypeStafi = "stafi" ChainTypePolkadot = "polkadot" AddressTypeAccountId = "AccountId" AddressTypeMultiAddress = "MultiAddress" )
Variables ¶
Functions ¶
func OpaqueCall ¶ added in v1.3.0
func OpaqueCall(ext interface{}) (*submodel.MultiOpaqueCall, error)
func TransformHasher ¶ added in v1.3.0
func TransformHasher(Hasher string) types.StorageHasherV10
Types ¶
type ChainExtrinsic ¶ added in v1.3.0
type ChainExtrinsic struct { ID uint `gorm:"primary_key"` ExtrinsicIndex string `json:"extrinsic_index" sql:"default: null;size:100"` BlockNum int `json:"block_num" ` BlockTimestamp int `json:"block_timestamp"` ExtrinsicLength string `json:"extrinsic_length"` VersionInfo string `json:"version_info"` CallCode string `json:"call_code"` CallModuleFunction string `json:"call_module_function" sql:"size:100"` CallModule string `json:"call_module" sql:"size:100"` Params interface{} `json:"params" sql:"type:MEDIUMTEXT;" ` AccountId string `json:"account_id"` Signature string `json:"signature"` Nonce int `json:"nonce"` Era string `json:"era"` ExtrinsicHash string `json:"extrinsic_hash" sql:"default: null" ` IsSigned bool `json:"is_signed"` Success bool `json:"success"` Fee decimal.Decimal `json:"fee" sql:"type:decimal(30,0);"` BatchIndex int `json:"-" gorm:"-"` }
type GsrpcClient ¶ added in v1.3.0
func NewGsrpcClient ¶ added in v1.3.0
func NewGsrpcClient(chainType, endpoint, typesPath, addressType string, key *signature.KeyringPair, log Logger, stop <-chan int) (*GsrpcClient, error)
func (*GsrpcClient) AccountInfo ¶ added in v1.3.0
func (sc *GsrpcClient) AccountInfo(who []byte) (*types.AccountInfo, error)
func (*GsrpcClient) Address ¶ added in v1.3.0
func (sc *GsrpcClient) Address() string
func (*GsrpcClient) BatchTransfer ¶ added in v1.3.0
func (sc *GsrpcClient) BatchTransfer(receives []*submodel.Receive) error
func (*GsrpcClient) BondOrUnbondCall ¶ added in v1.3.0
func (sc *GsrpcClient) BondOrUnbondCall(bond, unbond *big.Int) (*submodel.MultiOpaqueCall, error)
func (*GsrpcClient) ExistentialDeposit ¶ added in v1.3.0
func (sc *GsrpcClient) ExistentialDeposit() (types.U128, error)
func (*GsrpcClient) FindCallIndex ¶ added in v1.3.0
func (sc *GsrpcClient) FindCallIndex(call string) (types.CallIndex, error)
func (*GsrpcClient) FindStorageEntryMetadata ¶ added in v1.3.0
func (sc *GsrpcClient) FindStorageEntryMetadata(module string, fn string) (types.StorageEntryMetadata, error)
func (*GsrpcClient) FlashApi ¶ added in v1.3.0
func (sc *GsrpcClient) FlashApi() (*gsrpc.RPCS, error)
func (*GsrpcClient) FreeBalance ¶ added in v1.3.0
func (sc *GsrpcClient) FreeBalance(who []byte) (types.U128, error)
func (*GsrpcClient) GetAccountInfo ¶ added in v1.3.0
func (sc *GsrpcClient) GetAccountInfo() (*types.AccountInfo, error)
func (*GsrpcClient) GetBlock ¶ added in v1.3.0
func (sc *GsrpcClient) GetBlock(blockHash string) (*rpc.Block, error)
func (*GsrpcClient) GetBlockHash ¶ added in v1.3.0
func (sc *GsrpcClient) GetBlockHash(blockNum uint64) (string, error)
func (*GsrpcClient) GetBlockNumber ¶ added in v1.3.0
func (sc *GsrpcClient) GetBlockNumber(blockHash types.Hash) (uint64, error)
func (*GsrpcClient) GetChainEvents ¶ added in v1.3.0
func (sc *GsrpcClient) GetChainEvents(blockHash string) ([]*submodel.ChainEvent, error)
func (*GsrpcClient) GetConst ¶ added in v1.3.0
func (sc *GsrpcClient) GetConst(prefix, name string, res interface{}) error
func (*GsrpcClient) GetEvents ¶ added in v1.3.0
func (sc *GsrpcClient) GetEvents(blockNum uint64) ([]*submodel.ChainEvent, error)
func (*GsrpcClient) GetExtrinsics ¶ added in v1.3.0
func (sc *GsrpcClient) GetExtrinsics(blockHash string) ([]*submodel.Transaction, error)
func (*GsrpcClient) GetFinalizedBlockNumber ¶ added in v1.3.0
func (sc *GsrpcClient) GetFinalizedBlockNumber() (uint64, error)
func (*GsrpcClient) GetFinalizedHead ¶ added in v1.3.0
func (sc *GsrpcClient) GetFinalizedHead() (types.Hash, error)
func (*GsrpcClient) GetHeaderLatest ¶ added in v1.3.0
func (sc *GsrpcClient) GetHeaderLatest() (*types.Header, error)
func (*GsrpcClient) GetLatestBlockNumber ¶ added in v1.3.0
func (sc *GsrpcClient) GetLatestBlockNumber() (uint64, error)
func (*GsrpcClient) GetLatestNonce ¶ added in v1.3.0
func (sc *GsrpcClient) GetLatestNonce() (types.U32, error)
func (*GsrpcClient) GetLatestRuntimeVersion ¶ added in v1.3.0
func (sc *GsrpcClient) GetLatestRuntimeVersion() (*types.RuntimeVersion, error)
func (*GsrpcClient) GetPaymentQueryInfo ¶ added in v1.3.0
func (sc *GsrpcClient) GetPaymentQueryInfo(encodedExtrinsic string) (paymentInfo *rpc.PaymentQueryInfo, err error)
func (*GsrpcClient) NewUnsignedExtrinsic ¶ added in v1.3.0
func (sc *GsrpcClient) NewUnsignedExtrinsic(callMethod string, args ...interface{}) (interface{}, error)
func (*GsrpcClient) NewVersionAccountInfo ¶ added in v1.3.0
func (sc *GsrpcClient) NewVersionAccountInfo(who []byte) (*submodel.AccountInfo, error)
func (*GsrpcClient) NominateCall ¶ added in v1.3.0
func (sc *GsrpcClient) NominateCall(validators []types.Bytes) (*submodel.MultiOpaqueCall, error)
func (*GsrpcClient) PublicKey ¶ added in v1.3.0
func (sc *GsrpcClient) PublicKey() []byte
func (*GsrpcClient) QueryStorage ¶ added in v1.3.0
func (sc *GsrpcClient) QueryStorage(prefix, method string, arg1, arg2 []byte, result interface{}) (bool, error)
queryStorage performs a storage lookup. Arguments may be nil, result must be a pointer.
func (*GsrpcClient) SignAndSubmitTx ¶ added in v1.3.0
func (sc *GsrpcClient) SignAndSubmitTx(ext interface{}) error
func (*GsrpcClient) SingleTransferTo ¶ added in v1.3.1
func (sc *GsrpcClient) SingleTransferTo(accountId []byte, value types.UCompact) error
func (*GsrpcClient) StakingLedger ¶ added in v1.3.0
func (sc *GsrpcClient) StakingLedger(ac types.AccountID) (*submodel.StakingLedger, error)
func (*GsrpcClient) TransferCall ¶ added in v1.3.0
func (sc *GsrpcClient) TransferCall(accountId []byte, value types.UCompact) (*submodel.MultiOpaqueCall, error)
func (*GsrpcClient) WithdrawCall ¶ added in v1.3.0
func (sc *GsrpcClient) WithdrawCall() (*submodel.MultiOpaqueCall, error)
type Logger ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.