Skip to main content

@unicrowio/sdk

Namespaces

Enumerations

Interfaces

Type Aliases

CalculateFunction

Ƭ CalculateFunction: CalculateAmountsInput

Defined in

typing/index.ts:1372


IReleasedTransactionPayload

Ƭ IReleasedTransactionPayload: ReleaseParsedPayload

Defined in

typing/index.ts:674


tConnectedUser

Ƭ tConnectedUser: "buyer" | "seller" | "arbitrator" | "marketplace" | "other"

Defined in

typing/index.ts:880


tEscrowParty

Ƭ tEscrowParty: "buyer" | "seller" | null

Defined in

typing/index.ts:70

Variables

NETWORK

Const NETWORK: Object

Index signature

▪ [name: string]: UnicrowNetwork

Defined in

config/setup.ts:3

Functions

config

config(options?): void

Sets the target network for all subsequent SDK calls. This is mandatory to call after importing the SDK. Networks and chain IDs currently available:

  • 42161 - Arbitrum One
  • 421614 - Arbitrum Sepolia
  • 8453 - Base
  • 8453 - Base Sepolia

Parameters

NameTypeDefault valueDescription
optionsObject{}Configuration options
options.autoSwitchNetwork?booleantrueIf the user is connected to a different network when a call is about to be performed, ask the user to change to that network (or add it if the user doesn't have it configured)
options.chainId?BigIntundefinedChain ID of one of Unicrow's supported networks (see above)

Returns

void

Example

unicrowSDK.config({
chainId = BigInt(42161),
autoSwitchNetwork: true
})

Defined in

config/setup.ts:105


getContractAddress

getContractAddress(role): string

Parameters

NameType
roleRole

Returns

string

Defined in

config/getContractAddress.ts:3