View Source Kadena.Pact.Command behaviour (Kadena v0.19.1)
Specifies contracts to build PACT command requests.
Link to this section Summary
Link to this section Types
@type chain_id() :: Kadena.Types.ChainID.t()
@type cmd() :: {:ok, Kadena.Types.Command.t()}
@type cmd_request() :: cont_request() | exec_request()
@type cont_request() :: Kadena.Pact.ContCommand.t()
@type error() :: {:error, Keyword.t()}
@type exec_request() :: Kadena.Pact.ExecCommand.t()
@type hash() :: String.t()
@type keypair() :: Kadena.Types.KeyPair.t()
@type keypairs_list() :: [keypair()]
@type meta_data() :: Kadena.Types.MetaData.t()
@type network_id() :: Kadena.Types.NetworkID.t()
@type signer() :: Kadena.Types.Signer.t()
@type signers_list() :: [signer()]
@type string_value() :: String.t()
Link to this section Callbacks
@callback add_keypair(cmd :: cmd_request(), keypair :: keypair()) :: cmd_request()
@callback add_keypairs(cmd :: cmd_request(), keypairs :: keypairs_list()) :: cmd_request()
@callback add_signer(cmd :: cmd_request(), signer :: signer()) :: cmd_request()
@callback add_signers(cmd :: cmd_request(), signers :: signers_list()) :: cmd_request()
@callback build(cmd :: cmd_request()) :: cmd() | error()
@callback from_yaml(path :: string_value()) :: cmd_request()
@callback new() :: cmd_request()
@callback set_code(cmd :: exec_request(), code :: string_value()) :: exec_request()
@callback set_data(cmd :: cmd_request(), data :: map()) :: cmd_request()
@callback set_metadata(cmd :: cmd_request(), meta_data :: meta_data()) :: cmd_request()
@callback set_network(cmd :: cmd_request(), network :: atom()) :: cmd_request()
@callback set_nonce(cmd :: cmd_request(), nonce :: string_value()) :: cmd_request()
@callback set_pact_tx_hash(cmd :: cont_request(), hash :: hash()) :: cont_request()
@callback set_proof(cmd :: cont_request(), proof :: string_value()) :: cont_request()
@callback set_rollback(cmd :: cont_request(), rollback :: boolean()) :: cont_request()
@callback set_step(cmd :: cont_request(), step :: integer()) :: cont_request()