Versions in this module Expand all Collapse all v1 v1.1.0 Jun 19, 2022 Changes in this version + type Backend interface + AcceptTx func(ctx stdcontext.Context, tx *platformvm.Tx) error + func NewBackend(ctx Context, utxos ChainUTXOs, txs map[ids.ID]*platformvm.Tx) Backend + type Builder interface + NewAddDelegatorTx func(validator *platformvm.Validator, rewardsOwner *secp256k1fx.OutputOwners, ...) (*platformvm.UnsignedAddDelegatorTx, error) + NewAddSubnetValidatorTx func(validator *platformvm.SubnetValidator, options ...common.Option) (*platformvm.UnsignedAddSubnetValidatorTx, error) + NewAddValidatorTx func(validator *platformvm.Validator, rewardsOwner *secp256k1fx.OutputOwners, ...) (*platformvm.UnsignedAddValidatorTx, error) + NewCreateChainTx func(subnetID ids.ID, genesis []byte, vmID ids.ID, fxIDs []ids.ID, chainName string, ...) (*platformvm.UnsignedCreateChainTx, error) + NewCreateSubnetTx func(owner *secp256k1fx.OutputOwners, options ...common.Option) (*platformvm.UnsignedCreateSubnetTx, error) + NewExportTx func(chainID ids.ID, outputs []*djtx.TransferableOutput, options ...common.Option) (*platformvm.UnsignedExportTx, error) + NewImportTx func(chainID ids.ID, to *secp256k1fx.OutputOwners, options ...common.Option) (*platformvm.UnsignedImportTx, error) + func NewBuilder(addrs ids.ShortSet, backend BuilderBackend) Builder + type BuilderBackend interface + GetTx func(ctx stdcontext.Context, txID ids.ID) (*platformvm.Tx, error) + UTXOs func(ctx stdcontext.Context, sourceChainID ids.ID) ([]*djtx.UTXO, error) + type ChainUTXOs interface + AddUTXO func(ctx stdcontext.Context, destinationChainID ids.ID, utxo *djtx.UTXO) error + GetUTXO func(ctx stdcontext.Context, sourceChainID, utxoID ids.ID) (*djtx.UTXO, error) + RemoveUTXO func(ctx stdcontext.Context, sourceChainID, utxoID ids.ID) error + UTXOs func(ctx stdcontext.Context, sourceChainID ids.ID) ([]*djtx.UTXO, error) + type Context interface + BaseTxFee func() uint64 + CreateBlockchainTxFee func() uint64 + CreateSubnetTxFee func() uint64 + DJTXAssetID func() ids.ID + HRP func() string + NetworkID func() uint32 + func NewContext(networkID uint32, djtxAssetID ids.ID, baseTxFee uint64, ...) Context + func NewContextFromClients(ctx stdcontext.Context, infoClient info.Client, xChainClient avm.Client) (Context, error) + func NewContextFromURI(ctx stdcontext.Context, uri string) (Context, error) + type Signer interface + Sign func(ctx stdcontext.Context, tx *platformvm.Tx) error + SignUnsigned func(ctx stdcontext.Context, tx platformvm.UnsignedTx) (*platformvm.Tx, error) + func NewSigner(kc *secp256k1fx.Keychain, backend SignerBackend) Signer + type SignerBackend interface + GetTx func(ctx stdcontext.Context, txID ids.ID) (*platformvm.Tx, error) + GetUTXO func(ctx stdcontext.Context, chainID, utxoID ids.ID) (*djtx.UTXO, error) + type Wallet interface + IssueAddDelegatorTx func(validator *platformvm.Validator, rewardsOwner *secp256k1fx.OutputOwners, ...) (ids.ID, error) + IssueAddSubnetValidatorTx func(validator *platformvm.SubnetValidator, options ...common.Option) (ids.ID, error) + IssueAddValidatorTx func(validator *platformvm.Validator, rewardsOwner *secp256k1fx.OutputOwners, ...) (ids.ID, error) + IssueCreateChainTx func(subnetID ids.ID, genesis []byte, vmID ids.ID, fxIDs []ids.ID, chainName string, ...) (ids.ID, error) + IssueCreateSubnetTx func(owner *secp256k1fx.OutputOwners, options ...common.Option) (ids.ID, error) + IssueExportTx func(chainID ids.ID, outputs []*djtx.TransferableOutput, options ...common.Option) (ids.ID, error) + IssueImportTx func(chainID ids.ID, to *secp256k1fx.OutputOwners, options ...common.Option) (ids.ID, error) + IssueTx func(tx *platformvm.Tx, options ...common.Option) (ids.ID, error) + IssueUnsignedTx func(utx platformvm.UnsignedTx, options ...common.Option) (ids.ID, error) + func NewWallet(builder Builder, signer Signer, client platformvm.Client, backend Backend) Wallet