actionCreators: {
    addKey: ((publicKey, accessKey) => Action);
    createAccount: (() => Action);
    deleteAccount: ((beneficiaryId) => Action);
    deleteKey: ((publicKey) => Action);
    deployContract: ((code) => Action);
    fullAccessKey: (() => AccessKey);
    functionCall: ((methodName, args, gas?, deposit?, stringify?, jsContract?) => Action);
    functionCallAccessKey: ((receiverId, methodNames, allowance?) => AccessKey);
    signedDelegate: ((__namedParameters) => Action);
    stake: ((stake?, publicKey) => Action);
    transfer: ((deposit?) => Action);
} = ...

Type declaration

  • addKey: ((publicKey, accessKey) => Action)
      • (publicKey, accessKey): Action
      • Creates a new action for adding a public key with a specified access key.

        Parameters

        • publicKey: PublicKey

          The public key to be added.

        • accessKey: AccessKey

          The access key associated with the added public key.

        Returns Action

        A new action for adding a public key.

  • createAccount: (() => Action)
      • (): Action
      • Creates a new action for creating a new NEAR account.

        Returns Action

        A new action for creating a new account.

  • deleteAccount: ((beneficiaryId) => Action)
      • (beneficiaryId): Action
      • Creates a new action for deleting an account with the specified beneficiary ID.

        Parameters

        • beneficiaryId: string

          The NEAR account ID of the beneficiary.

        Returns Action

        A new action for deleting an account.

  • deleteKey: ((publicKey) => Action)
      • (publicKey): Action
      • Creates a new action for deleting a public key.

        Parameters

        • publicKey: PublicKey

          The public key to be deleted.

        Returns Action

        A new action for deleting a public key.

  • deployContract: ((code) => Action)
      • (code): Action
      • Creates a new action for deploying a contract with the provided code.

        Parameters

        • code: Uint8Array

          The Uint8Array representing the code of the contract.

        Returns Action

        A new action for deploying a contract.

  • fullAccessKey: (() => AccessKey)
      • (): AccessKey
      • Creates a full access key with full access permissions.

        Returns AccessKey

        A new full access key.

  • functionCall: ((methodName, args, gas?, deposit?, stringify?, jsContract?) => Action)
      • (methodName, args, gas?, deposit?, stringify?, jsContract?): Action
      • Constructs Action instance representing contract method call.

        Parameters

        • methodName: string

          the name of the method to call

        • args: object | Uint8Array

          arguments to pass to method. Can be either plain JS object which gets serialized as JSON automatically or Uint8Array instance which represents bytes passed as is.

        • gas: bigint = ...

          max amount of gas that method call can use

        • deposit: bigint = ...

          amount of NEAR (in yoctoNEAR) to send together with the call

        • stringify: ((args) => Buffer) = stringifyJsonOrBytes

          Convert input arguments into bytes array.

            • (args): Buffer
            • Converts an input argument to a Buffer, handling cases for both JSON and Uint8Array.

              Parameters

              • args: any

                The input argument, either JSON object or Uint8Array.

              Returns Buffer

              A Buffer representation of the input argument.

        • jsContract: boolean = false

          Is contract from JS SDK, skips stringification of arguments.

        Returns Action

  • functionCallAccessKey: ((receiverId, methodNames, allowance?) => AccessKey)
      • (receiverId, methodNames, allowance?): AccessKey
      • Creates an access key with function call permission for a specific receiver and method names.

        Parameters

        • receiverId: string

          The NEAR account ID of the function call receiver.

        • methodNames: string[]

          An array of method names allowed for function calls.

        • Optional allowance: bigint

          An optional allowance (maximum amount) for the function call. Default: Unlimited.

        Returns AccessKey

        A new access key with function call permission.

  • signedDelegate: ((__namedParameters) => Action)
      • (__namedParameters): Action
      • Creates a new action for a signed delegation, specifying the delegate action and signature.

        Parameters

        Returns Action

        A new action for a signed delegation.

  • stake: ((stake?, publicKey) => Action)
      • (stake?, publicKey): Action
      • Creates a new action for staking tokens, specifying the stake amount and public key.

        Parameters

        • stake: bigint = ...

          The amount to be staked. Default: 0.

        • publicKey: PublicKey

          The public key associated with the staking action.

        Returns Action

        A new action for staking tokens.

  • transfer: ((deposit?) => Action)
      • (deposit?): Action
      • Creates a new action for transferring funds, optionally specifying a deposit amount.

        Parameters

        • deposit: bigint = ...

          The amount to be deposited along with the transfer. Default: 0.

        Returns Action

        A new action for transferring funds.