Search
Preparing search index...
The search index is not available
ontology-ts-sdk
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
"sdk/index"
SDK
Class SDK
Hierarchy
SDK
Index
Properties
REST_
PORT
SERVER_
NODE
SOCKET_
PORT
rest
Client
socket
Client
Methods
adderss
From
Public
Key
claim
Ong
compound
Oep8
create
Account
create
Identity
create
Shared
Wallet
create
Wallet
decrypt
Encrypted
Private
Key
decrypt
Mnemonic
Enc
ecies
Decrypt
export
Account
ToKeystring
export
Account
ToQrcode
export
Identity
ToKeystring
export
Identity
ToQrcode
export
Wif
Privake
Key
get
Balance
get
Claim
get
Decrypt
Error
get
Neo
Balance
get
Unclaimed
Ong
import
Account
Mnemonic
import
Account
With
Keystore
import
Account
With
Private
Key
import
Account
With
Wallet
import
Account
With
Wif
import
Identity
And
Create
Wallet
import
Identity
With
Private
Key
import
Identity
With
Wallet
import
Identity
With
Wif
import
Identity
With
Wif
Off
Chain
make
Multi
Sign
Transaction
neo
Transfer
query
Oep4
Balance
query
Oep8
Balance
query
Oep8
Balances
query
Oep8
Total
Balance
query
Smart
Code
Event
ByTxhash
send
Transaction
send
Transaction
With
Websocket
set
Rest
Port
set
Server
Node
set
Socket
Port
sign
Data
sign
Multi
Addr
Transaction
sign
Self
Claim
transfer
Assets
transfer
Oep4
transfer
Oep8
transform
Password
Properties
Static
REST_
PORT
REST_
PORT
:
string
= HTTP_REST_PORT
Static
SERVER_
NODE
SERVER_
NODE
:
string
= TEST_NODE
Static
SOCKET_
PORT
SOCKET_
PORT
:
string
= HTTP_WS_PORT
Static
rest
Client
rest
Client
:
RestClient
= new RestClient()
Static
socket
Client
socket
Client
:
WebsocketClient
= new WebsocketClient()
Methods
Static
adderss
From
Public
Key
adderss
From
Public
Key
(
publicKey
:
string
, callback
?:
undefined
|
string
)
:
string
Parameters
publicKey:
string
Optional
callback:
undefined
|
string
Returns
string
Static
claim
Ong
claim
Ong
(
address
:
string
, value
:
string
, encryptedPrivateKey
:
string
, password
:
string
, salt
:
string
, gasPrice
:
string
, gasLimit
:
string
, payer
:
string
, callback
?:
undefined
|
string
)
:
object
Parameters
address:
string
value:
string
encryptedPrivateKey:
string
password:
string
salt:
string
gasPrice:
string
gasLimit:
string
payer:
string
Optional
callback:
undefined
|
string
Returns
object
error
:
ERROR_CODE
result
:
string
Static
compound
Oep8
compound
Oep8
(
contractHash
:
string
, account
:
string
, compoundNum
:
number
, encryptedPrivateKey
:
string
, password
:
string
, salt
:
string
, gasPrice
:
string
, gasLimit
:
string
, payer
:
string
, callback
:
string
)
:
object
Parameters
contractHash:
string
account:
string
compoundNum:
number
encryptedPrivateKey:
string
password:
string
salt:
string
gasPrice:
string
gasLimit:
string
payer:
string
callback:
string
Returns
object
error
:
ERROR_CODE
result
:
string
Static
create
Account
create
Account
(
label
:
string
, password
:
string
, callback
?:
undefined
|
string
)
:
object
Parameters
label:
string
password:
string
Optional
callback:
undefined
|
string
Returns
object
error
:
ERROR_CODE
mnemonic
Enc
:
string
result
:
string
Static
create
Identity
create
Identity
(
label
:
string
, password
:
string
, payer
:
string
, gasPrice
:
string
, gasLimit
:
string
, callback
?:
undefined
|
string
)
:
Promise
<
any
>
Parameters
label:
string
password:
string
payer:
string
gasPrice:
string
gasLimit:
string
Optional
callback:
undefined
|
string
Returns
Promise
<
any
>
Static
create
Shared
Wallet
create
Shared
Wallet
(
requiredSignatureNum
:
string
, allRelatedPks
:
string
, callback
?:
undefined
|
string
)
:
string
Parameters
requiredSignatureNum:
string
allRelatedPks:
string
Optional
callback:
undefined
|
string
Returns
string
Static
create
Wallet
create
Wallet
(
name
:
string
, password
:
string
, payer
:
string
, gasPrice
:
string
, gasLimit
:
string
, callback
?:
undefined
|
string
)
:
Promise
<
any
>
Parameters
name:
string
password:
string
payer:
string
gasPrice:
string
gasLimit:
string
Optional
callback:
undefined
|
string
Returns
Promise
<
any
>
Static
decrypt
Encrypted
Private
Key
decrypt
Encrypted
Private
Key
(
encryptedPrivateKey
:
string
, password
:
string
, address
:
string
, salt
:
string
, callback
?:
undefined
|
string
)
:
object
Parameters
encryptedPrivateKey:
string
password:
string
address:
string
salt:
string
Optional
callback:
undefined
|
string
Returns
object
error
:
number
result
:
string
Static
decrypt
Mnemonic
Enc
decrypt
Mnemonic
Enc
(
mnemonicEnc
:
string
, address
:
string
, salt
:
string
, password
:
string
, callback
?:
undefined
|
string
)
:
object
Parameters
mnemonicEnc:
string
address:
string
salt:
string
password:
string
Optional
callback:
undefined
|
string
Returns
object
error
:
ERROR_CODE
result
:
string
Static
ecies
Decrypt
ecies
Decrypt
(
encryptedPrivateKey
:
string
, password
:
string
, address
:
string
, salt
:
string
, cipher
:
string
, callback
?:
undefined
|
string
)
:
object
Parameters
encryptedPrivateKey:
string
password:
string
address:
string
salt:
string
cipher:
string
Optional
callback:
undefined
|
string
Returns
object
error
:
number
result
:
string
Static
export
Account
ToKeystring
export
Account
ToKeystring
(
accountDataStr
:
string
, callback
?:
undefined
|
string
)
:
string
Parameters
accountDataStr:
string
Optional
callback:
undefined
|
string
Returns
string
Static
export
Account
ToQrcode
export
Account
ToQrcode
(
accountDataStr
:
string
, callback
?:
undefined
|
string
)
:
object
Parameters
accountDataStr:
string
Optional
callback:
undefined
|
string
Returns
object
address
:
string
algorithm
:
string
key
:
string
label
:
string
salt
:
string
type
:
string
parameters
:
object
curve
:
string
scrypt
:
object
dk
Len
:
number
n
:
number
p
:
number
r
:
number
Static
export
Identity
ToKeystring
export
Identity
ToKeystring
(
identityDataStr
:
string
, callback
?:
undefined
|
string
)
:
string
Parameters
identityDataStr:
string
Optional
callback:
undefined
|
string
Returns
string
Static
export
Identity
ToQrcode
export
Identity
ToQrcode
(
identityDataStr
:
string
, callback
?:
undefined
|
string
)
:
object
Parameters
identityDataStr:
string
Optional
callback:
undefined
|
string
Returns
object
address
:
string
algorithm
:
string
key
:
string
label
:
string
salt
:
string
type
:
string
parameters
:
object
curve
:
string
scrypt
:
object
dk
Len
:
number
n
:
number
p
:
number
r
:
number
Static
export
Wif
Privake
Key
export
Wif
Privake
Key
(
encryptedKey
:
string
, password
:
string
, address
:
string
, salt
:
string
, callback
?:
undefined
|
string
)
:
object
|
object
Parameters
encryptedKey:
string
password:
string
address:
string
salt:
string
Optional
callback:
undefined
|
string
Returns
object
|
object
Static
get
Balance
get
Balance
(
address
:
string
, callback
?:
undefined
|
string
)
:
Promise
<
object
|
object
>
Parameters
address:
string
Optional
callback:
undefined
|
string
Returns
Promise
<
object
|
object
>
Static
get
Claim
get
Claim
(
claimId
:
string
, context
:
string
, issuer
:
string
, subject
:
string
, encryptedPrivateKey
:
string
, password
:
string
, address
:
string
, salt
:
string
, payer
:
string
, gasPrice
:
string
, gasLimit
:
string
, callback
?:
undefined
|
string
)
:
object
|
Promise
<
void
|
object
>
Parameters
claimId:
string
context:
string
issuer:
string
subject:
string
encryptedPrivateKey:
string
password:
string
address:
string
salt:
string
payer:
string
gasPrice:
string
gasLimit:
string
Optional
callback:
undefined
|
string
Returns
object
|
Promise
<
void
|
object
>
Static
get
Decrypt
Error
get
Decrypt
Error
(
err
:
any
)
:
object
Parameters
err:
any
Returns
object
error
:
ERROR_CODE
result
:
string
Static
get
Neo
Balance
get
Neo
Balance
(
address
:
string
, callback
?:
undefined
|
string
)
:
Promise
<
object
>
Parameters
address:
string
Optional
callback:
undefined
|
string
Returns
Promise
<
object
>
Static
get
Unclaimed
Ong
get
Unclaimed
Ong
(
address
:
string
, callback
?:
undefined
|
string
)
:
Promise
<
object
|
object
>
Parameters
address:
string
Optional
callback:
undefined
|
string
Returns
Promise
<
object
|
object
>
Static
import
Account
Mnemonic
import
Account
Mnemonic
(
label
:
string
, mnemonic
:
string
, password
:
string
, callback
?:
undefined
|
string
)
:
object
Parameters
label:
string
mnemonic:
string
password:
string
Optional
callback:
undefined
|
string
Returns
object
error
:
ERROR_CODE
result
:
string
Static
import
Account
With
Keystore
import
Account
With
Keystore
(
keystore
:
string
, password
:
string
, callback
?:
undefined
|
string
)
:
object
Actually import with Qrcode
Parameters
keystore:
string
password:
string
Optional
callback:
undefined
|
string
Returns
object
error
:
ERROR_CODE
result
:
string
Static
import
Account
With
Private
Key
import
Account
With
Private
Key
(
label
:
string
, privateKey
:
string
, password
:
string
, callback
?:
undefined
|
string
)
:
object
Parameters
label:
string
privateKey:
string
password:
string
Optional
callback:
undefined
|
string
Returns
object
error
:
ERROR_CODE
result
:
string
Static
import
Account
With
Wallet
import
Account
With
Wallet
(
label
:
string
, encryptedPrivateKey
:
string
, address
:
string
, salt
:
string
, password
:
string
, callback
?:
undefined
|
string
)
:
object
Parameters
label:
string
encryptedPrivateKey:
string
address:
string
salt:
string
password:
string
Optional
callback:
undefined
|
string
Returns
object
error
:
ERROR_CODE
result
:
string
Static
import
Account
With
Wif
import
Account
With
Wif
(
label
:
string
, wif
:
string
, password
:
string
, callback
?:
undefined
|
string
)
:
object
Parameters
label:
string
wif:
string
password:
string
Optional
callback:
undefined
|
string
Returns
object
error
:
ERROR_CODE
result
:
string
Static
import
Identity
And
Create
Wallet
import
Identity
And
Create
Wallet
(
label
:
string
, encryptedPrivateKey
:
string
, password
:
string
, address
:
string
, salt
:
string
, callback
?:
undefined
|
string
)
:
Promise
<
any
>
Parameters
label:
string
encryptedPrivateKey:
string
password:
string
address:
string
salt:
string
Optional
callback:
undefined
|
string
Returns
Promise
<
any
>
Static
import
Identity
With
Private
Key
import
Identity
With
Private
Key
(
label
?:
string
, privateKey
:
string
, password
:
string
, callback
?:
undefined
|
string
)
:
Promise
<
any
>
|
object
Parameters
Default value
label:
string
= ""
privateKey:
string
password:
string
Optional
callback:
undefined
|
string
Returns
Promise
<
any
>
|
object
Static
import
Identity
With
Wallet
import
Identity
With
Wallet
(
label
:
string
, encryptedPrivateKey
:
string
, password
:
string
, address
:
string
, salt
:
string
, callback
?:
undefined
|
string
)
:
any
Parameters
label:
string
encryptedPrivateKey:
string
password:
string
address:
string
salt:
string
Optional
callback:
undefined
|
string
Returns
any
Static
import
Identity
With
Wif
import
Identity
With
Wif
(
label
?:
string
, wif
:
string
, password
:
string
, callback
?:
undefined
|
string
)
:
Promise
<
any
>
|
object
Parameters
Default value
label:
string
= ""
wif:
string
password:
string
Optional
callback:
undefined
|
string
Returns
Promise
<
any
>
|
object
Static
import
Identity
With
Wif
Off
Chain
import
Identity
With
Wif
Off
Chain
(
label
?:
string
, wif
:
string
, password
:
string
, callback
?:
undefined
|
string
)
:
any
Parameters
Default value
label:
string
= ""
wif:
string
password:
string
Optional
callback:
undefined
|
string
Returns
any
Static
make
Multi
Sign
Transaction
make
Multi
Sign
Transaction
(
asset
:
string
, from
:
string
, to
:
string
, amount
:
string
, gasPrice
:
string
, gasLimit
:
string
, callback
?:
undefined
|
string
)
:
object
|
object
Parameters
asset:
string
from:
string
to:
string
amount:
string
gasPrice:
string
gasLimit:
string
Optional
callback:
undefined
|
string
Returns
object
|
object
Static
neo
Transfer
neo
Transfer
(
from
:
string
, to
:
string
, value
:
string
, encryptedPrivateKey
:
string
, password
:
string
, salt
:
string
, callback
?:
undefined
|
string
, params
?:
ScryptParams
)
:
object
|
Promise
<
object
>
Neo transfer
Parameters
from:
string
to:
string
value:
string
encryptedPrivateKey:
string
password:
string
salt:
string
Optional
callback:
undefined
|
string
Optional
params:
ScryptParams
Returns
object
|
Promise
<
object
>
Static
query
Oep4
Balance
query
Oep4
Balance
(
contractHash
:
string
, account
:
string
, callback
?:
undefined
|
string
)
:
Promise
<
object
>
Parameters
contractHash:
string
account:
string
Optional
callback:
undefined
|
string
Returns
Promise
<
object
>
Static
query
Oep8
Balance
query
Oep8
Balance
(
contractHash
:
string
, account
:
string
, tokenId
:
number
, callback
?:
undefined
|
string
)
:
Promise
<
object
>
Parameters
contractHash:
string
account:
string
tokenId:
number
Optional
callback:
undefined
|
string
Returns
Promise
<
object
>
Static
query
Oep8
Balances
query
Oep8
Balances
(
contractHash
:
string
, account
:
string
, callback
?:
undefined
|
string
)
:
Promise
<
object
>
Parameters
contractHash:
string
account:
string
Optional
callback:
undefined
|
string
Returns
Promise
<
object
>
Static
query
Oep8
Total
Balance
query
Oep8
Total
Balance
(
contractHash
:
string
, account
:
string
, callback
?:
undefined
|
string
)
:
Promise
<
object
>
Parameters
contractHash:
string
account:
string
Optional
callback:
undefined
|
string
Returns
Promise
<
object
>
Static
query
Smart
Code
Event
ByTxhash
query
Smart
Code
Event
ByTxhash
(
txHash
:
string
, callback
?:
undefined
|
string
)
:
Promise
<
object
|
object
>
Parameters
txHash:
string
Optional
callback:
undefined
|
string
Returns
Promise
<
object
|
object
>
Static
send
Transaction
send
Transaction
(
txData
:
string
, callback
?:
undefined
|
string
)
:
Promise
<
object
|
object
>
Parameters
txData:
string
Optional
callback:
undefined
|
string
Returns
Promise
<
object
|
object
>
Static
send
Transaction
With
Websocket
send
Transaction
With
Websocket
(
txData
:
string
, callback
?:
undefined
|
string
)
:
Promise
<
object
|
object
>
Parameters
txData:
string
Optional
callback:
undefined
|
string
Returns
Promise
<
object
|
object
>
Static
set
Rest
Port
set
Rest
Port
(
port
:
string
)
:
void
Parameters
port:
string
Returns
void
Static
set
Server
Node
set
Server
Node
(
node
:
string
)
:
void
Parameters
node:
string
Returns
void
Static
set
Socket
Port
set
Socket
Port
(
port
:
string
)
:
void
Parameters
port:
string
Returns
void
Static
sign
Data
sign
Data
(
content
:
string
, encryptedPrivateKey
:
string
, password
:
string
, address
:
string
, salt
:
string
, callback
?:
undefined
|
string
)
:
PgpSignature
|
any
Parameters
content:
string
encryptedPrivateKey:
string
password:
string
address:
string
salt:
string
Optional
callback:
undefined
|
string
Returns
PgpSignature
|
any
Static
sign
Multi
Addr
Transaction
sign
Multi
Addr
Transaction
(
encryptedPrivateKey
:
string
, address
:
string
, salt
:
string
, password
:
string
, allRelatedPks
:
string
, requiredSignatureNum
:
string
, txDada
:
string
, callback
?:
undefined
|
string
)
:
Transaction
|
object
Parameters
encryptedPrivateKey:
string
address:
string
salt:
string
password:
string
allRelatedPks:
string
requiredSignatureNum:
string
txDada:
string
Optional
callback:
undefined
|
string
Returns
Transaction
|
object
Static
sign
Self
Claim
sign
Self
Claim
(
context
:
string
, claimData
:
string
, ontid
:
string
, encryptedPrivateKey
:
string
, password
:
string
, address
:
string
, salt
:
string
, callback
?:
undefined
|
string
)
:
object
|
object
Parameters
context:
string
claimData:
string
ontid:
string
encryptedPrivateKey:
string
password:
string
address:
string
salt:
string
Optional
callback:
undefined
|
string
Returns
object
|
object
Static
transfer
Assets
transfer
Assets
(
token
:
string
, from
:
string
, to
:
string
, value
:
string
, encryptedPrivateKey
:
string
, password
:
string
, salt
:
string
, gasPrice
:
string
, gasLimit
:
string
, payer
:
string
, callback
?:
undefined
|
string
)
:
object
Parameters
token:
string
from:
string
to:
string
value:
string
encryptedPrivateKey:
string
password:
string
salt:
string
gasPrice:
string
gasLimit:
string
payer:
string
Optional
callback:
undefined
|
string
Returns
object
error
:
ERROR_CODE
result
:
string
Static
transfer
Oep4
transfer
Oep4
(
contractHash
:
string
, from
:
string
, to
:
string
, value
:
string
, encryptedPrivateKey
:
string
, password
:
string
, salt
:
string
, gasPrice
:
string
, gasLimit
:
string
, callback
?:
undefined
|
string
)
:
object
Parameters
contractHash:
string
from:
string
to:
string
value:
string
encryptedPrivateKey:
string
password:
string
salt:
string
gasPrice:
string
gasLimit:
string
Optional
callback:
undefined
|
string
Returns
object
error
:
ERROR_CODE
result
:
string
Static
transfer
Oep8
transfer
Oep8
(
contractHash
:
string
, from
:
string
, to
:
string
, value
:
string
, tokenId
:
number
, encryptedPrivateKey
:
string
, password
:
string
, salt
:
string
, gasPrice
:
string
, gasLimit
:
string
, payer
:
string
, callback
?:
undefined
|
string
)
:
object
Parameters
contractHash:
string
from:
string
to:
string
value:
string
tokenId:
number
encryptedPrivateKey:
string
password:
string
salt:
string
gasPrice:
string
gasLimit:
string
payer:
string
Optional
callback:
undefined
|
string
Returns
object
error
:
ERROR_CODE
result
:
string
Static
transform
Password
transform
Password
(
password
:
string
)
:
string
Parameters
password:
string
Returns
string
Globals
"sdk/index"
SDK
REST_
PORT
SERVER_
NODE
SOCKET_
PORT
rest
Client
socket
Client
adderss
From
Public
Key
claim
Ong
compound
Oep8
create
Account
create
Identity
create
Shared
Wallet
create
Wallet
decrypt
Encrypted
Private
Key
decrypt
Mnemonic
Enc
ecies
Decrypt
export
Account
ToKeystring
export
Account
ToQrcode
export
Identity
ToKeystring
export
Identity
ToQrcode
export
Wif
Privake
Key
get
Balance
get
Claim
get
Decrypt
Error
get
Neo
Balance
get
Unclaimed
Ong
import
Account
Mnemonic
import
Account
With
Keystore
import
Account
With
Private
Key
import
Account
With
Wallet
import
Account
With
Wif
import
Identity
And
Create
Wallet
import
Identity
With
Private
Key
import
Identity
With
Wallet
import
Identity
With
Wif
import
Identity
With
Wif
Off
Chain
make
Multi
Sign
Transaction
neo
Transfer
query
Oep4
Balance
query
Oep8
Balance
query
Oep8
Balances
query
Oep8
Total
Balance
query
Smart
Code
Event
ByTxhash
send
Transaction
send
Transaction
With
Websocket
set
Rest
Port
set
Server
Node
set
Socket
Port
sign
Data
sign
Multi
Addr
Transaction
sign
Self
Claim
transfer
Assets
transfer
Oep4
transfer
Oep8
transform
Password
CONTRACT_
HASH
HDKey
NEO_
NODE
NEO_
TRAN
NEP5_
ABI
Generated using
TypeDoc
Actually import with Qrcode