Skip to main content
Version: near-api-js@1.1.0

Module: transaction

Classesโ€‹

Variablesโ€‹

SCHEMAโ€‹

Const SCHEMA: Map<Class<any>, any>

Defined inโ€‹

transaction.ts:149

Functionsโ€‹

addKeyโ€‹

addKey(publicKey, accessKey): Action

Parametersโ€‹

NameType
publicKeyPublicKey
accessKeyAccessKey

Returnsโ€‹

Action

Defined inโ€‹

transaction.ts:85


createAccountโ€‹

createAccount(): Action

Returnsโ€‹

Action

Defined inโ€‹

transaction.ts:45


createTransactionโ€‹

createTransaction(signerId, publicKey, receiverId, nonce, actions, blockHash): Transaction

Parametersโ€‹

NameType
signerIdstring
publicKeyPublicKey
receiverIdstring
noncestring | number | BN
actionsAction[]
blockHashUint8Array

Returnsโ€‹

Transaction

Defined inโ€‹

transaction.ts:223


deleteAccountโ€‹

deleteAccount(beneficiaryId): Action

Parametersโ€‹

NameType
beneficiaryIdstring

Returnsโ€‹

Action

Defined inโ€‹

transaction.ts:93


deleteKeyโ€‹

deleteKey(publicKey): Action

Parametersโ€‹

NameType
publicKeyPublicKey

Returnsโ€‹

Action

Defined inโ€‹

transaction.ts:89


deployContractโ€‹

deployContract(code): Action

Parametersโ€‹

NameType
codeUint8Array

Returnsโ€‹

Action

Defined inโ€‹

transaction.ts:49


fullAccessKeyโ€‹

fullAccessKey(): AccessKey

Returnsโ€‹

AccessKey

Defined inโ€‹

transaction.ts:26


functionCallโ€‹

functionCall(methodName, args, gas, deposit, stringify?, jsContract?): Action

Constructs Action instance representing contract method call.

Parametersโ€‹

NameTypeDefault valueDescription
methodNamestringundefinedthe name of the method to call
argsobject | Uint8Arrayundefinedarguments 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.
gasBNundefinedmax amount of gas that method call can use
depositBNundefinedamount of NEAR (in yoctoNEAR) to send together with the call
stringify(args: any) => BufferstringifyJsonOrBytesConvert input arguments into bytes array.
jsContractbooleanfalseIs contract from JS SDK, skips stringification of arguments.

Returnsโ€‹

Action

Defined inโ€‹

transaction.ts:70


functionCallAccessKeyโ€‹

functionCallAccessKey(receiverId, methodNames, allowance?): AccessKey

Parametersโ€‹

NameType
receiverIdstring
methodNamesstring[]
allowance?BN

Returnsโ€‹

AccessKey

Defined inโ€‹

transaction.ts:30


signTransactionโ€‹

signTransaction(transaction, signer, accountId?, networkId?): Promise<[Uint8Array, SignedTransaction]>

Parametersโ€‹

NameType
transactionTransaction
signerSigner
accountId?string
networkId?string

Returnsโ€‹

Promise<[Uint8Array, SignedTransaction]>

Defined inโ€‹

transaction.ts:245

signTransaction(receiverId, nonce, actions, blockHash, signer, accountId?, networkId?): Promise<[Uint8Array, SignedTransaction]>

Parametersโ€‹

NameType
receiverIdstring
nonceBN
actionsAction[]
blockHashUint8Array
signerSigner
accountId?string
networkId?string

Returnsโ€‹

Promise<[Uint8Array, SignedTransaction]>

Defined inโ€‹

transaction.ts:246


stakeโ€‹

stake(stake, publicKey): Action

Parametersโ€‹

NameType
stakeBN
publicKeyPublicKey

Returnsโ€‹

Action

Defined inโ€‹

transaction.ts:81


stringifyJsonOrBytesโ€‹

stringifyJsonOrBytes(args): Buffer

Parametersโ€‹

NameType
argsany

Returnsโ€‹

Buffer

Defined inโ€‹

transaction.ts:53


transferโ€‹

transfer(deposit): Action

Parametersโ€‹

NameType
depositBN

Returnsโ€‹

Action

Defined inโ€‹

transaction.ts:77