@coinweb/wallet-lib
Enumerations
- EmbedStatus
- ExchangeForCwebQuery
- ExchangeForTokenQuery
- ExchangeViaCwebQuery
- FailedCommand
- GeneralQuery
- NetworkName
- Sign
- TokenCommandName
- TokenQuery
- TrackError
- TransactionStatus
- UserQuery
Classes
Type Aliases
AddLiquidityPoolLiquidity
Ƭ AddLiquidityPoolLiquidity: Object
Type declaration
Name | Type |
---|---|
liquidity_pool | LiquidityPoolId |
token_a_amount | TokenAmount |
Defined in
wallet_lib.d.ts:390
BlockAnchor
Ƭ BlockAnchor: Object
Type declaration
Name | Type |
---|---|
hash | string | null |
height | BigInt |
Defined in
wallet_lib.d.ts:128
BlockAnchorInput
Ƭ BlockAnchorInput: Object
Type declaration
Name | Type |
---|---|
hash | string | null |
height | BigInt |
Defined in
wallet_lib.d.ts:126
BlockAwaiter
Ƭ BlockAwaiter: unknown
Defined in
wallet_lib.d.ts:86
BlockHash
Ƭ BlockHash: string
Defined in
wallet_lib.d.ts:61
BondingCurveInfo
Ƭ BondingCurveInfo: Object
Type declaration
Name | Type |
---|---|
is_frozen | boolean |
is_naked_tokens_allowed | boolean |
Defined in
wallet_lib.d.ts:500
BuyForToken
Ƭ BuyForToken: Object
Type declaration
Name | Type |
---|---|
limit_token_a_amount | TokenAmount |
token_a | TokenHashId |
token_b | TokenHashId |
token_b_amount | TokenAmount |
Defined in
wallet_lib.d.ts:361
BuyToken
Ƭ BuyToken: Object
Type declaration
Name | Type |
---|---|
limit_cweb_amount | CwebToken |
token | TokenHashId |
token_amount | TokenAmount |
Defined in
wallet_lib.d.ts:349
BuyViaCweb
Ƭ BuyViaCweb: Object
Type declaration
Name | Type |
---|---|
cweb_amount | CwebToken |
limit_token_amount | TokenAmount |
token | TokenHashId |
Defined in
wallet_lib.d.ts:355
ClaimHash
Ƭ ClaimHash: string
Defined in
wallet_lib.d.ts:66
ComputationBlockRef
Ƭ ComputationBlockRef: string
Defined in
wallet_lib.d.ts:67
ContractCall
Ƭ ContractCall: Value
Defined in
wallet_lib.d.ts:429
ContractId
Ƭ ContractId: SmartContractRef
|
ClaimHash
Defined in
wallet_lib.d.ts:606
CreateCwebLiquidityPool
Ƭ CreateCwebLiquidityPool: Object
Type declaration
Name | Type |
---|---|
curve | Curve |
token | TokenHashId |
Defined in
wallet_lib.d.ts:376
CreateTokenUi
Ƭ CreateTokenUi: Object
Type declaration
Name | Type |
---|---|
extra_fields | ExtraFields |
memo | Uuid | null |
protocol_fields | ProtocolFieldsUi |
Defined in
wallet_lib.d.ts:453
Curve
Ƭ Curve: Object
Type declaration
Name | Type |
---|---|
curve_buy | Formula |
curve_sell | Formula |
cweb_supply | CwebToken |
domain | CwebToken |
token_supply | TokenValue |
Defined in
wallet_lib.d.ts:397
CustomUiCommand
Ƭ CustomUiCommand: Object
Type declaration
Name | Type |
---|---|
calls | ContractCall [] |
Defined in
wallet_lib.d.ts:340
CwebAddress
Ƭ CwebAddress: Object
Type declaration
Name | Type |
---|---|
memo | Uuid | null |
pub_key | PubKey |
Defined in
wallet_lib.d.ts:330
CwebToken
Ƭ CwebToken: BigInt
Defined in
wallet_lib.d.ts:70
DataResult
Ƭ DataResult: Object
Type declaration
Name | Type |
---|---|
data | string |
id | Id |
Defined in
wallet_lib.d.ts:130
Decimal
Ƭ Decimal: string
Defined in
wallet_lib.d.ts:84
Error
Ƭ Error: string
Defined in
wallet_lib.d.ts:72
ExchangeForCwebResult
Ƭ ExchangeForCwebResult: Object
Type declaration
Name | Type |
---|---|
cweb_amount | CwebToken |
network_fee | CwebToken |
price_impact | Decimal |
Defined in
wallet_lib.d.ts:562
ExchangeForTokenResult
Ƭ ExchangeForTokenResult: Object
Type declaration
Name | Type |
---|---|
network_fee | CwebToken |
price_impact | Decimal |
token_amount | TokenAmount |
Defined in
wallet_lib.d.ts:564
ExtraFields
Ƭ ExtraFields: Field
[]
Defined in
wallet_lib.d.ts:76
Field
Ƭ Field: Object
Type declaration
Name | Type |
---|---|
content | string |
name | string |
Defined in
wallet_lib.d.ts:509
Formula
Ƭ Formula: { Exponential
: { a
: Decimal
; b
:
Decimal
} } | { Logarithmic
: { a
:
Decimal
; b
: Decimal
} } | {
Sigmoid
: { a
: Decimal
} } | { Polynomial
: {
poly
: Polynomial
} }
Defined in
wallet_lib.d.ts:406
FreezeBondingCurve
Ƭ FreezeBondingCurve: Object
Type declaration
Name | Type |
---|---|
token | TokenHashId |
Defined in
wallet_lib.d.ts:461
GeneralQueryResult
Ƭ GeneralQueryResult: { Tokens
: TokenHashId
[] }
Defined in
wallet_lib.d.ts:549
GqlBlockInfo
Ƭ GqlBlockInfo: Object
Type declaration
Name | Type |
---|---|
hash | string |
height | BigInt |
time | NaiveDateTime |
Defined in
wallet_lib.d.ts:118
GqlClaim
Ƭ GqlClaim: Object
Type declaration
Name | Type |
---|---|
body | Value |
fees_stored | Value |
key | Value |
Defined in
wallet_lib.d.ts:133
GqlClaimFilter
Ƭ GqlClaimFilter: Object
Type declaration
Name | Type |
---|---|
endsAtKeySecondPart | Value | null |
issuer | Value |
keyFirstPart | Value |
keySecondPart | Value | null |
startsAtKeySecondPart | Value | null |
Defined in
wallet_lib.d.ts:114
GqlDbWriteOp
Ƭ GqlDbWriteOp: Object
Type declaration
Name | Type |
---|---|
issued_claim | GqlIssuedClaim |
revoke_claim | boolean |
Defined in
wallet_lib.d.ts:120
GqlDbWriteOpInfo
Ƭ GqlDbWriteOpInfo: Object
Type declaration
Name | Type |
---|---|
block_info | GqlBlockInfo |
op | GqlDbWriteOp |
Defined in
wallet_lib.d.ts:116
GqlIssuedClaim
Ƭ GqlIssuedClaim: Object
Type declaration
Name | Type |
---|---|
content | GqlClaim |
issuer | Value |
Defined in
wallet_lib.d.ts:122
GqlL2TransactionOutput
Ƭ GqlL2TransactionOutput: Object
Type declaration
Name | Type |
---|---|
claims | Value |
error | string | null |
Defined in
wallet_lib.d.ts:124
Id
Ƭ Id: string
Defined in
wallet_lib.d.ts:74
IssuanceType
Ƭ IssuanceType: { Mintable
: MintableData
} |
"NonMintable"
| { WithNonMintableBondingCurve
:
WithNonMintableBondingCurveData
}
| { WithMintableBondingCurve
:
WithMintableBondingCurveData
}
Defined in
wallet_lib.d.ts:490
IssuanceTypeUi
Ƭ IssuanceTypeUi: { Mintable
: MintableDataUi
}
Defined in
wallet_lib.d.ts:486
L2TransactionData
Ƭ L2TransactionData: Object
Type declaration
Name | Type |
---|---|
l2_transaction | L2TransactionDataInput |
l2_txid | L2Txid |
network_fees | CwebToken |
to_broadcaster | [CwebToken , TokenAmount ] | null |
wallet_fees | CwebToken |
Defined in
wallet_lib.d.ts:43
L2TransactionDataInput
Ƭ L2TransactionDataInput: unknown
Defined in
wallet_lib.d.ts:85
L2TransactionDataJson
Ƭ L2TransactionDataJson: Object
Type declaration
Name | Type |
---|---|
l2Transaction | Value |
network | NetworkName |
Defined in
wallet_lib.d.ts:44
L2Txid
Ƭ L2Txid: string
Defined in
wallet_lib.d.ts:63
LiquidityPool
Ƭ LiquidityPool: Object
Type declaration
Name | Type |
---|---|
curve_kind | Curve |
id | LiquidityPoolId |
lp_token | TokenHashId |
token_a_amount | TokenAmount |
token_b_amount | TokenAmount |
Defined in
wallet_lib.d.ts:423
LiquidityPoolId
Ƭ LiquidityPoolId: { V0
: LiquidityPoolIdV0
}
Defined in
wallet_lib.d.ts:415
LiquidityPoolIdV0
Ƭ LiquidityPoolIdV0: Object
Type declaration
Name | Type |
---|---|
token_a | TokenHashId |
Defined in
wallet_lib.d.ts:420
LoggingConfig
Ƭ LoggingConfig: Object
Type declaration
Name | Type |
---|---|
gql | boolean |
Defined in
wallet_lib.d.ts:18
MinimalUnitsRatio
Ƭ MinimalUnitsRatio: Object
Type declaration
Name | Type |
---|---|
denominator | U256 |
numerator | U256 |
sign | Sign |
Defined in
wallet_lib.d.ts:427
MintToken
Ƭ MintToken: Object
Type declaration
Name | Type |
---|---|
token | TokenHashId |
token_amount | TokenAmount |
Defined in
wallet_lib.d.ts:470
MintableData
Ƭ MintableData: MintableDataUi
Defined in
wallet_lib.d.ts:89
MintableDataUi
Ƭ MintableDataUi: Object
Type declaration
Name | Type |
---|---|
minters | User [] |
Defined in
wallet_lib.d.ts:497
NaiveDateTime
Ƭ NaiveDateTime: Date
Defined in
wallet_lib.d.ts:78
OnChainQuery
Ƭ OnChainQuery: { TokenQuery
: [TokenHashId
,
TokenQuery
] } | { TokenHistoricalPriceQuery
: {
finish
: Timestamp
; start
:
Timestamp
; token
: TokenHashId
} } | { UserQuery
: [User
, UserQuery
]
} | { GeneralQuery
: GeneralQuery
} | {
ExchangeForCweb
: [[TokenHashId
,
TokenAmount
],
ExchangeForCwebQuery
] } | { ExchangeViaCweb
:
[[TokenHashId
, CwebToken
],
ExchangeViaCwebQuery
] } | {
ExchangeForToken
: [SwapInfo
,
ExchangeForTokenQuery
] } | {
TokenFilterQuery
: TokenFilter
}
Defined in
wallet_lib.d.ts:552
OnChainQueryResult
Ƭ OnChainQueryResult: { TokenQueryResult
:
TokenQueryResult
} | {
TokenHistoricalPriceResult
:
QueryResult
<[Timestamp
,
Decimal
][]> } | { UserQueryResult
:
UserQueryResult
} | { GeneralQueryResult
:
GeneralQueryResult
} | {
ExchangeForCwebResult
:
QueryResult
<ExchangeForCwebResult
>
} | { ExchangeViaCwebResult
:
QueryResult
<ExchangeForTokenResult
>
} | { ExchangeForTokenResult
:
QueryResult
<ExchangeForTokenResult
>
} | { TokenFilterResult
: TokenInformation
[] }
Defined in
wallet_lib.d.ts:566
OrdJson
Ƭ OrdJson: Value
Defined in
wallet_lib.d.ts:425
PaymentUtxoInfo
Ƭ PaymentUtxoInfo: unknown
Defined in
wallet_lib.d.ts:90
Polynomial
Ƭ Polynomial: Decimal
[]
Defined in
wallet_lib.d.ts:412
ProtocolFields
Ƭ ProtocolFields: Object
Type declaration
Name | Type |
---|---|
hash_id | TokenHashId |
initial_token_supply | TokenAmount |
issuance_type | IssuanceType |
token_admin | User |
Defined in
wallet_lib.d.ts:483
ProtocolFieldsUi
Ƭ ProtocolFieldsUi: Object
Type declaration
Name | Type |
---|---|
initial_token_supply | TokenAmount |
issuance_type | IssuanceTypeUi |
token_admin | User |
Defined in
wallet_lib.d.ts:480
PubKey
Ƭ PubKey: string
This is a public key in full or compressed form as hex-string
Defined in
wallet_lib.d.ts:60
QueryResult
Ƭ QueryResult<T
>: { Ok
: T
} | { Err
:
TrackError
}
Type parameters
Name |
---|
T |
Defined in
wallet_lib.d.ts:87
RecoverableSignature
Ƭ RecoverableSignature: Object
Type declaration
Name | Type |
---|---|
recovery_id | number |
signature | Signature |
Defined in
wallet_lib.d.ts:472
RemoveLiquidityPoolLiquidity
Ƭ RemoveLiquidityPoolLiquidity: Object
Type declaration
Name | Type |
---|---|
liquidity_pool | LiquidityPoolId |
lp_token_amount | TokenAmount |
Defined in
wallet_lib.d.ts:395
SellForToken
Ƭ SellForToken: Object
Type declaration
Name | Type |
---|---|
limit_token_b_amount | TokenAmount |
token_a | TokenHashId |
token_a_amount | TokenAmount |
token_b | TokenHashId |
Defined in
wallet_lib.d.ts:364
SellToken
Ƭ SellToken: Object
Type declaration
Name | Type |
---|---|
limit_cweb_amount | CwebToken |
token | TokenHashId |
token_amount | TokenAmount |
Defined in
wallet_lib.d.ts:352
SellViaCweb
Ƭ SellViaCweb: Object
Type declaration
Name | Type |
---|---|
cweb_amount | CwebToken |
limit_token_amount | TokenAmount |
token | TokenHashId |
Defined in
wallet_lib.d.ts:358
SendUiCommand
Ƭ SendUiCommand: Object
Type declaration
Name | Type |
---|---|
amount | BigInt |
destination | PubKey | null |
memo | Uuid | null |
token_ref | TokenHashId | null |
Defined in
wallet_lib.d.ts:334
SignCallback
Ƭ SignCallback: (data
: Uint8Array
) =>
RecoverableSignature
|
Promise
<RecoverableSignature
>
Type declaration
▸ (data
): RecoverableSignature
|
Promise
<RecoverableSignature
>
Parameters
Name | Type |
---|---|
data | Uint8Array |
Returns
RecoverableSignature
|
Promise
<RecoverableSignature
>
Defined in
wallet_lib.d.ts:68
Signature
Ƭ Signature: Uint8Array
Defined in
wallet_lib.d.ts:69
SigningTxInputId
Ƭ SigningTxInputId: string
Defined in
wallet_lib.d.ts:64
SmartContractRef
Ƭ SmartContractRef: "EcdsaContract"
| "FailContract"
|
"ConstantContract"
| "DelayContract"
| "DataContract"
| {
ComputationBlockContract
: ComputationBlockRef
} | "PaymentCheckContract"
| "JumpContract"
| "AnyOfContract"
|
"AntiReplayContract"
Defined in
wallet_lib.d.ts:607
StatusResult
Ƭ StatusResult: Object
Type declaration
Name | Type |
---|---|
id | Id |
status | EmbedStatus |
tx_hash | Id | null |
Defined in
wallet_lib.d.ts:135
StoreUiCommand
Ƭ StoreUiCommand: Object
Type declaration
Name | Type |
---|---|
data | Value |
key | Value |
Defined in
wallet_lib.d.ts:337
SwapInfo
Ƭ SwapInfo: Object
Type declaration
Name | Type |
---|---|
amount | TokenAmount |
token_a | TokenHashId |
token_b | TokenHashId |
Defined in
wallet_lib.d.ts:512
Timestamp
Ƭ Timestamp: BigInt
Defined in
wallet_lib.d.ts:77
TokenAmount
Ƭ TokenAmount: BigInt
Defined in
wallet_lib.d.ts:75
TokenFilter
Ƭ TokenFilter: Object
Type declaration
Name | Type |
---|---|
buy_price | Decimal | null |
creator | User | null |
sell_price | Decimal | null |
Defined in
wallet_lib.d.ts:539
TokenHashId
Ƭ TokenHashId: string
Defined in
wallet_lib.d.ts:65
TokenInformation
Ƭ TokenInformation: Object
Type declaration
Name | Type |
---|---|
creator | User |
liquidity | TokenLiquidityInformation | null |
token | TokenHashId |
total_supply | TokenAmount |
Defined in
wallet_lib.d.ts:542
TokenLiquidityInformation
Ƭ TokenLiquidityInformation: Object
Type declaration
Name | Type |
---|---|
buy_price | Decimal |
sell_price | Decimal |
Defined in
wallet_lib.d.ts:545
TokenMsg
Ƭ TokenMsg: Object
Type declaration
Name | Type |
---|---|
cmd | TokenUiCommand |
on_failure | ContractCall | null |
on_success | ContractCall | null |
Defined in
wallet_lib.d.ts:399
TokenPrice
Ƭ TokenPrice: Object
Type declaration
Name | Type |
---|---|
avg | Decimal |
buy | Decimal |
sell | Decimal |
Defined in
wallet_lib.d.ts:547
TokenQueryResult
Ƭ TokenQueryResult: { ProtocolFields
:
QueryResult
<ProtocolFields
>
} | { LastExtraFields
:
QueryResult
<ExtraFields
> }
| { BondingCurve
:
QueryResult
<Curve
> } | {
BondingCurveExtraFields
:
QueryResult
<ExtraFields
> }
| { CalculateLiquidityChangeFees
:
QueryResult
<CwebToken
> } | {
HistoricalExtraFields
:
QueryResult
<[Timestamp
,
ExtraFields
][]> } | { CurrentPrice
:
QueryResult
<TokenPrice
> } |
{ TotalSupply
:
QueryResult
<TokenAmount
> }
| { HistoricalSupply
:
QueryResult
<[Timestamp
,
TokenAmount
][]> } | { L2Txid
:
QueryResult
<L2Txid
> } | {
TopHolders
: QueryResult
<[User
,
TokenAmount
][]> } | { BondingCurveFunds
:
QueryResult
<[CwebToken
,
CwebToken
]> } | { IsBondingCurveFrozen
:
QueryResult
<boolean
> } | {
TokenRateLimiterState
:
QueryResult
<TokenRateLimiterState
>
}
Defined in
wallet_lib.d.ts:514
TokenRateLimiterParameters
Ƭ TokenRateLimiterParameters: Object
Type declaration
Name | Type |
---|---|
initial_balance | TokenAmount |
max_capacity | TokenAmount |
refill_amount | TokenAmount |
refill_interval | Timestamp |
start_sale | Timestamp |
Defined in
wallet_lib.d.ts:455
TokenRateLimiterState
Ƭ TokenRateLimiterState: Object
Type declaration
Name | Type |
---|---|
last_update | Timestamp |
max_capacity | TokenAmount |
prev_balance | TokenAmount |
refill_amount | TokenAmount |
refill_interval | Timestamp |
Defined in
wallet_lib.d.ts:530
TokenUiCommand
Ƭ TokenUiCommand: { CreateTokenUi
:
CreateTokenUi
} | { TransferTokenUi
:
TransferToken
} | { UpdateTokenUi
:
UpdateToken
} | { FreezeBondingCurveUi
:
FreezeBondingCurve
} | {
UpdateBondingCurveUi
: UpdateBondingCurve
} |
{ MintTokenUi
: MintToken
} | { BuyTokenUi
:
BuyToken
} | { SellTokenUi
:
SellToken
} | { BuyViaCwebUi
:
BuyViaCweb
} | { SellViaCwebUi
:
SellViaCweb
} | { BuyForTokenUi
:
BuyForToken
} | { SellForTokenUi
:
SellForToken
} | { WithdrawTokensUi
:
WithdrawTokens
} | { WithdrawCwebUi
:
WithdrawCweb
} | { CreateCwebLiquidityPoolUi
:
CreateCwebLiquidityPool
} | {
UpdateLiquidityPoolCurveUi
:
UpdateLiquidityPoolCurve
} | {
AddLiquidityPoolLiquidityUi
:
AddLiquidityPoolLiquidity
} | {
RemoveLiquidityPoolLiquidityUi
:
RemoveLiquidityPoolLiquidity
}
Defined in
wallet_lib.d.ts:432
TokenValue
Ƭ TokenValue: Decimal
Defined in
wallet_lib.d.ts:88
Transaction
Ƭ Transaction: Object
Type declaration
Name | Type |
---|---|
embedding_id | L2Txid | null |
error | WalletError | null |
id | L2Txid |
input_id | SigningTxInputId |
l1_tx_hash | TxHash | null |
memo | Uuid | null |
next_state_timeout_awaiter | BlockAwaiter | null |
shard_to_execute_on | NetworkName |
shard_to_write_on | NetworkName |
status | TransactionStatus |
ui_command | UiCommand |
user_op_block_anchor | BlockAnchorInput | null |
user_ops | UserOperation [] |
Defined in
wallet_lib.d.ts:16
TransferToken
Ƭ TransferToken: Object
Type declaration
Name | Type |
---|---|
amount | TokenAmount |
auto_limit_sell_token | CwebToken | null |
memo | Uuid | null |
receiver | User | null |
token | TokenHashId |
Defined in
wallet_lib.d.ts:464
TxHash
Ƭ TxHash: string
Defined in
wallet_lib.d.ts:62
U256
Ƭ U256: BigInt
Defined in
wallet_lib.d.ts:83
UiCommand
Ƭ UiCommand: { SendV1
: UiSendV1
} | { TokenV1
:
UiTokenV1
} | { StoreV1
:
UiStoreV1
} | { CustomV1
:
UiCustomV1
}
Defined in
wallet_lib.d.ts:342
UiCustomV1
Ƭ UiCustomV1: CustomUiCommand
Defined in
wallet_lib.d.ts:82
UiSendV1
Ƭ UiSendV1: SendUiCommand
Defined in
wallet_lib.d.ts:79
UiStoreV1
Ƭ UiStoreV1: StoreUiCommand
Defined in
wallet_lib.d.ts:81
UiTokenV1
Ƭ UiTokenV1: TokenUiCommand
Defined in
wallet_lib.d.ts:80
UpdateBondingCurve
Ƭ UpdateBondingCurve: Object
Type declaration
Name | Type |
---|---|
curve_buy | Formula |
curve_sell | Formula |
domain | CwebToken |
extra_fields | ExtraFields |
initial_cweb | CwebToken |
memo | Uuid | null |
rate_limiter_params | TokenRateLimiterParameters | null |
token | TokenHashId |
Defined in
wallet_lib.d.ts:458
UpdateLiquidityPoolCurve
Ƭ UpdateLiquidityPoolCurve: Object
Type declaration
Name | Type |
---|---|
curve | Curve |
liquidity_pool | LiquidityPoolId |
Defined in
wallet_lib.d.ts:381
UpdateToken
Ƭ UpdateToken: Object
Type declaration
Name | Type |
---|---|
extra_fields | ExtraFields |
memo | Uuid | null |
token | TokenHashId |
Defined in
wallet_lib.d.ts:467
Url
Ƭ Url: string
Defined in
wallet_lib.d.ts:56
User
Ƭ User: Object
Type declaration
Name | Type |
---|---|
auth | ContractId |
payload | OrdJson |
Defined in
wallet_lib.d.ts:477
UserOperation
Ƭ UserOperation: { Sent
: { amount
: BigInt
; block_hash
:
BlockHash
; block_height
: BigInt
; memo
:
Uuid
| null
; network_fees
:
CwebToken
| null
; processed_on
: Date
;
receiver
: User
; signing_tx_input_id
:
SigningTxInputId
| null
; signing_txid
:
L2Txid
| null
; token_ref
:
TokenHashId
| null
; txid
:
L2Txid
; wallet_fees
: CwebToken
|
null
} } | { Received
: { amount
: BigInt
; block_hash
:
BlockHash
; block_height
: BigInt
; memo
:
Uuid
| null
; processed_on
: Date
; sender
:
User
| null
; signing_tx_input_id
:
SigningTxInputId
| null
; signing_txid
:
L2Txid
| null
; token_ref
:
TokenHashId
| null
; txid
:
L2Txid
} } | { CustomTokenFailure
: { block_hash
:
BlockHash
; block_height
: BigInt
; command
:
FailedCommand
; memo
: Uuid
|
null
; message
: string
; processed_on
: Date
; signing_tx_input_id
:
SigningTxInputId
| null
; signing_txid
:
L2Txid
| null
; token_ref
:
TokenHashId
| null
; txid
:
L2Txid
} } | { CustomTokenSuccess
: { block_hash
:
BlockHash
; block_height
: BigInt
; command
:
TokenCommandName
; memo
: Uuid
|
null
; processed_on
: Date
; signing_tx_input_id
:
SigningTxInputId
| null
; signing_txid
:
L2Txid
| null
; token_ref
:
TokenHashId
; txid
: L2Txid
} } |
{ CustomTokenExchange
: { block_hash
: BlockHash
;
block_height
: BigInt
; memo
: Uuid
| null
;
processed_on
: Date
; signing_tx_input_id
:
SigningTxInputId
| null
; signing_txid
:
L2Txid
| null
; src_amount
:
TokenAmount
; src_token_ref
:
TokenHashId
| null
; tgt_amount
:
TokenAmount
; tgt_token_ref
:
TokenHashId
| null
; txid
:
L2Txid
} } | { CreateCustomToken
: { block_hash
:
BlockHash
; block_height
: BigInt
; memo
:
Uuid
| null
; processed_on
: Date
;
signing_tx_input_id
: SigningTxInputId
| null
; signing_txid
: L2Txid
| null
; token_name
: string
| null
; token_ref
: TokenHashId
; txid
:
L2Txid
} } | { CustomTokenUpdated
: { block_hash
:
BlockHash
; block_height
: BigInt
; memo
:
Uuid
| null
; processed_on
: Date
;
signing_tx_input_id
: SigningTxInputId
| null
; signing_txid
: L2Txid
| null
; token_ref
:
TokenHashId
; txid
: L2Txid
} } |
{ CustomTokenLiquidityUpdated
: { block_hash
:
BlockHash
; block_height
: BigInt
; memo
:
Uuid
| null
; processed_on
: Date
;
signing_tx_input_id
: SigningTxInputId
| null
; signing_txid
: L2Txid
| null
; token_ref
:
TokenHashId
; txid
: L2Txid
} } |
{ StoreData
: { block_hash
: BlockHash
;
block_height
: BigInt
; key
: OrdJson
; processed_on
:
Date
; signing_tx_input_id
: SigningTxInputId
| null
; signing_txid
: L2Txid
| null
; txid
:
L2Txid
} }
Defined in
wallet_lib.d.ts:97
UserOperationsPage
Ƭ UserOperationsPage: Object
Type declaration
Name | Type |
---|---|
has_next_page | boolean |
operations | UserOperation [] |
page_anchor | UserOperationsPageAnchor |
Defined in
wallet_lib.d.ts:112
UserOperationsPageAnchor
Ƭ UserOperationsPageAnchor: Object
Type declaration
Name | Type |
---|---|
offset | number |
Defined in
wallet_lib.d.ts:110
UserQueryResult
Ƭ UserQueryResult: { HeldTokens
:
QueryResult
<[TokenHashId
,
TokenAmount
][]> } | { CreatedTokens
:
QueryResult
<TokenHashId
[]> }
| { LiquidTokens
:
QueryResult
<[TokenHashId
,
CwebToken
, TokenAmount
][]> } |
{ PaymentConfirmations
:
QueryResult
<[TokenAmount
,
Uuid
, TokenHashId
][]> }
Defined in
wallet_lib.d.ts:532
Uuid
Ƭ Uuid: string
Defined in
wallet_lib.d.ts:73
Value
Ƭ Value: Object
Defined in
wallet_lib.d.ts:71
WalletConfig
Ƭ WalletConfig: Object
Type declaration
Name | Type |
---|---|
address | string |
enable_retries | boolean | null |
max_retry_time_secs | number | null |
pub_key | PubKey |
shard | NetworkName | null |
sign_callback | SignCallback |
ws_address | string |
Defined in
wallet_lib.d.ts:328
WalletError
Ƭ WalletError: { NotEnoughFunds
: { error
: Error
;
max_possible_base_amount
: CwebToken
} } | {
NotEnoughCustomTokenFunds
: { error
: Error
;
max_possible_base_amount
: TokenAmount
} } | {
NetworkError
: Error
} | { SnapshotNoLongerAvailable
:
Error
} | { L1EmbeddingTimeout
: Error
} | { L2SuccessTimeout
: Error
} | { L2ExecutionError
:
Error
} | { L1WriterUnavailable
: Error
} | { L1WriterEmbedFailed
: Error
} | {
ValidationFailed
: Error
} | { InternalBackendError
:
Error
} | { UnknownError
: Error
}
Defined in
wallet_lib.d.ts:29
WithMintableBondingCurveData
Ƭ WithMintableBondingCurveData: Object
Type declaration
Name | Type |
---|---|
bonding_curve_info | BondingCurveInfo |
minters | User [] |
Defined in
wallet_lib.d.ts:506
WithNonMintableBondingCurveData
Ƭ WithNonMintableBondingCurveData: Object
Type declaration
Name | Type |
---|---|
bonding_curve_info | BondingCurveInfo |
Defined in
wallet_lib.d.ts:503
WithdrawCweb
Ƭ WithdrawCweb: Object
Type declaration
Name | Type |
---|---|
cweb_amount | CwebToken |
token | TokenHashId |
Defined in
wallet_lib.d.ts:370
WithdrawTokens
Ƭ WithdrawTokens: Object
Type declaration
Name | Type |
---|---|
amount | TokenAmount |
token | TokenHashId |
Defined in
wallet_lib.d.ts:367
Variables
wasmLoadingPromise
• Const
wasmLoadingPromise: Promise
<void
> | undefined
Defined in
wallet_lib.d.ts:93
Functions
add_txs
▸ add_txs(tx_monitor
, tx
):
Promise
<Transaction
[]>
Add tx(s) with [TransactionStatus::L1BeforeEmbed] status. Such tx(s) are not marked as updated
Parameters
Name | Type |
---|---|
tx_monitor | TransactionMonitor |
tx | unknown |
Returns
Promise
<Transaction
[]>
Defined in
wallet_lib.d.ts:199
any_pending_txs
▸ any_pending_txs(tx_monitor
): boolean
Returns whether at least 1 non-[TransactionStatus::L2Confirmed] is present
Parameters
Name | Type |
---|---|
tx_monitor | TransactionMonitor |
Returns
boolean
Defined in
wallet_lib.d.ts:183
compose_send
▸ compose_send(wallet
, command
, shard_to_write_on
):
Promise
<L2TransactionData
>
Prepare L2 transaction
Parameters
Name | Type |
---|---|
wallet | Wallet |
command | SendUiCommand |
shard_to_write_on | null | NetworkName |
Returns
Promise
<L2TransactionData
>
Defined in
wallet_lib.d.ts:173
compose_token_command
▸ compose_token_command(wallet
, command
, shard_to_write_on
):
Promise
<L2TransactionData
>
Prepare L2 transaction for token UI command
Parameters
Name | Type |
---|---|
wallet | Wallet |
command | TokenUiCommand |
shard_to_write_on | null | NetworkName |
Returns
Promise
<L2TransactionData
>
Defined in
wallet_lib.d.ts:283
compose_ui_command
▸ compose_ui_command(wallet
, command
, shard_to_write_on
):
Promise
<L2TransactionData
>
Prepare L2 transaction for the specified UI command
Parameters
Name | Type |
---|---|
wallet | Wallet |
command | UiCommand |
shard_to_write_on | null | NetworkName |
Returns
Promise
<L2TransactionData
>
Defined in
wallet_lib.d.ts:288
compose_ui_commands
▸ compose_ui_commands(wallet
, commands
, shard_to_write_on
):
Promise
<L2TransactionData
>
Prepare L2 transaction for the array of UI commands
Parameters
Name | Type |
---|---|
wallet | Wallet |
commands | UiCommand [] |
shard_to_write_on | null | NetworkName |
Returns
Promise
<L2TransactionData
>
Defined in
wallet_lib.d.ts:293
connect_to_node
▸ connect_to_node(address
): NodeConnection
Parameters
Name | Type |
---|---|
address | string |
Returns
Defined in
wallet_lib.d.ts:146
create_basic_user
▸ create_basic_user(pubkey
): User
The black-box representation of the User
Parameters
Name | Type |
---|---|
pubkey | string |
Returns
Defined in
wallet_lib.d.ts:304
create_tx_monitor
▸ create_tx_monitor(pending_txs
, utxos
):
TransactionMonitor
It is a singleton. Should be created once before any wallet creation.
Transactions in pending_txs
in L2 confirmed status are ignored.
Parameters
Name | Type |
---|---|
pending_txs | Transaction [] |
utxos | Map <string , unknown []> |
Returns
Defined in
wallet_lib.d.ts:168
create_wallet
▸ create_wallet(config
): Promise
<Wallet
>
Parameters
Name | Type |
---|---|
config | WalletConfig |
Returns
Promise
<Wallet
>
Defined in
wallet_lib.d.ts:141
embed
▸ embed(wallet
, data
): Promise
<Id
>
Prepare L1 transaction and execute it
Parameters
Name | Type |
---|---|
wallet | Wallet |
data | unknown |
Returns
Promise
<Id
>
Defined in
wallet_lib.d.ts:178
embed_status
▸ embed_status(wallet
, ids
):
Promise
<StatusResult
[]>
Get status of L1 transaction(s)
Parameters
Name | Type |
---|---|
wallet | Wallet |
ids | string [] |
Returns
Promise
<StatusResult
[]>
Defined in
wallet_lib.d.ts:236
enable_logging
▸ enable_logging(logging_config
): void
Enables/disables logging
Parameters
Name | Type |
---|---|
logging_config | LoggingConfig |
Returns
void
Defined in
wallet_lib.d.ts:24
fetchTokenizationQuery
▸ fetchTokenizationQuery(connection
, queries
, network
,
load_all_pages
):
Promise
<OnChainQueryResult
[]>
Return claims fetching by queries
Parameters
Name | Type |
---|---|
connection | NodeConnection |
queries | OnChainQuery [] |
network | NetworkName |
load_all_pages | Boolean |
Returns
Promise
<OnChainQueryResult
[]>
Defined in
wallet_lib.d.ts:278
fetch_claims
▸ fetch_claims(connection
, filters
, network
, load_all_pages
):
Promise
<GqlIssuedClaim
[]>
Return claims fetching by filters
Parameters
Name | Type |
---|---|
connection | NodeConnection |
filters | GqlClaimFilter [] |
network | NetworkName |
load_all_pages | Boolean |
Returns
Promise
<GqlIssuedClaim
[]>
Defined in
wallet_lib.d.ts:273
force_refresh
▸ force_refresh(wallet
): Promise
<void
>
Force refresh of [Wallet] caches. Timeouts after 15 seconds. This should be called on user request only.
Parameters
Name | Type |
---|---|
wallet | Wallet |
Returns
Promise
<void
>
Defined in
wallet_lib.d.ts:152
from_hex_string
▸ from_hex_string(str
): Uint8Array
Parameters
Name | Type |
---|---|
str | string |
Returns
Uint8Array
Defined in
wallet_lib.d.ts:10
get_all_utxos
▸ get_all_utxos(tx_monitor
):
Promise
<Map
<SigningTxInputId
,
PaymentUtxoInfo
[]>>
Returns all utxos reserved by transaction monitor
Parameters
Name | Type |
---|---|
tx_monitor | TransactionMonitor |
Returns
Promise
<Map
<SigningTxInputId
,
PaymentUtxoInfo
[]>>
Defined in
wallet_lib.d.ts:188
get_failed_txs
▸ get_failed_txs(tx_monitor
):
Promise
<Transaction
[]>
Returns [TransactionStatus::Error]/[TransactionStatus::L1NotFound] txs
Parameters
Name | Type |
---|---|
tx_monitor | TransactionMonitor |
Returns
Promise
<Transaction
[]>
Defined in
wallet_lib.d.ts:225
get_l2_confirmed_txs
▸ get_l2_confirmed_txs(tx_monitor
):
Promise
<Transaction
[]>
Returns [TransactionStatus::L2Confirmed] txs
Parameters
Name | Type |
---|---|
tx_monitor | TransactionMonitor |
Returns
Promise
<Transaction
[]>
Defined in
wallet_lib.d.ts:220
get_last_updated_txs
▸ get_last_updated_txs(tx_monitor
):
Promise
<Transaction
[]>
Returns updated txs since last call to this method. Clears list of updated txs.
Parameters
Name | Type |
---|---|
tx_monitor | TransactionMonitor |
Returns
Promise
<Transaction
[]>
Defined in
wallet_lib.d.ts:231
get_pending_txs
▸ get_pending_txs(tx_monitor
):
Promise
<Transaction
[]>
Returns non-[TransactionStatus::L2Confirmed] txs
Parameters
Name | Type |
---|---|
tx_monitor | TransactionMonitor |
Returns
Promise
<Transaction
[]>
Defined in
wallet_lib.d.ts:215
get_shards_to_write_on
▸ get_shards_to_write_on(wallet
):
Promise
<NetworkName
[]>
Returns a list of shards that can be used during composing. This list does not include wallet's shard.
Parameters
Name | Type |
---|---|
wallet | Wallet |
Returns
Promise
<NetworkName
[]>
Defined in
wallet_lib.d.ts:299
get_subscription_claim_filters
▸ get_subscription_claim_filters(wallet
):
GqlClaimFilter
[]
Parameters
Name | Type |
---|---|
wallet | Wallet |
Returns
Defined in
wallet_lib.d.ts:268
get_token_balance
▸ get_token_balance(wallet
, token_ref
):
Promise
<CwebToken
|
TokenAmount
>
Returns user's token balance. token_ref
should be null
for Cweb.
Parameters
Name | Type |
---|---|
wallet | Wallet |
token_ref | null | string |
Returns
Promise
<CwebToken
|
TokenAmount
>
Defined in
wallet_lib.d.ts:254
get_txs
▸ get_txs(tx_monitor
, id
):
Promise
<Transaction
[]>
Returns tx(s) by ID. This function may return multiple txs in case of batch UI command execution only
Parameters
Name | Type |
---|---|
tx_monitor | TransactionMonitor |
id | string |
Returns
Promise
<Transaction
[]>
Defined in
wallet_lib.d.ts:210
get_user_created_custom_tokens
▸ get_user_created_custom_tokens(wallet
):
Promise
<TokenHashId
[]>
Returns user's created custom tokens IDs
Parameters
Name | Type |
---|---|
wallet | Wallet |
Returns
Promise
<TokenHashId
[]>
Defined in
wallet_lib.d.ts:264
get_user_held_custom_tokens
▸ get_user_held_custom_tokens(wallet
):
Promise
<TokenHashId
[]>
Returns user's held custom tokens IDs
Parameters
Name | Type |
---|---|
wallet | Wallet |
Returns
Promise
<TokenHashId
[]>
Defined in
wallet_lib.d.ts:259
get_user_operations_history
▸ get_user_operations_history(wallet
, page_anchor
):
Promise
<UserOperationsPage
>
Returns page of user operations
Parameters
Name | Type |
---|---|
wallet | Wallet |
page_anchor | null | UserOperationsPageAnchor |
Returns
Promise
<UserOperationsPage
>
Defined in
wallet_lib.d.ts:311
get_user_operations_history_per_token
▸ get_user_operations_history_per_token(wallet
, token_ref
,
page_anchor
): Promise
<UserOperationsPage
>
Returns page of user operations per token
Parameters
Name | Type |
---|---|
wallet | Wallet |
token_ref | null | string |
page_anchor | null | UserOperationsPageAnchor |
Returns
Promise
<UserOperationsPage
>
Defined in
wallet_lib.d.ts:316
get_user_pub_key
▸ get_user_pub_key(user
): PubKey
| null
Parameters
Name | Type |
---|---|
user | User |
Returns
PubKey
| null
Defined in
wallet_lib.d.ts:306
get_utxos_for
▸ get_utxos_for(tx_monitor
, input_id
):
Promise
<PaymentUtxoInfo
[]>
Returns reserved utxos for transactions with given [SigningTxInputId]
Parameters
Name | Type |
---|---|
tx_monitor | TransactionMonitor |
input_id | string |
Returns
Promise
<PaymentUtxoInfo
[]>
Defined in
wallet_lib.d.ts:193
parse_cweb_address
▸ parse_cweb_address(str
): CwebAddress
Parameters
Name | Type |
---|---|
str | string |
Returns
Defined in
wallet_lib.d.ts:249
process_db_write_op
▸ process_db_write_op(wallet
, db_write_op
): Promise
<void
>
Parameters
Name | Type |
---|---|
wallet | Wallet |
db_write_op | GqlDbWriteOpInfo |
Returns
Promise
<void
>
Defined in
wallet_lib.d.ts:266
query_tokenization_block
▸ query_tokenization_block(wallet
, queries
):
Promise
<OnChainQueryResult
[]>
Queries TokenizationBlock
and returns results of the queries. Note, results of
this function should be cached by the caller
Parameters
Name | Type |
---|---|
wallet | Wallet |
queries | OnChainQuery [] |
Returns
Promise
<OnChainQueryResult
[]>
Defined in
wallet_lib.d.ts:322
remove_txs
▸ remove_txs(tx_monitor
, id
): Promise
<void
>
Stop tracking of tx(s)
Parameters
Name | Type |
---|---|
tx_monitor | TransactionMonitor |
id | string |
Returns
Promise
<void
>
Defined in
wallet_lib.d.ts:204
sign
▸ sign(secret_key
, message
):
RecoverableSignature
Parameters
Name | Type | Description |
---|---|---|
secret_key | Uint8Array | |
message | Uint8Array | is 32 bytes of hashed data to sign |
Returns
Defined in
wallet_lib.d.ts:243
sign_l2_tx
▸ sign_l2_tx(wallet
, tx
): Promise
<string
>
Parameters
Name | Type |
---|---|
wallet | Wallet |
tx | string |
Returns
Promise
<string
>
Defined in
wallet_lib.d.ts:245
simulate_tx
▸ simulate_tx(wallet
, tx
):
Promise
<GqlL2TransactionOutput
>
Parameters
Name | Type |
---|---|
wallet | Wallet |
tx | L2TransactionDataJson |
Returns
Promise
<GqlL2TransactionOutput
>
Defined in
wallet_lib.d.ts:247
start
▸ start(): void
Returns
void
Defined in
wallet_lib.d.ts:5
test_signing
▸ test_signing(wallet
): Promise
<void
>
Call this method to check sign_callback
works as expected. If it will return
invalid signature then exception is raised with the description of the error.
Parameters
Name | Type |
---|---|
wallet | Wallet |
Returns
Promise
<void
>
Defined in
wallet_lib.d.ts:160
to_hex_string
▸ to_hex_string(bytes
): string
Parameters
Name | Type |
---|---|
bytes | Uint8Array |
Returns
string