@stable-io/cctp-sdk-definitions
Version:
Definitions for the CCTP SDK
414 lines • 15.5 kB
TypeScript
import type { CustomizableBytes, DeriveType } from "binary-layout";
export declare const finalityThresholdItem: {
readonly binary: "uint";
readonly size: 4;
};
export declare const messageLayout: <const B extends CustomizableBytes = undefined, const R extends boolean = false>(messageBody?: B, useRawDomains?: R) => readonly [{
readonly binary: "uint";
readonly size: 4;
readonly custom: 1;
readonly omit: true;
readonly name: "version";
}, {
readonly name: "sourceDomain";
} & (R extends true ? {
readonly binary: "uint";
readonly size: 4;
} : {
readonly custom: {
to: (val: number) => keyof import("../../constants/index.js").AllDomains;
from: (val: keyof import("../../constants/index.js").AllDomains) => number;
};
readonly binary: "uint";
readonly size: 4;
}), {
readonly name: "destinationDomain";
} & (R extends true ? {
readonly binary: "uint";
readonly size: 4;
} : {
readonly custom: {
to: (val: number) => keyof import("../../constants/index.js").AllDomains;
from: (val: keyof import("../../constants/index.js").AllDomains) => number;
};
readonly binary: "uint";
readonly size: 4;
}), {
readonly name: "nonce";
} & {
readonly binary: "bytes";
readonly size: 32;
}, {
readonly binary: "bytes";
readonly size: import("@stable-io/utils").Size;
readonly custom: {
to: (encoded: Uint8Array) => import("../../address.js").UniversalAddress;
from: (addr: import("../../address.js").UniversalAddress) => Uint8Array<ArrayBufferLike>;
};
readonly name: "sender";
}, {
readonly binary: "bytes";
readonly size: import("@stable-io/utils").Size;
readonly custom: {
to: (encoded: Uint8Array) => import("../../address.js").UniversalAddress;
from: (addr: import("../../address.js").UniversalAddress) => Uint8Array<ArrayBufferLike>;
};
readonly name: "recipient";
}, {
readonly binary: "bytes";
readonly size: import("@stable-io/utils").Size;
readonly custom: {
to: (encoded: Uint8Array) => import("../../address.js").UniversalAddress;
from: (addr: import("../../address.js").UniversalAddress) => Uint8Array<ArrayBufferLike>;
};
readonly name: "destinationCaller";
}, {
readonly binary: "uint";
readonly size: 4;
readonly name: "minFinalityThreshold";
}, {
readonly binary: "uint";
readonly size: 4;
readonly name: "finalityThresholdExecuted";
}, import("binary-layout").CustomizableBytesReturn<{
readonly name: "messageBody";
}, B>];
export type Message<B extends CustomizableBytes = undefined, R extends boolean = false> = DeriveType<ReturnType<typeof messageLayout<B, R>>>;
export declare const burnMessageBodyLayout: <const H extends CustomizableBytes = undefined>(hookData?: H) => readonly [{
readonly binary: "uint";
readonly size: 4;
readonly custom: 1;
readonly omit: boolean;
readonly name: "messageBodyVersion";
}, {
readonly binary: "bytes";
readonly size: import("@stable-io/utils").Size;
readonly custom: {
to: (encoded: Uint8Array) => import("../../address.js").UniversalAddress;
from: (addr: import("../../address.js").UniversalAddress) => Uint8Array<ArrayBufferLike>;
};
readonly name: "burnToken";
}, {
readonly binary: "bytes";
readonly size: import("@stable-io/utils").Size;
readonly custom: {
to: (encoded: Uint8Array) => import("../../address.js").UniversalAddress;
from: (addr: import("../../address.js").UniversalAddress) => Uint8Array<ArrayBufferLike>;
};
readonly name: "mintRecipient";
}, {
readonly binary: "uint";
readonly size: 32;
readonly custom: {
to: (val: bigint) => import("@stable-io/amount").Amount<{
readonly name: "Usdc";
readonly units: readonly [{
readonly symbol: "USDC";
readonly scale: 1;
}, {
readonly symbol: "µUSDC";
readonly scale: bigint | import("@stable-io/amount").Rational;
}];
readonly human: "USDC";
readonly atomic: "µUSDC";
readonly stringify: (val: import("@stable-io/amount").Rational) => string;
}>;
from: (amount: import("@stable-io/amount").Amount<{
readonly name: "Usdc";
readonly units: readonly [{
readonly symbol: "USDC";
readonly scale: 1;
}, {
readonly symbol: "µUSDC";
readonly scale: bigint | import("@stable-io/amount").Rational;
}];
readonly human: "USDC";
readonly atomic: "µUSDC";
readonly stringify: (val: import("@stable-io/amount").Rational) => string;
}>) => bigint;
};
readonly name: "amount";
}, {
readonly binary: "bytes";
readonly size: import("@stable-io/utils").Size;
readonly custom: {
to: (encoded: Uint8Array) => import("../../address.js").UniversalAddress;
from: (addr: import("../../address.js").UniversalAddress) => Uint8Array<ArrayBufferLike>;
};
readonly name: "messageSender";
}, {
readonly binary: "uint";
readonly size: 32;
readonly custom: {
to: (val: bigint) => import("@stable-io/amount").Amount<{
readonly name: "Usdc";
readonly units: readonly [{
readonly symbol: "USDC";
readonly scale: 1;
}, {
readonly symbol: "µUSDC";
readonly scale: bigint | import("@stable-io/amount").Rational;
}];
readonly human: "USDC";
readonly atomic: "µUSDC";
readonly stringify: (val: import("@stable-io/amount").Rational) => string;
}>;
from: (amount: import("@stable-io/amount").Amount<{
readonly name: "Usdc";
readonly units: readonly [{
readonly symbol: "USDC";
readonly scale: 1;
}, {
readonly symbol: "µUSDC";
readonly scale: bigint | import("@stable-io/amount").Rational;
}];
readonly human: "USDC";
readonly atomic: "µUSDC";
readonly stringify: (val: import("@stable-io/amount").Rational) => string;
}>) => bigint;
};
readonly name: "maxFee";
}, {
readonly binary: "uint";
readonly size: 32;
readonly custom: {
to: (val: bigint) => import("@stable-io/amount").Amount<{
readonly name: "Usdc";
readonly units: readonly [{
readonly symbol: "USDC";
readonly scale: 1;
}, {
readonly symbol: "µUSDC";
readonly scale: bigint | import("@stable-io/amount").Rational;
}];
readonly human: "USDC";
readonly atomic: "µUSDC";
readonly stringify: (val: import("@stable-io/amount").Rational) => string;
}>;
from: (amount: import("@stable-io/amount").Amount<{
readonly name: "Usdc";
readonly units: readonly [{
readonly symbol: "USDC";
readonly scale: 1;
}, {
readonly symbol: "µUSDC";
readonly scale: bigint | import("@stable-io/amount").Rational;
}];
readonly human: "USDC";
readonly atomic: "µUSDC";
readonly stringify: (val: import("@stable-io/amount").Rational) => string;
}>) => bigint;
};
readonly name: "feeExecuted";
}, {
readonly binary: "uint";
readonly size: 32;
readonly name: "expirationBlock";
}, import("binary-layout").CustomizableBytesReturn<{
readonly name: "hookData";
}, H>];
export type BurnMessageBody<H extends CustomizableBytes = undefined> = DeriveType<ReturnType<typeof burnMessageBodyLayout<H>>>;
export declare const burnMessageLayout: <const H extends CustomizableBytes = undefined, const R extends boolean = false>(hookData?: H, useRawDomains?: R) => readonly [{
readonly binary: "uint";
readonly size: 4;
readonly custom: 1;
readonly omit: true;
readonly name: "version";
}, {
readonly name: "sourceDomain";
} & (R extends true ? {
readonly binary: "uint";
readonly size: 4;
} : {
readonly custom: {
to: (val: number) => keyof import("../../constants/index.js").AllDomains;
from: (val: keyof import("../../constants/index.js").AllDomains) => number;
};
readonly binary: "uint";
readonly size: 4;
}), {
readonly name: "destinationDomain";
} & (R extends true ? {
readonly binary: "uint";
readonly size: 4;
} : {
readonly custom: {
to: (val: number) => keyof import("../../constants/index.js").AllDomains;
from: (val: keyof import("../../constants/index.js").AllDomains) => number;
};
readonly binary: "uint";
readonly size: 4;
}), {
readonly name: "nonce";
} & {
readonly binary: "bytes";
readonly size: 32;
}, {
readonly binary: "bytes";
readonly size: import("@stable-io/utils").Size;
readonly custom: {
to: (encoded: Uint8Array) => import("../../address.js").UniversalAddress;
from: (addr: import("../../address.js").UniversalAddress) => Uint8Array<ArrayBufferLike>;
};
readonly name: "sender";
}, {
readonly binary: "bytes";
readonly size: import("@stable-io/utils").Size;
readonly custom: {
to: (encoded: Uint8Array) => import("../../address.js").UniversalAddress;
from: (addr: import("../../address.js").UniversalAddress) => Uint8Array<ArrayBufferLike>;
};
readonly name: "recipient";
}, {
readonly binary: "bytes";
readonly size: import("@stable-io/utils").Size;
readonly custom: {
to: (encoded: Uint8Array) => import("../../address.js").UniversalAddress;
from: (addr: import("../../address.js").UniversalAddress) => Uint8Array<ArrayBufferLike>;
};
readonly name: "destinationCaller";
}, {
readonly binary: "uint";
readonly size: 4;
readonly name: "minFinalityThreshold";
}, {
readonly binary: "uint";
readonly size: 4;
readonly name: "finalityThresholdExecuted";
}, import("binary-layout").CustomizableBytesReturn<{
readonly name: "messageBody";
}, readonly [{
readonly binary: "uint";
readonly size: 4;
readonly custom: 1;
readonly omit: boolean;
readonly name: "messageBodyVersion";
}, {
readonly binary: "bytes";
readonly size: import("@stable-io/utils").Size;
readonly custom: {
to: (encoded: Uint8Array) => import("../../address.js").UniversalAddress;
from: (addr: import("../../address.js").UniversalAddress) => Uint8Array<ArrayBufferLike>;
};
readonly name: "burnToken";
}, {
readonly binary: "bytes";
readonly size: import("@stable-io/utils").Size;
readonly custom: {
to: (encoded: Uint8Array) => import("../../address.js").UniversalAddress;
from: (addr: import("../../address.js").UniversalAddress) => Uint8Array<ArrayBufferLike>;
};
readonly name: "mintRecipient";
}, {
readonly binary: "uint";
readonly size: 32;
readonly custom: {
to: (val: bigint) => import("@stable-io/amount").Amount<{
readonly name: "Usdc";
readonly units: readonly [{
readonly symbol: "USDC";
readonly scale: 1;
}, {
readonly symbol: "µUSDC";
readonly scale: bigint | import("@stable-io/amount").Rational;
}];
readonly human: "USDC";
readonly atomic: "µUSDC";
readonly stringify: (val: import("@stable-io/amount").Rational) => string;
}>;
from: (amount: import("@stable-io/amount").Amount<{
readonly name: "Usdc";
readonly units: readonly [{
readonly symbol: "USDC";
readonly scale: 1;
}, {
readonly symbol: "µUSDC";
readonly scale: bigint | import("@stable-io/amount").Rational;
}];
readonly human: "USDC";
readonly atomic: "µUSDC";
readonly stringify: (val: import("@stable-io/amount").Rational) => string;
}>) => bigint;
};
readonly name: "amount";
}, {
readonly binary: "bytes";
readonly size: import("@stable-io/utils").Size;
readonly custom: {
to: (encoded: Uint8Array) => import("../../address.js").UniversalAddress;
from: (addr: import("../../address.js").UniversalAddress) => Uint8Array<ArrayBufferLike>;
};
readonly name: "messageSender";
}, {
readonly binary: "uint";
readonly size: 32;
readonly custom: {
to: (val: bigint) => import("@stable-io/amount").Amount<{
readonly name: "Usdc";
readonly units: readonly [{
readonly symbol: "USDC";
readonly scale: 1;
}, {
readonly symbol: "µUSDC";
readonly scale: bigint | import("@stable-io/amount").Rational;
}];
readonly human: "USDC";
readonly atomic: "µUSDC";
readonly stringify: (val: import("@stable-io/amount").Rational) => string;
}>;
from: (amount: import("@stable-io/amount").Amount<{
readonly name: "Usdc";
readonly units: readonly [{
readonly symbol: "USDC";
readonly scale: 1;
}, {
readonly symbol: "µUSDC";
readonly scale: bigint | import("@stable-io/amount").Rational;
}];
readonly human: "USDC";
readonly atomic: "µUSDC";
readonly stringify: (val: import("@stable-io/amount").Rational) => string;
}>) => bigint;
};
readonly name: "maxFee";
}, {
readonly binary: "uint";
readonly size: 32;
readonly custom: {
to: (val: bigint) => import("@stable-io/amount").Amount<{
readonly name: "Usdc";
readonly units: readonly [{
readonly symbol: "USDC";
readonly scale: 1;
}, {
readonly symbol: "µUSDC";
readonly scale: bigint | import("@stable-io/amount").Rational;
}];
readonly human: "USDC";
readonly atomic: "µUSDC";
readonly stringify: (val: import("@stable-io/amount").Rational) => string;
}>;
from: (amount: import("@stable-io/amount").Amount<{
readonly name: "Usdc";
readonly units: readonly [{
readonly symbol: "USDC";
readonly scale: 1;
}, {
readonly symbol: "µUSDC";
readonly scale: bigint | import("@stable-io/amount").Rational;
}];
readonly human: "USDC";
readonly atomic: "µUSDC";
readonly stringify: (val: import("@stable-io/amount").Rational) => string;
}>) => bigint;
};
readonly name: "feeExecuted";
}, {
readonly binary: "uint";
readonly size: 32;
readonly name: "expirationBlock";
}, import("binary-layout").CustomizableBytesReturn<{
readonly name: "hookData";
}, H>]>];
export type BurnMessage<H extends CustomizableBytes = undefined, R extends boolean = false> = DeriveType<ReturnType<typeof burnMessageLayout<H, R>>>;
//# sourceMappingURL=messages.d.ts.map