import { PublicKey } from '@near-js/crypto'; import { b as AccessKey, j as Action, k as DelegateAction, G as GlobalContractDeployMode, d as GlobalContractIdentifier } from './actions-D9yOaLEz.js'; import { Signature } from './signature.js'; import '@near-js/types'; /** * Creates a full access key with full access permissions. * @returns A new full access key. */ declare function fullAccessKey(): AccessKey; /** * Creates an access key with function call permission for a specific receiver and method names. * @param receiverId The NEAR account ID of the function call receiver. * @param methodNames An array of method names allowed for function calls. * @param allowance An optional allowance (maximum amount) for the function call. Default: Unlimited. * @returns A new access key with function call permission. */ declare function functionCallAccessKey(receiverId: string, methodNames: string[], allowance?: bigint): AccessKey; /** * Creates a new action for creating a new NEAR account. * @returns A new action for creating a new account. */ declare function createAccount(): Action; /** * Creates a new action for deploying a contract with the provided code. * @param code The Uint8Array representing the code of the contract. * @returns A new action for deploying a contract. */ declare function deployContract(code: Uint8Array): Action; /** * Converts an input argument to a Buffer, handling cases for both JSON and Uint8Array. * @param args The input argument, either JSON object or Uint8Array. * @returns A Buffer representation of the input argument. */ declare function stringifyJsonOrBytes(args: any): Buffer; /** * Constructs {@link Action} instance representing contract method call. * * @param methodName the name of the method to call * @param args 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. * @param gas max amount of gas that method call can use * @param deposit amount of NEAR (in yoctoNEAR) to send together with the call * @param stringify Convert input arguments into bytes array. */ declare function functionCall(methodName: string, args: Uint8Array | object, gas?: bigint, deposit?: bigint, stringify?: typeof stringifyJsonOrBytes): Action; /** * Creates a new action for transferring funds, optionally specifying a deposit amount. * @param deposit The amount to be deposited along with the transfer. Default: 0. * @returns A new action for transferring funds. */ declare function transfer(deposit?: bigint): Action; /** * Creates a new action for staking tokens, specifying the stake amount and public key. * @param stake The amount to be staked. Default: 0. * @param publicKey The public key associated with the staking action. * @returns A new action for staking tokens. */ declare function stake(stake: bigint, publicKey: PublicKey): Action; /** * Creates a new action for adding a public key with a specified access key. * @param publicKey The public key to be added. * @param accessKey The access key associated with the added public key. * @returns A new action for adding a public key. */ declare function addKey(publicKey: PublicKey, accessKey: AccessKey): Action; /** * Creates a new action for deleting a public key. * @param publicKey The public key to be deleted. * @returns A new action for deleting a public key. */ declare function deleteKey(publicKey: PublicKey): Action; /** * Creates a new action for deleting an account with the specified beneficiary ID. * @param beneficiaryId The NEAR account ID of the beneficiary. * @returns A new action for deleting an account. */ declare function deleteAccount(beneficiaryId: string): Action; /** * Creates a new action for a signed delegation, specifying the delegate action and signature. * @param delegateAction The delegate action to be performed. * @param signature The signature associated with the delegate action. * @returns A new action for a signed delegation. */ declare function signedDelegate({ delegateAction, signature, }: { delegateAction: DelegateAction; signature: Signature; }): Action; /** * Creates a new action for deploying a global contract with provided code and mode. * @param code The Uint8Array representing the contract code. * @param deployMode The mode to deploy global contract (CodeHash or AccountId). * @returns A new action for deploying a global contract. */ declare function deployGlobalContract(code: Uint8Array, deployMode: GlobalContractDeployMode): Action; /** * Creates a new action for using a previously deployed global contract. * @param contractIdentifier The global contract identifier (hash or account id). * @returns A new action for using a global contract. */ declare function useGlobalContract(contractIdentifier: GlobalContractIdentifier): Action; declare const actionCreators: { addKey: typeof addKey; createAccount: typeof createAccount; deleteAccount: typeof deleteAccount; deleteKey: typeof deleteKey; deployContract: typeof deployContract; fullAccessKey: typeof fullAccessKey; functionCall: typeof functionCall; functionCallAccessKey: typeof functionCallAccessKey; signedDelegate: typeof signedDelegate; stake: typeof stake; transfer: typeof transfer; deployGlobalContract: typeof deployGlobalContract; useGlobalContract: typeof useGlobalContract; }; export { actionCreators, stringifyJsonOrBytes };