Domain.ts
This module provides the agnostic promise-based public client.
Added in v0.4.0
constructors
Section titled “constructors”Erc20Address
Section titled “Erc20Address”Signature
export declare const Erc20Address: Brand.Brand.Constructor<Erc20Address>Added in v0.4.0
IbcCoreAddress
Section titled “IbcCoreAddress”Signature
export declare const IbcCoreAddress: Brand.Brand.Constructor<IbcCoreAddress>Added in v0.4.0
LightClientAddress
Section titled “LightClientAddress”Signature
export declare const LightClientAddress: Brand.Brand.Constructor<LightClientAddress>Added in v0.4.0
Nullifier
Section titled “Nullifier”Signature
export declare const Nullifier: Brand.Brand.Constructor<Nullifier>Added in v0.4.0
PaymentKey
Section titled “PaymentKey”Signature
export declare const PaymentKey: Brand.Brand.Constructor<PaymentKey>Added in v0.4.0
PreparedRequest
Section titled “PreparedRequest”Signature
export declare const PreparedRequest: { readonly PreparedEvm: Data.Case.Constructor< { readonly _tag: "PreparedEvm" readonly kind: "Erc20.Approve" | "Erc20.Wrap" | "ZAsset.Transfer" | "LoopbackClient.Update" readonly universalChainId: UniversalChainId readonly contractAddress: Erc20Address readonly abi: Viem.Abi readonly functionName: string readonly args: ReadonlyArray<unknown> }, "_tag" > readonly $is: <Tag>( tag: Tag ) => ( u: unknown ) => u is Extract< { readonly _tag: "PreparedEvm" readonly kind: "Erc20.Approve" | "Erc20.Wrap" | "ZAsset.Transfer" | "LoopbackClient.Update" readonly universalChainId: UniversalChainId readonly contractAddress: Erc20Address readonly abi: Viem.Abi readonly functionName: string readonly args: ReadonlyArray<unknown> }, { readonly _tag: Tag } > readonly $match: { <Cases>( cases: Cases & { [K in Exclude<keyof Cases, "PreparedEvm">]: never } ): (value: { readonly _tag: "PreparedEvm" readonly kind: "Erc20.Approve" | "Erc20.Wrap" | "ZAsset.Transfer" | "LoopbackClient.Update" readonly universalChainId: UniversalChainId readonly contractAddress: Erc20Address readonly abi: Viem.Abi readonly functionName: string readonly args: ReadonlyArray<unknown> }) => Unify<ReturnType<Cases["PreparedEvm"]>> <Cases>( value: { readonly _tag: "PreparedEvm" readonly kind: "Erc20.Approve" | "Erc20.Wrap" | "ZAsset.Transfer" | "LoopbackClient.Update" readonly universalChainId: UniversalChainId readonly contractAddress: Erc20Address readonly abi: Viem.Abi readonly functionName: string readonly args: ReadonlyArray<unknown> }, cases: Cases & { [K in Exclude<keyof Cases, "PreparedEvm">]: never } ): Unify<ReturnType<Cases["PreparedEvm"]>> }}Added in v0.4.0
SignedRequest
Section titled “SignedRequest”Signature
export declare const SignedRequest: { readonly SignedEvm: Data.Case.Constructor< { readonly _tag: "SignedEvm"; readonly value: Viem.SignTransactionReturnType }, "_tag" > readonly $is: <Tag>( tag: Tag ) => ( u: unknown ) => u is Extract< { readonly _tag: "SignedEvm"; readonly value: Viem.SignTransactionReturnType }, { readonly _tag: Tag } > readonly $match: { <Cases>( cases: Cases & { [K in Exclude<keyof Cases, "SignedEvm">]: never } ): (value: { readonly _tag: "SignedEvm" readonly value: Viem.SignTransactionReturnType }) => Unify<ReturnType<Cases["SignedEvm"]>> <Cases>( value: { readonly _tag: "SignedEvm"; readonly value: Viem.SignTransactionReturnType }, cases: Cases & { [K in Exclude<keyof Cases, "SignedEvm">]: never } ): Unify<ReturnType<Cases["SignedEvm"]>> }}Added in v0.4.0
SubmissionResult
Section titled “SubmissionResult”Signature
export declare const SubmissionResult: { readonly SubmissionEvm: Data.Case.Constructor<{ readonly _tag: "SubmissionEvm"; readonly hash: TxHash }, "_tag"> readonly $is: <Tag>( tag: Tag ) => (u: unknown) => u is Extract<{ readonly _tag: "SubmissionEvm"; readonly hash: TxHash }, { readonly _tag: Tag }> readonly $match: { <Cases>( cases: Cases & { [K in Exclude<keyof Cases, "SubmissionEvm">]: never } ): (value: { readonly _tag: "SubmissionEvm"; readonly hash: TxHash }) => Unify<ReturnType<Cases["SubmissionEvm"]>> <Cases>( value: { readonly _tag: "SubmissionEvm"; readonly hash: TxHash }, cases: Cases & { [K in Exclude<keyof Cases, "SubmissionEvm">]: never } ): Unify<ReturnType<Cases["SubmissionEvm"]>> }}Added in v0.4.0
TxHash
Section titled “TxHash”Signature
export declare const TxHash: Brand.Brand.Constructor<TxHash>Added in v0.4.0
ZAssetAddress
Section titled “ZAssetAddress”Signature
export declare const ZAssetAddress: Brand.Brand.Constructor<ZAssetAddress>Added in v0.4.0
models
Section titled “models”CounterpartyInfo
Section titled “CounterpartyInfo”Signature
export declare const CounterpartyInfo: S.Struct<{ tokenAddressKey: S.TemplateLiteral<`0x${string}`> balanceSlot: S.TemplateLiteral<`0x${string}`>}>Added in v0.4.0
CounterpartyInfo (type alias)
Section titled “CounterpartyInfo (type alias)”Signature
export type CounterpartyInfo = typeof CounterpartyInfo.TypeAdded in v0.4.0
CustomContractCall (interface)
Section titled “CustomContractCall (interface)”A custom contract call for use with toBatchCalls.
Signature
export interface CustomContractCall { /** Contract address to call */ to: `0x${string}` /** Contract ABI */ abi: Viem.Abi | readonly unknown[] /** Function to call */ functionName: string /** Function arguments */ args: readonly unknown[]}Added in v0.4.0
Erc20Address (type alias)
Section titled “Erc20Address (type alias)”Signature
export type Erc20Address = `0x${string}` & Brand.Brand<"Erc20Address">Added in v0.4.0
IbcCoreAddress (type alias)
Section titled “IbcCoreAddress (type alias)”Signature
export type IbcCoreAddress = `0x${string}` & Brand.Brand<"IbcCoreAddress">Added in v0.4.0
LightClientAddress (type alias)
Section titled “LightClientAddress (type alias)”Signature
export type LightClientAddress = `0x${string}` & Brand.Brand<"LightClientAddress">Added in v0.4.0
Nullifier (type alias)
Section titled “Nullifier (type alias)”Signature
export type Nullifier = bigint & Brand.Brand<"Nullifier">Added in v0.4.0
PaymentKey (type alias)
Section titled “PaymentKey (type alias)”Signature
export type PaymentKey = `0x${string}` & Brand.Brand<"PaymentKey">Added in v0.4.0
PreparedRequest (type alias)
Section titled “PreparedRequest (type alias)”Signature
export type PreparedRequest = Data.TaggedEnum<{ PreparedEvm: { kind: "Erc20.Approve" | "Erc20.Wrap" | "ZAsset.Transfer" | "LoopbackClient.Update" universalChainId: UniversalChainId contractAddress: Erc20Address abi: Viem.Abi functionName: string args: ReadonlyArray<unknown> }}>Added in v0.4.0
PreparedRequests (type alias)
Section titled “PreparedRequests (type alias)”Signature
export type PreparedRequests = A.NonEmptyReadonlyArray<PreparedRequest>Added in v0.4.0
PreparedWrapRequests (type alias)
Section titled “PreparedWrapRequests (type alias)”Signature
export type PreparedWrapRequests = readonly [approve: PreparedRequest, wrap: PreparedRequest]Added in v0.4.0
RequestKind (type alias)
Section titled “RequestKind (type alias)”Signature
export type RequestKind = "approval" | "deposit" | "transfer"Added in v0.4.0
SignedRequest (type alias)
Section titled “SignedRequest (type alias)”Signature
export type SignedRequest = Data.TaggedEnum<{ SignedEvm: { value: Viem.SignTransactionReturnType }}>Added in v0.4.0
SubmissionResult (type alias)
Section titled “SubmissionResult (type alias)”Signature
export type SubmissionResult = Data.TaggedEnum<{ SubmissionEvm: { hash: TxHash }}>Added in v0.4.0
TxHash (type alias)
Section titled “TxHash (type alias)”Signature
export type TxHash = `0x${string}` & Brand.Brand<"TxHash">Added in v0.4.0
UniversalChainId
Section titled “UniversalChainId”Signature
export declare const UniversalChainId: S.brand<S.filter<typeof S.String>, "UniversalChainId">Added in v0.4.0
UniversalChainId (type alias)
Section titled “UniversalChainId (type alias)”Signature
export type UniversalChainId = typeof UniversalChainId.TypeAdded in v0.4.0
ZAssetAddress (type alias)
Section titled “ZAssetAddress (type alias)”Signature
export type ZAssetAddress = `0x${string}` & Brand.Brand<"ZAssetAddress">Added in v0.4.0