Methods
Static addBooker
-
Parameters
-
dappId: string
-
key: string
Static addMemberToCouncil
- addMemberToCouncil(address: string, weight: string, m: number): Transaction
-
Parameters
-
address: string
-
weight: string
-
m: number
Static buildTransaction
- buildTransaction(type: number, args: Array<any>, message?: string, options?: object): Transaction
-
Parameters
-
type: number
-
args: Array<any>
-
Default value message: string = ""
-
Default value options: object = {}
Static callContract
- callContract(contractName: string, methodName: string, methodArgs: Array<any>, gasLimit?: number, enablePayGasInXAS?: boolean): Transaction
-
Parameters
-
contractName: string
-
methodName: string
-
methodArgs: Array<any>
-
Default value gasLimit: number = 100000
-
Default value enablePayGasInXAS: boolean = true
Static convertSecondPwd
- convertSecondPwd(pwd: string): string
-
Parameters
Returns string
Static createProposal
- createProposal(title: string, desc: string, topic: string, content: string, endHeight: number): Transaction
-
Parameters
-
title: string
-
desc: string
-
topic: string
-
content: string
-
endHeight: number
Static deleteBooker
-
Parameters
-
dappId: string
-
key: string
Static depositDapp
- depositDapp(dappId: string, currency: string, amount: string): Transaction
-
Parameters
-
dappId: string
-
currency: string
-
amount: string
Static depositGateway
- depositGateway(gateway: string, address: string, currency: string, amount: string, oid: string): Transaction
-
Parameters
-
gateway: string
-
address: string
-
currency: string
-
amount: string
-
oid: string
Static issueAsset
- issueAsset(symbol: string, amount: string): Transaction
-
Parameters
-
symbol: string
-
amount: string
Static openGatewayAccount
Static payContract
- payContract(currency: string, amount: number | string, extraArgs: Array<any>, nameOrAddress?: undefined | string, methodName?: undefined | string, gasLimit?: number, enablePayGasInXAS?: boolean): Transaction
-
Parameters
-
currency: string
-
amount: number | string
-
extraArgs: Array<any>
-
Optional nameOrAddress: undefined | string
-
Optional methodName: undefined | string
-
Default value gasLimit: number = 100000
-
Default value enablePayGasInXAS: boolean = true
Static pledge
- pledge(bandwidth: string | number, cpu: string | number): Transaction
-
Parameters
-
bandwidth: string | number
-
cpu: string | number
Static registerAsset
- registerAsset(symbol: string, desc: string, maximum: number, precision: number): Transaction
-
Parameters
-
symbol: string
-
desc: string
-
maximum: number
-
precision: number
Static registerContract
- registerContract(name: string, version: string, desc: string, code: string, consumeOwnerEnergy?: boolean, gasLimit?: number): Transaction
-
Parameters
-
name: string
-
version: string
-
desc: string
-
code: string
-
Default value consumeOwnerEnergy: boolean = true
-
Default value gasLimit: number = 1000000
Static registerDapp
- registerDapp(name: string, desc: string, link: string, icon: string, delegates: number, nlockNumber: number): Transaction
-
Parameters
-
name: string
-
desc: string
-
link: string
-
icon: string
-
delegates: number
-
nlockNumber: number
Static registerGateway
- registerGateway(gateway: string, publicKey: string, desc: string): Transaction
-
Parameters
-
gateway: string
-
publicKey: string
-
desc: string
Static registerIssuer
- registerIssuer(name: string, desc: string): Transaction
-
Parameters
-
name: string
-
desc: string
Static removeMemberFromCouncil
- removeMemberFromCouncil(address: string, m: number): Transaction
-
Parameters
-
address: string
-
m: number
Static replaceMemberFromCouncil
- replaceMemberFromCouncil(from: string, to: string, weight: string, m: number): Transaction
-
Parameters
-
from: string
-
to: string
-
weight: string
-
m: number
Static setCouncil
- setCouncil(name: string, members: Array<any>, min: number, max: number, m: number, updateInterval: number): Transaction
-
Parameters
-
name: string
-
members: Array<any>
-
min: number
-
max: number
-
m: number
-
updateInterval: number
Static setLock
-
Parameters
-
height: number
-
amount: number
Static transferAsset
- transferAsset(symbol: string, amount: string, recipientId: string, message: string): Transaction
-
Parameters
-
symbol: string
-
amount: string
-
recipientId: string
-
message: string
Static transferXAS
- transferXAS(amount: number | string, to: string, message: string): Transaction
-
Parameters
-
amount: number | string
-
to: string
-
message: string
Static unPledge
- unPledge(bandwidth: string | number, cpu: string | number): Transaction
-
Parameters
-
bandwidth: string | number
-
cpu: string | number
Static updateBooker
- updateBooker(dappId: string, from: string, to: string): Transaction
-
Parameters
-
dappId: string
-
from: string
-
to: string
Static withdrawDapp
- withdrawDapp(dappId: string, recipient: string, currency: string, amount: string, oid: string, signatures: string): Transaction
-
Parameters
-
dappId: string
-
recipient: string
-
currency: string
-
amount: string
-
oid: string
-
signatures: string
Static withdrawGateway
- withdrawGateway(address: string, gateway: string, currency: string, amount: number, fee: number): Transaction
-
Parameters
-
address: string
-
gateway: string
-
currency: string
-
amount: number
-
fee: number
TransactionBuilder 创建未签名交易