Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultTTL is default time to live for tx in mempool. DefaultTTL int64 = 28000 // 8 hours. // DefaultGasPrice is default gas price in Kadena network. DefaultGasPrice float64 = 1e-5 )
Variables ¶
This section is empty.
Functions ¶
func CreationTime ¶
func CreationTime() int64
CreationTime is helper that returns creation unix time of tx.
Types ¶
type CapabilityItem ¶
type CapabilityItem struct {
Name string `json:"name"`
Args interface{} `json:"args"`
}
CapabilityItem defines scope what the signing keys are allowed to sign.
type Command ¶
type Command struct {
Hash string `json:"hash"`
Sigs []Signer `json:"sigs"`
Cmd string `json:"cmd"`
}
Command describes Kadena command to interact with blockchain.
type Exec ¶
type Exec struct {
Data interface{} `json:"data"`
Code string `json:"code"`
}
Exec contains Pact code where defines what to do with tx and which data should be passed into.
type Meta ¶
type Meta struct {
ChainID string `json:"chainId"`
Sender string `json:"sender"`
GasLimit int `json:"gasLimit"`
GasPrice float64 `json:"gasPrice"`
TTL int64 `json:"ttl"`
CreationTime int64 `json:"creationTime"`
}
Meta contains public/private metadata for txs.
type Request ¶
type Request struct {
PactCode string `json:"pactCode"`
EnvData string `json:"envData"`
Payload Payload `json:"payload"`
NetworkID string `json:"networkId"`
Meta Meta `json:"meta"`
Nonce string `json:"nonce"`
Signers []Signer `json:"signers"`
Type Type `json:"type"`
}
Request defines command request aka payload.
Click to show internal directories.
Click to hide internal directories.