Search
Preparing search index...
The search index is not available
Xuper SDK (JS/TS)
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
XuperSDK
Class XuperSDK
Hierarchy
XuperSDK
Implements
XuperSDKInterface
Index
Constructors
constructor
Properties
account
account
Instance
contract
Instance
options
plugins
transaction
Instance
instance
Methods
check
Address
check
Mnemonic
check
Status
create
create
Contract
Account
deploy
Solidity
Contract
deploy
Wasm
Contract
export
get
Balance
get
Balance
Detail
get
Block
ByHeight
get
Block
ById
get
Block
Chains
get
Contract
Accounts
get
Contracts
import
invoke
invoke
Contarct
invoke
Solidity
Contarct
post
Transaction
queryACL
query
Contract
Stat
Data
query
Transaction
retrieve
transaction
IdTo
Hex
transfer
get
Instance
Constructors
constructor
new
XuperSDK
(
opts
:
Options
)
:
XuperSDK
Parameters
opts:
Options
Returns
XuperSDK
Properties
Private
Optional
account
account
:
AccountModel
Private
account
Instance
account
Instance
:
Account
Private
contract
Instance
contract
Instance
:
Contract
Private
options
options
:
Options
Private
plugins
plugins
:
Plugin
[]
Private
transaction
Instance
transaction
Instance
:
Transaction
Static
instance
instance
:
XuperSDK
Methods
check
Address
check
Address
(
address
?:
undefined
|
string
)
:
boolean
Parameters
Optional
address:
undefined
|
string
Returns
boolean
check
Mnemonic
check
Mnemonic
(
mnemonic
:
string
, language
:
Language
)
:
boolean
Parameters
mnemonic:
string
language:
Language
Returns
boolean
check
Status
check
Status
(
)
:
Promise
<
any
>
Returns
Promise
<
any
>
create
create
(
language
?:
Language
, strength
?:
Strength
, cryptography
?:
Cryptography
)
:
AccountModel
Parameters
Default value
language:
Language
= Language.SimplifiedChinese
Default value
strength:
Strength
= Strength.Easy
Default value
cryptography:
Cryptography
= Cryptography.EccFIPS
Returns
AccountModel
create
Contract
Account
create
Contract
Account
(
contractAccountName
:
number
, address
?:
undefined
|
string
)
:
Promise
<
any
>
Parameters
contractAccountName:
number
Optional
address:
undefined
|
string
Returns
Promise
<
any
>
deploy
Solidity
Contract
deploy
Solidity
Contract
(
contractAccount
:
string
, contractName
:
string
, bin
:
string
, abi
:
string
, lang
:
string
, initArgs
:
any
, upgrade
?:
boolean
, account
?:
AccountModel
)
:
Promise
<
any
>
Parameters
contractAccount:
string
contractName:
string
bin:
string
abi:
string
lang:
string
initArgs:
any
Default value
upgrade:
boolean
= false
Optional
account:
AccountModel
Returns
Promise
<
any
>
deploy
Wasm
Contract
deploy
Wasm
Contract
(
contractAccount
:
string
, contractName
:
string
, code
:
string
, lang
:
string
, initArgs
:
any
, upgrade
?:
boolean
, account
?:
AccountModel
)
:
Promise
<
any
>
Parameters
contractAccount:
string
contractName:
string
code:
string
lang:
string
initArgs:
any
Default value
upgrade:
boolean
= false
Optional
account:
AccountModel
Returns
Promise
<
any
>
export
export
(
password
:
string
)
:
string
Parameters
password:
string
Returns
string
get
Balance
get
Balance
(
address
?:
undefined
|
string
)
:
Promise
<
any
>
Parameters
Optional
address:
undefined
|
string
Returns
Promise
<
any
>
get
Balance
Detail
get
Balance
Detail
(
address
?:
undefined
|
string
)
:
Promise
<
any
>
Parameters
Optional
address:
undefined
|
string
Returns
Promise
<
any
>
get
Block
ByHeight
get
Block
ByHeight
(
height
:
string
)
:
Promise
<
any
>
Parameters
height:
string
Returns
Promise
<
any
>
get
Block
ById
get
Block
ById
(
blockid
:
string
)
:
Promise
<
any
>
Parameters
blockid:
string
Returns
Promise
<
any
>
get
Block
Chains
get
Block
Chains
(
)
:
Promise
<
any
>
Returns
Promise
<
any
>
get
Contract
Accounts
get
Contract
Accounts
(
address
?:
undefined
|
string
)
:
Promise
<
any
>
Parameters
Optional
address:
undefined
|
string
Returns
Promise
<
any
>
get
Contracts
get
Contracts
(
target
:
string
)
:
Promise
<
any
>
Parameters
target:
string
Returns
Promise
<
any
>
import
import
(
password
:
string
, privateKeyStr
:
string
, cache
?:
boolean
)
:
AccountModel
Parameters
password:
string
privateKeyStr:
string
Default value
cache:
boolean
= false
Returns
AccountModel
invoke
invoke
(
invokeRequests
:
ContractRequesttModel
[]
, amount
?:
string
, account
?:
AccountModel
)
:
Promise
<
any
>
Parameters
invokeRequests:
ContractRequesttModel
[]
Default value
amount:
string
= "0"
Optional
account:
AccountModel
Returns
Promise
<
any
>
invoke
Contarct
invoke
Contarct
(
contractName
:
string
, methodName
:
string
, moduleName
:
string
, args
:
any
, amount
?:
string
, account
?:
AccountModel
)
:
Promise
<
any
>
Parameters
contractName:
string
methodName:
string
moduleName:
string
args:
any
Default value
amount:
string
= "0"
Optional
account:
AccountModel
Returns
Promise
<
any
>
invoke
Solidity
Contarct
invoke
Solidity
Contarct
(
contractName
:
string
, methodName
:
string
, moduleName
:
string
, args
:
any
, amount
?:
string
, account
?:
AccountModel
)
:
Promise
<
any
>
Parameters
contractName:
string
methodName:
string
moduleName:
string
args:
any
Default value
amount:
string
= "0"
Optional
account:
AccountModel
Returns
Promise
<
any
>
post
Transaction
post
Transaction
(
tx
:
TransactionModel
, account
?:
AccountModel
)
:
Promise
<
any
>
Parameters
tx:
TransactionModel
Optional
account:
AccountModel
Returns
Promise
<
any
>
queryACL
queryACL
(
contractAccount
:
string
, contractInfo
?:
ContractInfo
)
:
Promise
<
any
>
Parameters
contractAccount:
string
Optional
contractInfo:
ContractInfo
Returns
Promise
<
any
>
query
Contract
Stat
Data
query
Contract
Stat
Data
(
)
:
Promise
<
any
>
Returns
Promise
<
any
>
query
Transaction
query
Transaction
(
txid
:
string
)
:
Promise
<
any
>
Parameters
txid:
string
Returns
Promise
<
any
>
retrieve
retrieve
(
mnemonic
:
string
, language
?:
Language
, cryptography
?:
Cryptography
, cache
?:
boolean
)
:
AccountModel
Parameters
mnemonic:
string
Default value
language:
Language
= Language.SimplifiedChinese
Default value
cryptography:
Cryptography
= Cryptography.EccFIPS
Default value
cache:
boolean
= false
Returns
AccountModel
transaction
IdTo
Hex
transaction
IdTo
Hex
(
t
:
Required
<
string
>
)
:
string
Parameters
t:
Required
<
string
>
Returns
string
transfer
transfer
(
ti
:
TransactionInfomationModel
, account
?:
AccountModel
)
:
Promise
<
TransactionModel
>
Parameters
ti:
TransactionInfomationModel
Optional
account:
AccountModel
Returns
Promise
<
TransactionModel
>
Static
get
Instance
get
Instance
(
opts
:
Options
)
:
XuperSDK
Parameters
opts:
Options
Returns
XuperSDK
Globals
XuperSDK
constructor
account
account
Instance
contract
Instance
options
plugins
transaction
Instance
instance
check
Address
check
Mnemonic
check
Status
create
create
Contract
Account
deploy
Solidity
Contract
deploy
Wasm
Contract
export
get
Balance
get
Balance
Detail
get
Block
ByHeight
get
Block
ById
get
Block
Chains
get
Contract
Accounts
get
Contracts
import
invoke
invoke
Contarct
invoke
Solidity
Contarct
post
Transaction
queryACL
query
Contract
Stat
Data
query
Transaction
retrieve
transaction
IdTo
Hex
transfer
get
Instance