## Index

### Functions

- addSign
- buildRestfulParam
- buildRpcParam
- buildTxParam
- makeDeployCodeTransaction
- makeInvokeTransaction
- makeNativeContractTx
- sendRawTxRestfulUrl
- signTransaction
- signTransactionAsync
- signTx

### Object literals

- Default_params

## Functions

### Const addSign

- addSign(tx: Transaction, privateKey: PrivateKey, schema?: SignatureScheme): void

- - Defined in transaction/transactionBuilder.ts:90

  Signs the transaction object.

  If there is already a signature, the new one will be added to the end. If the signature schema is not provided, default schema for Private key type is used.

  #### Parameters

  - ##### tx: Transaction

    Transaction to sign

  - ##### privateKey: PrivateKey

    Private key to sign with

  - ##### Optional schema: SignatureScheme

    Signature Schema to use

  #### Returns void

### buildRestfulParam

- buildRestfulParam(tx: Transaction): object

- - Defined in transaction/transactionBuilder.ts:310
  deprecated

    Creates params from transaction to send with restful

  #### Parameters

  - ##### tx: Transaction

    Transaction

  #### Returns object

  - ##### Action: string

  - ##### Data: string

  - ##### Version: string

### buildRpcParam

- buildRpcParam(tx: Transaction, method?: undefined | string): object

- - Defined in transaction/transactionBuilder.ts:294
  deprecated

    Creates params from transaction to send with rpc

  #### Parameters

  - ##### tx: Transaction

    Transaction

  - ##### Optional method: undefined | string

    Method name

  #### Returns object

  - ##### id: number

  - ##### jsonrpc: string

  - ##### method: string

  - ##### params: string[]

### buildTxParam

- buildTxParam(tx: Transaction, isPreExec?: boolean): string

- - Defined in transaction/transactionBuilder.ts:281
  deprecated

    Creates params from transaction to send with websocket

  #### Parameters

  - ##### tx: Transaction

    Transactio to send

  - ##### Default value isPreExec: boolean = false

    Decides if it is pre-execute transaction

  #### Returns string

### makeDeployCodeTransaction

- makeDeployCodeTransaction(code: string, name?: string, codeVersion?: string, author?: string, email?: string, desp?: string, needStorage?: boolean, gasPrice: string, gasLimit: string, payer?: Address): Transaction

- - Defined in transaction/transactionBuilder.ts:232

  Creates transaction to deploy smart contract

  #### Parameters

  - ##### code: string

    Avm code of contract to deploy

  - ##### Default value name: string = ""

    Name of contract

  - ##### Default value codeVersion: string = "1.0"

    version of contract

  - ##### Default value author: string = ""

    Author of contract

  - ##### Default value email: string = ""

    Email of author

  - ##### Default value desp: string = ""

    Description of contract

  - ##### Default value needStorage: boolean = true

    Decides if the contract needs storage

  - ##### gasPrice: string

    Gas price

  - ##### gasLimit: string

    Gas limit

  - ##### Optional payer: Address

    Address to pay for gas

  #### Returns Transaction

### Const makeInvokeTransaction

- makeInvokeTransaction(funcName: string, params: Parameter[], contractAddr: Address, gasPrice?: undefined | string, gasLimit?: undefined | string, payer?: Address): Transaction

- - Defined in transaction/transactionBuilder.ts:187

  Creates transaction to inovke smart contract

  #### Parameters

  - ##### funcName: string

    Function name of smart contract

  - ##### params: Parameter[]

    Array of Parameters

  - ##### contractAddr: Address

    Address of contract

  - ##### Optional gasPrice: undefined | string

    Gas price

  - ##### Optional gasLimit: undefined | string

    Gas limit

  - ##### Optional payer: Address

    Address to pay for gas

  #### Returns Transaction

### makeNativeContractTx

- makeNativeContractTx(funcName: string, params: string, contractAddr: Address, gasPrice?: undefined | string, gasLimit?: undefined | string, payer?: Address): Transaction

- - Defined in transaction/transactionBuilder.ts:146

  Creates transaction to invoke native contract

  #### Parameters

  - ##### funcName: string

    Function name of contract to call

  - ##### params: string

    Parameters serialized in hex string

  - ##### contractAddr: Address

    Adderss of contract

  - ##### Optional gasPrice: undefined | string

    Gas price

  - ##### Optional gasLimit: undefined | string

    Gas limit

  - ##### Optional payer: Address

    Address to pay for transaction gas

  #### Returns Transaction

### sendRawTxRestfulUrl

- sendRawTxRestfulUrl(url: string, preExec?: boolean): string

- - Defined in transaction/transactionBuilder.ts:324
  deprecated

  #### Parameters

  - ##### url: string

    Url of blochchain node

  - ##### Default value preExec: boolean = false

    Decides if is a pre-execute request

  #### Returns string

### Const signTransaction

- signTransaction(tx: Transaction, privateKey: PrivateKey, schema?: SignatureScheme): void

- - Defined in transaction/transactionBuilder.ts:54

  Signs the transaction object.

  If there is already a signature, the new one will replace existing. If the signature schema is not provided, default schema for Private key type is used.

  #### Parameters

  - ##### tx: Transaction

    Transaction to sign

  - ##### privateKey: PrivateKey

    Private key to sign with

  - ##### Optional schema: SignatureScheme

    Signature Schema to use

  #### Returns void

### Const signTransactionAsync

- signTransactionAsync(tx: Transaction, privateKey: PrivateKey, schema?: SignatureScheme): Promise<void>

- - Defined in transaction/transactionBuilder.ts:72

  Signs the transaction object asynchroniously.

  If there is already a signature, the new one will replace existing. If the signature schema is not provided, default schema for Private key type is used.

  #### Parameters

  - ##### tx: Transaction

    Transaction to sign

  - ##### privateKey: PrivateKey

    Private key to sign with

  - ##### Optional schema: SignatureScheme

    Signature Schema to use

  #### Returns Promise<void>

### Const signTx

- signTx(tx: Transaction, M: number, pubKeys: PublicKey[], privateKey: PrivateKey, scheme?: SignatureScheme): void

- - Defined in transaction/transactionBuilder.ts:109

  Signs the transaction with multiple signatures with multi-sign keys.

  If there is already a signature, the new ones will be added to the end. If the signature schema is not provided, default schema for Private key type is used.

  #### Parameters

  - ##### tx: Transaction

    Transaction to sign

  - ##### M: number

    m of the (m ,n) multi sign address threshold

  - ##### pubKeys: PublicKey[]

    Array of Public keys of (m,n) multi sign address, the number is n

  - ##### privateKey: PrivateKey

    Private key to sign the tx.

  - ##### Optional scheme: SignatureScheme

    Signature scheme to use

  #### Returns void

## Object literals

### Const Default_params

Default_params: object

- Defined in transaction/transactionBuilder.ts:37

### Action

Action: string = "sendrawtransaction"

- Defined in transaction/transactionBuilder.ts:38

### Op

Op: string = "test"

- Defined in transaction/transactionBuilder.ts:41

### Type

Type: string = ""

- Defined in transaction/transactionBuilder.ts:40

### Version

Version: string = "1.0.0"

- Defined in transaction/transactionBuilder.ts:39

Generated using TypeDoc