Skip to content

Files

Latest commit

 

History

History

docs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

@rocklabs-io/icns-js

Table of contents

Type aliases

Interfaces

Classes

Namespaces

Functions

Type aliases

Address

Ƭ Address: Object

Type declaration

Name Type
V001 AddressV1

BidState

Ƭ BidState: { win: null } | { lost: null } | { processing: null }


Operation

Ƭ Operation: { transferFrom: null } | { burn: null } | { mint: null } | { approve: null } | { transfer: null }


Result

Ƭ Result: { Ok: null } | { Err: string }


TxReceipt

Ƭ TxReceipt: { ok: bigint } | { err: string }

Functions

VerifyDomainName

VerifyDomainName(domain): boolean

Parameters

Name Type
domain undefined | string

Returns

boolean


addIcpSuffix

addIcpSuffix(name): string

Parameters

Name Type
name undefined | string

Returns

string


formatAmount

formatAmount(amount): string

Formats an amount to a small string with scientific notation

Parameters

Name Type
amount string

Returns

string


getCrc32

getCrc32(buf): number

Calculate the CRC32 of an ArrayBufferLike.

Parameters

Name Type Description
buf any The BufferLike to calculate the CRC32 of.

Returns

number


getDeadline

getDeadline(): bigint

Get deadline for swap canister requests.

Returns

bigint


removeIcpSuffix

removeIcpSuffix(name): string

Parameters

Name Type
name undefined | string

Returns

string


toBigNumber

toBigNumber(num?, options?): BigNumber

Converts a value to a BigNumber.

Parameters

Name Type Description
num? Number Represents number value.
options? ToBigNumberOptions Represents value options.

Returns

BigNumber


toExponential

toExponential(decimals): BigNumber

Create an exponential notation by given decimals.

Parameters

Name Type
decimals Number

Returns

BigNumber


verifyAccountId

verifyAccountId(hexString): boolean

Parameters

Name Type
hexString string

Returns

boolean