CommissionRates defines the initial commission rates to be used for creating a validator.
max_change_rate defines the maximum daily increase of the validator commission, as a fraction.
max_rate defines the maximum commission rate which validator can ever charge, as a fraction.
rate is the commission rate charged to delegators, as a fraction.
The chain-id is used in encryption code & when signing txs.
Passing encryptionSeed
will allow tx decryption at a later time. Ignored if encryptionUtils
is supplied. Must be 32 bytes.
encryptionUtils
overrides the default EncryptionUtilsImpl.
A URL to the API service, also known as LCD, REST API or gRPC-gateway, by default on port 1317
A wallet for signing transactions & permits. When wallet
is supplied, walletAddress
& chainId
must be supplied too.
walletAddress is the specific account address in the wallet that is permitted to sign transactions & permits.
GenericAuthorization gives the grantee unrestricted permissions to execute the provided Msg on behalf of the granter's account. The provided Msg must implement the Authorization interface: https://github.com/cosmos/cosmos-sdk/blob/c44309bc694ea8b6069ae147743f0b25dc8b52c0/x/authz/authorizations.go#L9-L25
Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients
Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset
the height within the given revision
the revision that the client is currently on
Input models transaction input for MsgMultiSend.
MsgData defines the data returned in a Result object during message execution.
Output models transaction outputs for MsgMultiSend.
ParamChange defines an individual parameter change, for use in ParameterChangeProposal.
Returns a transaction with a txhash. Must be 64 character upper-case hex string
To tell which events you want, you need to provide a query. query is a string, which has a form: "condition AND condition ..." (no OR at the moment).
condition has a form: "key operation operand". key is a string with a restricted set of possible symbols (\t\n\r()"'=>< are not allowed).
operation can be "=", "<", "<=", ">", ">=", "CONTAINS" AND "EXISTS". operand can be a string (escaped with single quotes), number, date or time.
Examples:
tx.hash = 'XYZ'
# single transactiontx.height = 5
# all txs of the fifth blockcreate_validator.validator = 'ABC'
# tx where validator ABC was createdTendermint provides a few predefined keys: tm.event, tx.hash and tx.height. You can provide additional event keys that were emitted during the transaction.
All events are indexed by a composite key of the form {eventType}.{evenAttrKey}
.
Multiple event types with duplicate keys are allowed and are meant to categorize unique and distinct events.
To create a query for txs where AddrA transferred funds: transfer.sender = 'AddrA'
.
The SHA256 hash value of the contract's WASM bytecode, represented as case-insensitive 64 character hex string. This is used to make sure only the contract that's being invoked can decrypt the query data.
code_hash is an optional parameter but using it will result in way faster execution time.
Valid examples:
The address of the contract
A JSON object that will be passed to the contract as a query
SingleMsgTx is a function that broadcasts a single message transaction.
It also has a simulate()
method to execute the transaction without
committing it on-chain. This is helpful for gas estimation.
StakeAuthorization defines authorization for delegate/undelegate/redelegate.
allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's account.
authorization_type defines one of AuthorizationType.
deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is empty, there is no spend limit and any amount of coins can be delegated.
When waiting for the tx to commit on-chain, how much time (in milliseconds) to wait between checks.
Smaller intervals will cause more load on your node provider. Keep in mind that blocks on Secret Network take about 6 seconds to finalize.
Defaults to 6_000
. Ignored if waitForCommit = false
.
If BroadcastMode.Sync
- Broadcast transaction to mempool and wait for CheckTx response.
How much time (in milliseconds) to wait for tx to commit on-chain.
Defaults to 60_000
. Ignored if waitForCommit = false
.
explicitSignerData can be used to override chainId
, accountNumber
& accountSequence
.
This is useful when using BroadcastMode.Async or when you don't want secretjs
to query for accountNumber
& accountSequence
from the chain. (smoother in UIs, less load on your node provider).
Defaults to "uscrt"
.
Address of the fee granter from which to charge gas fees.
Defaults to 25_000
.
E.g. gasPriceInFeeDenom=0.1 & feeDenom="uscrt" => Total fee for tx is 0.1 * gasLimit
uscrt. Defaults to 0.1
.
Defaults to ""
.
If false
returns immediately with only the transactionHash
field set. Defaults to true
.
A transaction that is indexed as part of the transaction history
If code = 0, arrayLog
is a flattened jsonLog
. Values are decrypted if possible.
Transaction execution error code. 0 on success. See TxResultCode.
Namespace for the Code
Return value (if there's any) for each input message
Events defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante handler. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
Note: events are not decrypted.
Amount of gas that was actually used by the transaction.
Gas limit that was originaly set by the transaction.
Block height in which the tx was committed on-chain
Additional information. May be non-deterministic.
If code = 0, jsonLog = JSON.parse(rawLow)
. Values are decrypted if possible.
If code != 0, rawLog contains the error.
If code = 0 you'll probably want to use jsonLog
or arrayLog
. Values are not decrypted.
An RFC 3339 timestamp of when the tx was committed on-chain.
The format is {year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z
.
Transaction hash (might be used as transaction ID). Guaranteed to be non-empty upper-case hex
Decoded transaction input.
MsgExec attempts to execute the provided messages using authorizations granted to the grantee. Each message should have only one signer corresponding to the granter of the authorization.
MsgGrant is a request type for Grant method. It declares authorization to the grantee on behalf of the granter with the provided expiration time.
MsgRevoke revokes any authorization with the provided sdk.Msg type on the granter's account with that has been granted to the grantee.
MsgMultiSend represents an arbitrary multi-in, multi-out send message.
MsgSend represents a message to send coins from one account to another.
Execute a function on a contract
Instantiate a contract from code id
Upload a compiled contract to Secret Network
MsgVerifyInvariant represents a message to verify a particular invariance.
MsgFundCommunityPool allows an account to directly fund the community pool.
MsgSetWithdrawAddress sets the withdraw address for a delegator (or validator self-delegation).
MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator from a single validator.
MsgWithdrawValidatorCommission withdraws the full commission to the validator address.
MsgSubmitEvidence represents a message that supports submitting arbitrary Evidence of misbehavior such as equivocation or counterfactual signing.
MsgGrantAllowance adds permission for Grantee to spend up to Allowance of fees from the account of Granter.
MsgRevokeAllowance removes any existing Allowance from Granter to Grantee.
MsgDeposit defines a message to submit a deposit to an existing proposal.
MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary proposal Content.
MsgVote defines a message to cast a vote.
MsgVoteWeighted defines a message to cast a vote, with an option to split the vote.
MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between ICS20 enabled chains. See ICS Spec here: https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures
MsgUnjail defines a message to release a validator from jail.
MsgBeginRedelegate defines an SDK message for performing a redelegation of coins from a delegator and source validator to a destination validator.
MsgCreateValidator defines an SDK message for creating a new validator.
MsgDelegate defines an SDK message for performing a delegation of coins from a delegator to a validator.
MsgEditValidator defines an SDK message for editing an existing validator.
MsgUndelegate defines an SDK message for performing an undelegation from a delegate and a validator
MsgCreateVestingAccount defines a message that enables creating a vesting account.
Sign and broadcast a transaction to Secret Network.
A list of messages, executed sequentially. If all messages succeeds then the transaction succeed, and the resulting TxResponse object will have code = 0
. If at lease one message fails, the entire transaction is reverted and TxResponse code
field will not be 0
.
List of possible Msgs:
Simulates a transaction on the node without broadcasting it to the chain.
Can be used to get a gas estimation or to see the output without actually committing a transaction on-chain.
The input should be exactly how you'd use it in broadcast
.
Description defines a validator description.
details define other optional details.
identity defines an optional identity signature (ex. UPort or Keybase).
moniker defines a human-readable name for the validator.
security_contact defines an optional email for security contact.
website defines an optional website link.
Convert a secp256k1 compressed public key to a address
The account's pubkey as base64 string, should be 33 bytes (compressed secp256k1)
the account's address
Convert a secp256k1 compressed public key to a address
The account's pubkey as base64 string, should be 33 bytes (compressed secp256k1)
the account's address
Copied here to avoid unnecessary deps
MIT License
Copyright (c) Kevin MÃ¥rtensson kevinmartensson@gmail.com (github.com/kevva)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Convert a secp256k1 compressed public key to a address
The account's pubkey, should be 33 bytes (compressed secp256k1)
the account's address
Convert self delegator address to validator address
The self delegator bech32 encoded address
the account's address
Convert a Tendermint ed25519 public key to a consensus address
The tendermint pubkey, should be 32 bytes (ed25519)
the valcons account's address
Convert self delegator address to validator address
The validator bech32 encoded address
the account's address
Coin defines a token with a denomination and an amount.
NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto.