Skip to main content

@coinweb/wallet-lib

Enumerations

Classes

Type Aliases

AddLiquidityPoolLiquidity

Ƭ AddLiquidityPoolLiquidity: Object

Type declaration

NameType
liquidity_poolLiquidityPoolId
token_a_amountTokenAmount

Defined in

wallet_lib.d.ts:390


BlockAnchor

Ƭ BlockAnchor: Object

Type declaration

NameType
hashstring | null
heightBigInt

Defined in

wallet_lib.d.ts:128


BlockAnchorInput

Ƭ BlockAnchorInput: Object

Type declaration

NameType
hashstring | null
heightBigInt

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

NameType
is_frozenboolean
is_naked_tokens_allowedboolean

Defined in

wallet_lib.d.ts:500


BuyForToken

Ƭ BuyForToken: Object

Type declaration

NameType
limit_token_a_amountTokenAmount
token_aTokenHashId
token_bTokenHashId
token_b_amountTokenAmount

Defined in

wallet_lib.d.ts:361


BuyToken

Ƭ BuyToken: Object

Type declaration

NameType
limit_cweb_amountCwebToken
tokenTokenHashId
token_amountTokenAmount

Defined in

wallet_lib.d.ts:349


BuyViaCweb

Ƭ BuyViaCweb: Object

Type declaration

NameType
cweb_amountCwebToken
limit_token_amountTokenAmount
tokenTokenHashId

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

NameType
curveCurve
tokenTokenHashId

Defined in

wallet_lib.d.ts:376


CreateTokenUi

Ƭ CreateTokenUi: Object

Type declaration

NameType
extra_fieldsExtraFields
memoUuid | null
protocol_fieldsProtocolFieldsUi

Defined in

wallet_lib.d.ts:453


Curve

Ƭ Curve: Object

Type declaration

NameType
curve_buyFormula
curve_sellFormula
cweb_supplyCwebToken
domainCwebToken
token_supplyTokenValue

Defined in

wallet_lib.d.ts:397


CustomUiCommand

Ƭ CustomUiCommand: Object

Type declaration

NameType
callsContractCall[]

Defined in

wallet_lib.d.ts:340


CwebAddress

Ƭ CwebAddress: Object

Type declaration

NameType
memoUuid | null
pub_keyPubKey

Defined in

wallet_lib.d.ts:330


CwebToken

Ƭ CwebToken: BigInt

Defined in

wallet_lib.d.ts:70


DataResult

Ƭ DataResult: Object

Type declaration

NameType
datastring
idId

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

NameType
cweb_amountCwebToken
network_feeCwebToken
price_impactDecimal

Defined in

wallet_lib.d.ts:562


ExchangeForTokenResult

Ƭ ExchangeForTokenResult: Object

Type declaration

NameType
network_feeCwebToken
price_impactDecimal
token_amountTokenAmount

Defined in

wallet_lib.d.ts:564


ExtraFields

Ƭ ExtraFields: Field[]

Defined in

wallet_lib.d.ts:76


Field

Ƭ Field: Object

Type declaration

NameType
contentstring
namestring

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

NameType
tokenTokenHashId

Defined in

wallet_lib.d.ts:461


GeneralQueryResult

Ƭ GeneralQueryResult: { Tokens: TokenHashId[] }

Defined in

wallet_lib.d.ts:549


GqlBlockInfo

Ƭ GqlBlockInfo: Object

Type declaration

NameType
hashstring
heightBigInt
timeNaiveDateTime

Defined in

wallet_lib.d.ts:118


GqlClaim

Ƭ GqlClaim: Object

Type declaration

NameType
bodyValue
fees_storedValue
keyValue

Defined in

wallet_lib.d.ts:133


GqlClaimFilter

Ƭ GqlClaimFilter: Object

Type declaration

NameType
endsAtKeySecondPartValue | null
issuerValue
keyFirstPartValue
keySecondPartValue | null
startsAtKeySecondPartValue | null

Defined in

wallet_lib.d.ts:114


GqlDbWriteOp

Ƭ GqlDbWriteOp: Object

Type declaration

NameType
issued_claimGqlIssuedClaim
revoke_claimboolean

Defined in

wallet_lib.d.ts:120


GqlDbWriteOpInfo

Ƭ GqlDbWriteOpInfo: Object

Type declaration

NameType
block_infoGqlBlockInfo
opGqlDbWriteOp

Defined in

wallet_lib.d.ts:116


GqlIssuedClaim

Ƭ GqlIssuedClaim: Object

Type declaration

NameType
contentGqlClaim
issuerValue

Defined in

wallet_lib.d.ts:122


GqlL2TransactionOutput

Ƭ GqlL2TransactionOutput: Object

Type declaration

NameType
claimsValue
errorstring | 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

NameType
l2_transactionL2TransactionDataInput
l2_txidL2Txid
network_feesCwebToken
to_broadcaster[CwebToken, TokenAmount] | null
wallet_feesCwebToken

Defined in

wallet_lib.d.ts:43


L2TransactionDataInput

Ƭ L2TransactionDataInput: unknown

Defined in

wallet_lib.d.ts:85


L2TransactionDataJson

Ƭ L2TransactionDataJson: Object

Type declaration

NameType
l2TransactionValue
networkNetworkName

Defined in

wallet_lib.d.ts:44


L2Txid

Ƭ L2Txid: string

Defined in

wallet_lib.d.ts:63


LiquidityPool

Ƭ LiquidityPool: Object

Type declaration

NameType
curve_kindCurve
idLiquidityPoolId
lp_tokenTokenHashId
token_a_amountTokenAmount
token_b_amountTokenAmount

Defined in

wallet_lib.d.ts:423


LiquidityPoolId

Ƭ LiquidityPoolId: { V0: LiquidityPoolIdV0 }

Defined in

wallet_lib.d.ts:415


LiquidityPoolIdV0

Ƭ LiquidityPoolIdV0: Object

Type declaration

NameType
token_aTokenHashId

Defined in

wallet_lib.d.ts:420


LoggingConfig

Ƭ LoggingConfig: Object

Type declaration

NameType
gqlboolean

Defined in

wallet_lib.d.ts:18


MinimalUnitsRatio

Ƭ MinimalUnitsRatio: Object

Type declaration

NameType
denominatorU256
numeratorU256
signSign

Defined in

wallet_lib.d.ts:427


MintToken

Ƭ MintToken: Object

Type declaration

NameType
tokenTokenHashId
token_amountTokenAmount

Defined in

wallet_lib.d.ts:470


MintableData

Ƭ MintableData: MintableDataUi

Defined in

wallet_lib.d.ts:89


MintableDataUi

Ƭ MintableDataUi: Object

Type declaration

NameType
mintersUser[]

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

NameType
hash_idTokenHashId
initial_token_supplyTokenAmount
issuance_typeIssuanceType
token_adminUser

Defined in

wallet_lib.d.ts:483


ProtocolFieldsUi

Ƭ ProtocolFieldsUi: Object

Type declaration

NameType
initial_token_supplyTokenAmount
issuance_typeIssuanceTypeUi
token_adminUser

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

NameType
recovery_idnumber
signatureSignature

Defined in

wallet_lib.d.ts:472


RemoveLiquidityPoolLiquidity

Ƭ RemoveLiquidityPoolLiquidity: Object

Type declaration

NameType
liquidity_poolLiquidityPoolId
lp_token_amountTokenAmount

Defined in

wallet_lib.d.ts:395


SellForToken

Ƭ SellForToken: Object

Type declaration

NameType
limit_token_b_amountTokenAmount
token_aTokenHashId
token_a_amountTokenAmount
token_bTokenHashId

Defined in

wallet_lib.d.ts:364


SellToken

Ƭ SellToken: Object

Type declaration

NameType
limit_cweb_amountCwebToken
tokenTokenHashId
token_amountTokenAmount

Defined in

wallet_lib.d.ts:352


SellViaCweb

Ƭ SellViaCweb: Object

Type declaration

NameType
cweb_amountCwebToken
limit_token_amountTokenAmount
tokenTokenHashId

Defined in

wallet_lib.d.ts:358


SendUiCommand

Ƭ SendUiCommand: Object

Type declaration

NameType
amountBigInt
destinationPubKey | null
memoUuid | null
token_refTokenHashId | null

Defined in

wallet_lib.d.ts:334


SignCallback

Ƭ SignCallback: (data: Uint8Array) => RecoverableSignature | Promise<RecoverableSignature>

Type declaration

▸ (data): RecoverableSignature | Promise<RecoverableSignature>

Parameters
NameType
dataUint8Array
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

NameType
idId
statusEmbedStatus
tx_hashId | null

Defined in

wallet_lib.d.ts:135


StoreUiCommand

Ƭ StoreUiCommand: Object

Type declaration

NameType
dataValue
keyValue

Defined in

wallet_lib.d.ts:337


SwapInfo

Ƭ SwapInfo: Object

Type declaration

NameType
amountTokenAmount
token_aTokenHashId
token_bTokenHashId

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

NameType
buy_priceDecimal | null
creatorUser | null
sell_priceDecimal | null

Defined in

wallet_lib.d.ts:539


TokenHashId

Ƭ TokenHashId: string

Defined in

wallet_lib.d.ts:65


TokenInformation

Ƭ TokenInformation: Object

Type declaration

NameType
creatorUser
liquidityTokenLiquidityInformation | null
tokenTokenHashId
total_supplyTokenAmount

Defined in

wallet_lib.d.ts:542


TokenLiquidityInformation

Ƭ TokenLiquidityInformation: Object

Type declaration

NameType
buy_priceDecimal
sell_priceDecimal

Defined in

wallet_lib.d.ts:545


TokenMsg

Ƭ TokenMsg: Object

Type declaration

NameType
cmdTokenUiCommand
on_failureContractCall | null
on_successContractCall | null

Defined in

wallet_lib.d.ts:399


TokenPrice

Ƭ TokenPrice: Object

Type declaration

NameType
avgDecimal
buyDecimal
sellDecimal

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

NameType
initial_balanceTokenAmount
max_capacityTokenAmount
refill_amountTokenAmount
refill_intervalTimestamp
start_saleTimestamp

Defined in

wallet_lib.d.ts:455


TokenRateLimiterState

Ƭ TokenRateLimiterState: Object

Type declaration

NameType
last_updateTimestamp
max_capacityTokenAmount
prev_balanceTokenAmount
refill_amountTokenAmount
refill_intervalTimestamp

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

NameType
embedding_idL2Txid | null
errorWalletError | null
idL2Txid
input_idSigningTxInputId
l1_tx_hashTxHash | null
memoUuid | null
next_state_timeout_awaiterBlockAwaiter | null
shard_to_execute_onNetworkName
shard_to_write_onNetworkName
statusTransactionStatus
ui_commandUiCommand
user_op_block_anchorBlockAnchorInput | null
user_opsUserOperation[]

Defined in

wallet_lib.d.ts:16


TransferToken

Ƭ TransferToken: Object

Type declaration

NameType
amountTokenAmount
auto_limit_sell_tokenCwebToken | null
memoUuid | null
receiverUser | null
tokenTokenHashId

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

NameType
curve_buyFormula
curve_sellFormula
domainCwebToken
extra_fieldsExtraFields
initial_cwebCwebToken
memoUuid | null
rate_limiter_paramsTokenRateLimiterParameters | null
tokenTokenHashId

Defined in

wallet_lib.d.ts:458


UpdateLiquidityPoolCurve

Ƭ UpdateLiquidityPoolCurve: Object

Type declaration

NameType
curveCurve
liquidity_poolLiquidityPoolId

Defined in

wallet_lib.d.ts:381


UpdateToken

Ƭ UpdateToken: Object

Type declaration

NameType
extra_fieldsExtraFields
memoUuid | null
tokenTokenHashId

Defined in

wallet_lib.d.ts:467


Url

Ƭ Url: string

Defined in

wallet_lib.d.ts:56


User

Ƭ User: Object

Type declaration

NameType
authContractId
payloadOrdJson

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

NameType
has_next_pageboolean
operationsUserOperation[]
page_anchorUserOperationsPageAnchor

Defined in

wallet_lib.d.ts:112


UserOperationsPageAnchor

Ƭ UserOperationsPageAnchor: Object

Type declaration

NameType
offsetnumber

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

NameType
addressstring
enable_retriesboolean | null
max_retry_time_secsnumber | null
pub_keyPubKey
shardNetworkName | null
sign_callbackSignCallback
ws_addressstring

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

NameType
bonding_curve_infoBondingCurveInfo
mintersUser[]

Defined in

wallet_lib.d.ts:506


WithNonMintableBondingCurveData

Ƭ WithNonMintableBondingCurveData: Object

Type declaration

NameType
bonding_curve_infoBondingCurveInfo

Defined in

wallet_lib.d.ts:503


WithdrawCweb

Ƭ WithdrawCweb: Object

Type declaration

NameType
cweb_amountCwebToken
tokenTokenHashId

Defined in

wallet_lib.d.ts:370


WithdrawTokens

Ƭ WithdrawTokens: Object

Type declaration

NameType
amountTokenAmount
tokenTokenHashId

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

NameType
tx_monitorTransactionMonitor
txunknown

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

NameType
tx_monitorTransactionMonitor

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

NameType
walletWallet
commandSendUiCommand
shard_to_write_onnull | 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

NameType
walletWallet
commandTokenUiCommand
shard_to_write_onnull | 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

NameType
walletWallet
commandUiCommand
shard_to_write_onnull | 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

NameType
walletWallet
commandsUiCommand[]
shard_to_write_onnull | NetworkName

Returns

Promise<L2TransactionData>

Defined in

wallet_lib.d.ts:293


connect_to_node

connect_to_node(address): NodeConnection

Parameters

NameType
addressstring

Returns

NodeConnection

Defined in

wallet_lib.d.ts:146


create_basic_user

create_basic_user(pubkey): User

The black-box representation of the User

Parameters

NameType
pubkeystring

Returns

User

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

NameType
pending_txsTransaction[]
utxosMap<string, unknown[]>

Returns

TransactionMonitor

Defined in

wallet_lib.d.ts:168


create_wallet

create_wallet(config): Promise<Wallet>

Parameters

NameType
configWalletConfig

Returns

Promise<Wallet>

Defined in

wallet_lib.d.ts:141


embed

embed(wallet, data): Promise<Id>

Prepare L1 transaction and execute it

Parameters

NameType
walletWallet
dataunknown

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

NameType
walletWallet
idsstring[]

Returns

Promise<StatusResult[]>

Defined in

wallet_lib.d.ts:236


enable_logging

enable_logging(logging_config): void

Enables/disables logging

Parameters

NameType
logging_configLoggingConfig

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

NameType
connectionNodeConnection
queriesOnChainQuery[]
networkNetworkName
load_all_pagesBoolean

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

NameType
connectionNodeConnection
filtersGqlClaimFilter[]
networkNetworkName
load_all_pagesBoolean

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

NameType
walletWallet

Returns

Promise<void>

Defined in

wallet_lib.d.ts:152


from_hex_string

from_hex_string(str): Uint8Array

Parameters

NameType
strstring

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

NameType
tx_monitorTransactionMonitor

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

NameType
tx_monitorTransactionMonitor

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

NameType
tx_monitorTransactionMonitor

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

NameType
tx_monitorTransactionMonitor

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

NameType
tx_monitorTransactionMonitor

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

NameType
walletWallet

Returns

Promise<NetworkName[]>

Defined in

wallet_lib.d.ts:299


get_subscription_claim_filters

get_subscription_claim_filters(wallet): GqlClaimFilter[]

Parameters

NameType
walletWallet

Returns

GqlClaimFilter[]

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

NameType
walletWallet
token_refnull | 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

NameType
tx_monitorTransactionMonitor
idstring

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

NameType
walletWallet

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

NameType
walletWallet

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

NameType
walletWallet
page_anchornull | 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

NameType
walletWallet
token_refnull | string
page_anchornull | UserOperationsPageAnchor

Returns

Promise<UserOperationsPage>

Defined in

wallet_lib.d.ts:316


get_user_pub_key

get_user_pub_key(user): PubKey | null

Parameters

NameType
userUser

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

NameType
tx_monitorTransactionMonitor
input_idstring

Returns

Promise<PaymentUtxoInfo[]>

Defined in

wallet_lib.d.ts:193


parse_cweb_address

parse_cweb_address(str): CwebAddress

Parameters

NameType
strstring

Returns

CwebAddress

Defined in

wallet_lib.d.ts:249


process_db_write_op

process_db_write_op(wallet, db_write_op): Promise<void>

Parameters

NameType
walletWallet
db_write_opGqlDbWriteOpInfo

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

NameType
walletWallet
queriesOnChainQuery[]

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

NameType
tx_monitorTransactionMonitor
idstring

Returns

Promise<void>

Defined in

wallet_lib.d.ts:204


sign

sign(secret_key, message): RecoverableSignature

Parameters

NameTypeDescription
secret_keyUint8Array
messageUint8Arrayis 32 bytes of hashed data to sign

Returns

RecoverableSignature

Defined in

wallet_lib.d.ts:243


sign_l2_tx

sign_l2_tx(wallet, tx): Promise<string>

Parameters

NameType
walletWallet
txstring

Returns

Promise<string>

Defined in

wallet_lib.d.ts:245


simulate_tx

simulate_tx(wallet, tx): Promise<GqlL2TransactionOutput>

Parameters

NameType
walletWallet
txL2TransactionDataJson

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

NameType
walletWallet

Returns

Promise<void>

Defined in

wallet_lib.d.ts:160


to_hex_string

to_hex_string(bytes): string

Parameters

NameType
bytesUint8Array

Returns

string

Defined in

wallet_lib.d.ts:15