Solana.SPL.Token.MultiSig (Solana v0.1.0)

View Source

Functions for dealing with multi-signature accounts.

Multi-signature accounts can used in place of any single owner/delegate accounts in any token instruction that require an owner/delegate to be present.

Summary

Types

t()

Multi-signature account metadata.

Functions

The size of a serialized multi-signature account.

Creates the instructions to initialize a multisignature account.

Types

t()

@type t() :: %Solana.SPL.Token.MultiSig{
  initialized?: boolean(),
  signers: [Solana.key()],
  signers_required: byte(),
  signers_total: byte()
}

Multi-signature account metadata.

Functions

byte_size()

The size of a serialized multi-signature account.

from_account_info(info)

@spec from_account_info(info :: map()) :: t() | :error

Translates the result of a Solana.RPC.Request.get_account_info/2 into a Solana.SPL.Token.MultiSig.t/0.

init(opts)

Creates the instructions to initialize a multisignature account.

These instructions must be included in the same Transaction.

Options

  • :payer - Required. The account that will pay for the multisig creation

  • :balance (non_neg_integer/0) - Required. The lamport balance the multisig account should have

  • :signers - Required. The full set of signers; should be a list of 11 members or fewer

  • :signatures_required - Required. number of signatures required; should be between 1 and 11 (inclusive)

  • :new - Required. public key for the new multisig account