@compass-labs/api-sdk 2.1.10-rc.2 → 2.1.10-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/commonjs/funcs/cctpCCTPBurn.d.ts +10 -4
- package/dist/commonjs/funcs/cctpCCTPBurn.d.ts.map +1 -1
- package/dist/commonjs/funcs/cctpCCTPBurn.js +10 -4
- package/dist/commonjs/funcs/cctpCCTPBurn.js.map +1 -1
- package/dist/commonjs/models/components/depositforburnrequest.d.ts +18 -5
- package/dist/commonjs/models/components/depositforburnrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/depositforburnrequest.js +12 -3
- package/dist/commonjs/models/components/depositforburnrequest.js.map +1 -1
- package/dist/commonjs/models/components/depositforburnresponse.d.ts +29 -0
- package/dist/commonjs/models/components/depositforburnresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/depositforburnresponse.js +15 -1
- package/dist/commonjs/models/components/depositforburnresponse.js.map +1 -1
- package/dist/commonjs/sdk/cctp.d.ts +10 -4
- package/dist/commonjs/sdk/cctp.d.ts.map +1 -1
- package/dist/commonjs/sdk/cctp.js +10 -4
- package/dist/commonjs/sdk/cctp.js.map +1 -1
- package/dist/esm/funcs/cctpCCTPBurn.d.ts +10 -4
- package/dist/esm/funcs/cctpCCTPBurn.d.ts.map +1 -1
- package/dist/esm/funcs/cctpCCTPBurn.js +10 -4
- package/dist/esm/funcs/cctpCCTPBurn.js.map +1 -1
- package/dist/esm/models/components/depositforburnrequest.d.ts +18 -5
- package/dist/esm/models/components/depositforburnrequest.d.ts.map +1 -1
- package/dist/esm/models/components/depositforburnrequest.js +11 -2
- package/dist/esm/models/components/depositforburnrequest.js.map +1 -1
- package/dist/esm/models/components/depositforburnresponse.d.ts +29 -0
- package/dist/esm/models/components/depositforburnresponse.d.ts.map +1 -1
- package/dist/esm/models/components/depositforburnresponse.js +14 -0
- package/dist/esm/models/components/depositforburnresponse.js.map +1 -1
- package/dist/esm/sdk/cctp.d.ts +10 -4
- package/dist/esm/sdk/cctp.d.ts.map +1 -1
- package/dist/esm/sdk/cctp.js +10 -4
- package/dist/esm/sdk/cctp.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/cctpCCTPBurn.ts +10 -4
- package/src/models/components/depositforburnrequest.ts +26 -7
- package/src/models/components/depositforburnresponse.ts +40 -0
- package/src/sdk/cctp.ts +10 -4
package/README.md
CHANGED
|
@@ -168,7 +168,7 @@ run();
|
|
|
168
168
|
|
|
169
169
|
### [cctp](docs/sdks/cctp/README.md)
|
|
170
170
|
|
|
171
|
-
* [cctpBurn](docs/sdks/cctp/README.md#cctpburn) - Build depositForBurn transaction for Earn Account
|
|
171
|
+
* [cctpBurn](docs/sdks/cctp/README.md#cctpburn) - Build depositForBurn transaction for Earn Account (CCTP V2)
|
|
172
172
|
* [cctpMint](docs/sdks/cctp/README.md#cctpmint) - Prepare mint transaction for Earn Account on destination chain
|
|
173
173
|
|
|
174
174
|
### [earn](docs/sdks/earn/README.md)
|
|
@@ -320,7 +320,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
320
320
|
- [`aerodromeSlipstreamAerodromeSlipstreamPoolPrice`](docs/sdks/aerodromeslipstream/README.md#aerodromeslipstreampoolprice) - Pool Price
|
|
321
321
|
- [`aerodromeSlipstreamAerodromeSlipstreamSwapBuyExactly`](docs/sdks/aerodromeslipstream/README.md#aerodromeslipstreamswapbuyexactly) - Swap - into Specified Amount
|
|
322
322
|
- [`aerodromeSlipstreamAerodromeSlipstreamSwapSellExactly`](docs/sdks/aerodromeslipstream/README.md#aerodromeslipstreamswapsellexactly) - Swap - from Specified Amount
|
|
323
|
-
- [`cctpCCTPBurn`](docs/sdks/cctp/README.md#cctpburn) - Build depositForBurn transaction for Earn Account
|
|
323
|
+
- [`cctpCCTPBurn`](docs/sdks/cctp/README.md#cctpburn) - Build depositForBurn transaction for Earn Account (CCTP V2)
|
|
324
324
|
- [`cctpCCTPMint`](docs/sdks/cctp/README.md#cctpmint) - Prepare mint transaction for Earn Account on destination chain
|
|
325
325
|
- [`earnEarnAaveTokenRates`](docs/sdks/earn/README.md#earnaavetokenrates) - Get token rates on Aave
|
|
326
326
|
- [`earnEarnCreateAccount`](docs/sdks/earn/README.md#earncreateaccount) - Create earn account
|
|
@@ -9,11 +9,17 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
|
9
9
|
import { APIPromise } from "../types/async.js";
|
|
10
10
|
import { Result } from "../types/fp.js";
|
|
11
11
|
/**
|
|
12
|
-
* Build depositForBurn transaction for Earn Account
|
|
12
|
+
* Build depositForBurn transaction for Earn Account (CCTP V2)
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Build a transaction to burn USDC from an Earn Account (Safe) on the source chain
|
|
16
|
-
* and initiate a cross-chain transfer via Circle's CCTP (Cross-Chain Transfer Protocol).
|
|
16
|
+
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
17
|
+
*
|
|
18
|
+
* **Transfer modes:**
|
|
19
|
+
* - `standard` (default): ~15-19 minute transfers, **free** (no fee)
|
|
20
|
+
* - `fast`: ~30 second transfers, requires a small fee (typically ~0.01%)
|
|
21
|
+
*
|
|
22
|
+
* The fee for fast mode is automatically calculated based on Circle's current rates.
|
|
17
23
|
*
|
|
18
24
|
* **Flow:**
|
|
19
25
|
* 1. Call this endpoint with `gas_sponsorship=false` to get an unsigned transaction,
|
|
@@ -21,7 +27,7 @@ import { Result } from "../types/fp.js";
|
|
|
21
27
|
* 2. Owner signs the transaction or typed data
|
|
22
28
|
* 3. Broadcast the transaction on the source chain (or submit to `/gas_sponsorship/prepare`)
|
|
23
29
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
24
|
-
* 5. Call the mint endpoint
|
|
30
|
+
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
25
31
|
*
|
|
26
32
|
* **Supported chains:**
|
|
27
33
|
* - Ethereum (domain 0)
|
|
@@ -29,7 +35,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
35
|
* - Base (domain 6)
|
|
30
36
|
*
|
|
31
37
|
* **Note:** The USDC must already be deposited in the Earn Account. If approval is needed
|
|
32
|
-
* for the
|
|
38
|
+
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
33
39
|
*
|
|
34
40
|
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
35
41
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cctpCCTPBurn.d.ts","sourceRoot":"","sources":["../../../src/funcs/cctpCCTPBurn.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC
|
|
1
|
+
{"version":3,"file":"cctpCCTPBurn.d.ts","sourceRoot":"","sources":["../../../src/funcs/cctpCCTPBurn.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,sBAAsB,EAC/B,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -47,11 +47,17 @@ const components = __importStar(require("../models/components/index.js"));
|
|
|
47
47
|
const errors = __importStar(require("../models/errors/index.js"));
|
|
48
48
|
const async_js_1 = require("../types/async.js");
|
|
49
49
|
/**
|
|
50
|
-
* Build depositForBurn transaction for Earn Account
|
|
50
|
+
* Build depositForBurn transaction for Earn Account (CCTP V2)
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
53
|
* Build a transaction to burn USDC from an Earn Account (Safe) on the source chain
|
|
54
|
-
* and initiate a cross-chain transfer via Circle's CCTP (Cross-Chain Transfer Protocol).
|
|
54
|
+
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
55
|
+
*
|
|
56
|
+
* **Transfer modes:**
|
|
57
|
+
* - `standard` (default): ~15-19 minute transfers, **free** (no fee)
|
|
58
|
+
* - `fast`: ~30 second transfers, requires a small fee (typically ~0.01%)
|
|
59
|
+
*
|
|
60
|
+
* The fee for fast mode is automatically calculated based on Circle's current rates.
|
|
55
61
|
*
|
|
56
62
|
* **Flow:**
|
|
57
63
|
* 1. Call this endpoint with `gas_sponsorship=false` to get an unsigned transaction,
|
|
@@ -59,7 +65,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
59
65
|
* 2. Owner signs the transaction or typed data
|
|
60
66
|
* 3. Broadcast the transaction on the source chain (or submit to `/gas_sponsorship/prepare`)
|
|
61
67
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
62
|
-
* 5. Call the mint endpoint
|
|
68
|
+
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
63
69
|
*
|
|
64
70
|
* **Supported chains:**
|
|
65
71
|
* - Ethereum (domain 0)
|
|
@@ -67,7 +73,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
67
73
|
* - Base (domain 6)
|
|
68
74
|
*
|
|
69
75
|
* **Note:** The USDC must already be deposited in the Earn Account. If approval is needed
|
|
70
|
-
* for the
|
|
76
|
+
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
71
77
|
*
|
|
72
78
|
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
73
79
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cctpCCTPBurn.js","sourceRoot":"","sources":["../../../src/funcs/cctpCCTPBurn.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"cctpCCTPBurn.js","sourceRoot":"","sources":["../../../src/funcs/cctpCCTPBurn.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDH,o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
29
29
|
*/
|
|
30
30
|
export type DestinationChain = ClosedEnum<typeof DestinationChain>;
|
|
31
|
+
/**
|
|
32
|
+
* Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'.
|
|
33
|
+
*/
|
|
34
|
+
export declare const DepositForBurnRequestTransferMode: {
|
|
35
|
+
readonly Fast: "fast";
|
|
36
|
+
readonly Standard: "standard";
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'.
|
|
40
|
+
*/
|
|
41
|
+
export type DepositForBurnRequestTransferMode = ClosedEnum<typeof DepositForBurnRequestTransferMode>;
|
|
31
42
|
/**
|
|
32
43
|
* Request model for CCTP depositForBurn transaction from a smart account.
|
|
33
44
|
*
|
|
@@ -63,14 +74,14 @@ export type DepositForBurnRequest = {
|
|
|
63
74
|
* The destination chain where USDC will be minted.
|
|
64
75
|
*/
|
|
65
76
|
destinationChain: DestinationChain;
|
|
66
|
-
/**
|
|
67
|
-
* The recipient address on the destination chain.
|
|
68
|
-
*/
|
|
69
|
-
destinationAddress: string;
|
|
70
77
|
/**
|
|
71
78
|
* Optionally request gas sponsorship. If set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
72
79
|
*/
|
|
73
80
|
gasSponsorship?: boolean | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'.
|
|
83
|
+
*/
|
|
84
|
+
transferMode?: DepositForBurnRequestTransferMode | undefined;
|
|
74
85
|
};
|
|
75
86
|
/** @internal */
|
|
76
87
|
export declare const DepositForBurnRequestChain$outboundSchema: z.ZodNativeEnum<typeof DepositForBurnRequestChain>;
|
|
@@ -82,13 +93,15 @@ export declare function depositForBurnRequestAmountToJSON(depositForBurnRequestA
|
|
|
82
93
|
/** @internal */
|
|
83
94
|
export declare const DestinationChain$outboundSchema: z.ZodNativeEnum<typeof DestinationChain>;
|
|
84
95
|
/** @internal */
|
|
96
|
+
export declare const DepositForBurnRequestTransferMode$outboundSchema: z.ZodNativeEnum<typeof DepositForBurnRequestTransferMode>;
|
|
97
|
+
/** @internal */
|
|
85
98
|
export type DepositForBurnRequest$Outbound = {
|
|
86
99
|
owner: string;
|
|
87
100
|
chain: string;
|
|
88
101
|
amount: number | string;
|
|
89
102
|
destination_chain: string;
|
|
90
|
-
destination_address: string;
|
|
91
103
|
gas_sponsorship?: boolean | undefined;
|
|
104
|
+
transfer_mode?: string | undefined;
|
|
92
105
|
};
|
|
93
106
|
/** @internal */
|
|
94
107
|
export declare const DepositForBurnRequest$outboundSchema: z.ZodType<DepositForBurnRequest$Outbound, z.ZodTypeDef, DepositForBurnRequest>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depositforburnrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/depositforburnrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;CAI7B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,UAAU,CACjD,OAAO,0BAA0B,CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEnE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,0BAA0B,CAAC;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,gBAAgB,EAAE,gBAAgB,CAAC;IACnC;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"depositforburnrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/depositforburnrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;CAI7B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,UAAU,CACjD,OAAO,0BAA0B,CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;CAGpC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,UAAU,CACxD,OAAO,iCAAiC,CACzC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,0BAA0B,CAAC;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,gBAAgB,EAAE,gBAAgB,CAAC;IACnC;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,C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
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.DepositForBurnRequest$outboundSchema = exports.DestinationChain$outboundSchema = exports.DepositForBurnRequestAmount$outboundSchema = exports.DepositForBurnRequestChain$outboundSchema = exports.DestinationChain = exports.DepositForBurnRequestChain = void 0;
|
|
39
|
+
exports.DepositForBurnRequest$outboundSchema = exports.DepositForBurnRequestTransferMode$outboundSchema = exports.DestinationChain$outboundSchema = exports.DepositForBurnRequestAmount$outboundSchema = exports.DepositForBurnRequestChain$outboundSchema = exports.DepositForBurnRequestTransferMode = exports.DestinationChain = exports.DepositForBurnRequestChain = void 0;
|
|
40
40
|
exports.depositForBurnRequestAmountToJSON = depositForBurnRequestAmountToJSON;
|
|
41
41
|
exports.depositForBurnRequestToJSON = depositForBurnRequestToJSON;
|
|
42
42
|
const z = __importStar(require("zod/v3"));
|
|
@@ -57,6 +57,13 @@ exports.DestinationChain = {
|
|
|
57
57
|
Arbitrum: "arbitrum",
|
|
58
58
|
Base: "base",
|
|
59
59
|
};
|
|
60
|
+
/**
|
|
61
|
+
* Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'.
|
|
62
|
+
*/
|
|
63
|
+
exports.DepositForBurnRequestTransferMode = {
|
|
64
|
+
Fast: "fast",
|
|
65
|
+
Standard: "standard",
|
|
66
|
+
};
|
|
60
67
|
/** @internal */
|
|
61
68
|
exports.DepositForBurnRequestChain$outboundSchema = z.nativeEnum(exports.DepositForBurnRequestChain);
|
|
62
69
|
/** @internal */
|
|
@@ -67,18 +74,20 @@ function depositForBurnRequestAmountToJSON(depositForBurnRequestAmount) {
|
|
|
67
74
|
/** @internal */
|
|
68
75
|
exports.DestinationChain$outboundSchema = z.nativeEnum(exports.DestinationChain);
|
|
69
76
|
/** @internal */
|
|
77
|
+
exports.DepositForBurnRequestTransferMode$outboundSchema = z.nativeEnum(exports.DepositForBurnRequestTransferMode);
|
|
78
|
+
/** @internal */
|
|
70
79
|
exports.DepositForBurnRequest$outboundSchema = z.object({
|
|
71
80
|
owner: z.string(),
|
|
72
81
|
chain: exports.DepositForBurnRequestChain$outboundSchema,
|
|
73
82
|
amount: z.union([z.number(), z.string()]),
|
|
74
83
|
destinationChain: exports.DestinationChain$outboundSchema,
|
|
75
|
-
destinationAddress: z.string(),
|
|
76
84
|
gasSponsorship: z.boolean().optional(),
|
|
85
|
+
transferMode: exports.DepositForBurnRequestTransferMode$outboundSchema.optional(),
|
|
77
86
|
}).transform((v) => {
|
|
78
87
|
return (0, primitives_js_1.remap)(v, {
|
|
79
88
|
destinationChain: "destination_chain",
|
|
80
|
-
destinationAddress: "destination_address",
|
|
81
89
|
gasSponsorship: "gas_sponsorship",
|
|
90
|
+
transferMode: "transfer_mode",
|
|
82
91
|
});
|
|
83
92
|
});
|
|
84
93
|
function depositForBurnRequestToJSON(depositForBurnRequest) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depositforburnrequest.js","sourceRoot":"","sources":["../../../../src/models/components/depositforburnrequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"depositforburnrequest.js","sourceRoot":"","sources":["../../../../src/models/components/depositforburnrequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiHH,8EAQC;AA0CD,kEAMC;AAvKD,0CAA4B;AAC5B,2DAA0D;AAG1D;;GAEG;AACU,QAAA,0BAA0B,GAAG;IACxC,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACJ,CAAC;AAaX;;GAEG;AACU,QAAA,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACJ,CAAC;AAMX;;GAEG;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EH,SAAgB,2BAA2B,CACzC,qBAA4C;IAE5C,OAAO,IAAI,CAAC,SAAS,CACnB,4CAAoC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAClE,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
5
|
import { BatchedSafeOperationsResponseOutput } from "./batchedsafeoperationsresponseoutput.js";
|
|
5
6
|
import { UnsignedTransaction } from "./unsignedtransaction.js";
|
|
7
|
+
/**
|
|
8
|
+
* The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min).
|
|
9
|
+
*/
|
|
10
|
+
export declare const DepositForBurnResponseTransferMode: {
|
|
11
|
+
readonly Fast: "fast";
|
|
12
|
+
readonly Standard: "standard";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min).
|
|
16
|
+
*/
|
|
17
|
+
export type DepositForBurnResponseTransferMode = ClosedEnum<typeof DepositForBurnResponseTransferMode>;
|
|
6
18
|
/**
|
|
7
19
|
* Response model for CCTP depositForBurn transaction from a smart account.
|
|
8
20
|
*
|
|
@@ -22,6 +34,9 @@ import { UnsignedTransaction } from "./unsignedtransaction.js";
|
|
|
22
34
|
* eip_712: EIP-712 typed data for off-chain signing. The owner signs this
|
|
23
35
|
* data and submits it to /gas_sponsorship/prepare for a relayer to execute.
|
|
24
36
|
* Present when gas_sponsorship=True.
|
|
37
|
+
* transfer_mode: The transfer speed mode used for this bridge operation.
|
|
38
|
+
* fee: Fee amount in USDC (only charged for fast mode, None for standard).
|
|
39
|
+
* estimated_time_seconds: Estimated time to complete the bridge in seconds.
|
|
25
40
|
*/
|
|
26
41
|
export type DepositForBurnResponse = {
|
|
27
42
|
/**
|
|
@@ -30,8 +45,22 @@ export type DepositForBurnResponse = {
|
|
|
30
45
|
bridgeId?: string | null | undefined;
|
|
31
46
|
transaction: UnsignedTransaction | null;
|
|
32
47
|
eip712: BatchedSafeOperationsResponseOutput | null;
|
|
48
|
+
/**
|
|
49
|
+
* The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min).
|
|
50
|
+
*/
|
|
51
|
+
transferMode: DepositForBurnResponseTransferMode;
|
|
52
|
+
/**
|
|
53
|
+
* Fee amount in USDC charged for this transfer. Only present for fast mode. Standard mode transfers are free (fee is None or 0).
|
|
54
|
+
*/
|
|
55
|
+
fee?: string | null | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Estimated time to complete the bridge in seconds.
|
|
58
|
+
*/
|
|
59
|
+
estimatedTimeSeconds: number;
|
|
33
60
|
};
|
|
34
61
|
/** @internal */
|
|
62
|
+
export declare const DepositForBurnResponseTransferMode$inboundSchema: z.ZodNativeEnum<typeof DepositForBurnResponseTransferMode>;
|
|
63
|
+
/** @internal */
|
|
35
64
|
export declare const DepositForBurnResponse$inboundSchema: z.ZodType<DepositForBurnResponse, z.ZodTypeDef, unknown>;
|
|
36
65
|
export declare function depositForBurnResponseFromJSON(jsonString: string): SafeParseResult<DepositForBurnResponse, SDKValidationError>;
|
|
37
66
|
//# sourceMappingURL=depositforburnresponse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depositforburnresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/depositforburnresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,mCAAmC,EAEpC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC
|
|
1
|
+
{"version":3,"file":"depositforburnresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/depositforburnresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,mCAAmC,EAEpC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,eAAO,MAAM,kCAAkC;;;CAGrC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,UAAU,CACzD,OAAO,kCAAkC,CAC1C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,WAAW,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACxC,MAAM,EAAE,mCAAmC,GAAG,IAAI,CAAC;IACnD;;OAEG;IACH,YAAY,EAAE,kCAAkC,CAAC;IACjD;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gDAAgD,EAAE,CAAC,CAAC,aAAa,CAC5E,OAAO,kCAAkC,CACS,CAAC;AAErD,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,OAAO,CAeP,CAAC;AAEH,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAM7D"}
|
|
@@ -36,22 +36,36 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.DepositForBurnResponse$inboundSchema = void 0;
|
|
39
|
+
exports.DepositForBurnResponse$inboundSchema = exports.DepositForBurnResponseTransferMode$inboundSchema = exports.DepositForBurnResponseTransferMode = void 0;
|
|
40
40
|
exports.depositForBurnResponseFromJSON = depositForBurnResponseFromJSON;
|
|
41
41
|
const z = __importStar(require("zod/v3"));
|
|
42
42
|
const primitives_js_1 = require("../../lib/primitives.js");
|
|
43
43
|
const schemas_js_1 = require("../../lib/schemas.js");
|
|
44
44
|
const batchedsafeoperationsresponseoutput_js_1 = require("./batchedsafeoperationsresponseoutput.js");
|
|
45
45
|
const unsignedtransaction_js_1 = require("./unsignedtransaction.js");
|
|
46
|
+
/**
|
|
47
|
+
* The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min).
|
|
48
|
+
*/
|
|
49
|
+
exports.DepositForBurnResponseTransferMode = {
|
|
50
|
+
Fast: "fast",
|
|
51
|
+
Standard: "standard",
|
|
52
|
+
};
|
|
53
|
+
/** @internal */
|
|
54
|
+
exports.DepositForBurnResponseTransferMode$inboundSchema = z.nativeEnum(exports.DepositForBurnResponseTransferMode);
|
|
46
55
|
/** @internal */
|
|
47
56
|
exports.DepositForBurnResponse$inboundSchema = z.object({
|
|
48
57
|
bridge_id: z.nullable(z.string()).optional(),
|
|
49
58
|
transaction: z.nullable(unsignedtransaction_js_1.UnsignedTransaction$inboundSchema),
|
|
50
59
|
eip_712: z.nullable(batchedsafeoperationsresponseoutput_js_1.BatchedSafeOperationsResponseOutput$inboundSchema),
|
|
60
|
+
transfer_mode: exports.DepositForBurnResponseTransferMode$inboundSchema,
|
|
61
|
+
fee: z.nullable(z.string()).optional(),
|
|
62
|
+
estimated_time_seconds: z.number().int(),
|
|
51
63
|
}).transform((v) => {
|
|
52
64
|
return (0, primitives_js_1.remap)(v, {
|
|
53
65
|
"bridge_id": "bridgeId",
|
|
54
66
|
"eip_712": "eip712",
|
|
67
|
+
"transfer_mode": "transferMode",
|
|
68
|
+
"estimated_time_seconds": "estimatedTimeSeconds",
|
|
55
69
|
});
|
|
56
70
|
});
|
|
57
71
|
function depositForBurnResponseFromJSON(jsonString) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depositforburnresponse.js","sourceRoot":"","sources":["../../../../src/models/components/depositforburnresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"depositforburnresponse.js","sourceRoot":"","sources":["../../../../src/models/components/depositforburnresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqGH,wEAQC;AA3GD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAIjD,qGAGkD;AAClD,qEAGkC;AAElC;;GAEG;AACU,QAAA,kCAAkC,GAAG;IAChD,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;CACZ,CAAC;AAoDX,gBAAgB;AACH,QAAA,gDAAgD,GAEzD,CAAC,CAAC,UAAU,CAAC,0CAAkC,CAAC,CAAC;AAErD,gBAAgB;AACH,QAAA,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC5C,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,0DAAiC,CAAC;IAC1D,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,0FAAiD,CAAC;IACtE,aAAa,EAAE,wDAAgD;IAC/D,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CACzC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,WAAW,EAAE,UAAU;QACvB,SAAS,EAAE,QAAQ;QACnB,eAAe,EAAE,cAAc;QAC/B,wBAAwB,EAAE,sBAAsB;KACjD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,8BAA8B,CAC5C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,4CAAoC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChE,oDAAoD,CACrD,CAAC;AACJ,CAAC"}
|
|
@@ -3,11 +3,17 @@ import * as components from "../models/components/index.js";
|
|
|
3
3
|
import * as operations from "../models/operations/index.js";
|
|
4
4
|
export declare class Cctp extends ClientSDK {
|
|
5
5
|
/**
|
|
6
|
-
* Build depositForBurn transaction for Earn Account
|
|
6
|
+
* Build depositForBurn transaction for Earn Account (CCTP V2)
|
|
7
7
|
*
|
|
8
8
|
* @remarks
|
|
9
9
|
* Build a transaction to burn USDC from an Earn Account (Safe) on the source chain
|
|
10
|
-
* and initiate a cross-chain transfer via Circle's CCTP (Cross-Chain Transfer Protocol).
|
|
10
|
+
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
11
|
+
*
|
|
12
|
+
* **Transfer modes:**
|
|
13
|
+
* - `standard` (default): ~15-19 minute transfers, **free** (no fee)
|
|
14
|
+
* - `fast`: ~30 second transfers, requires a small fee (typically ~0.01%)
|
|
15
|
+
*
|
|
16
|
+
* The fee for fast mode is automatically calculated based on Circle's current rates.
|
|
11
17
|
*
|
|
12
18
|
* **Flow:**
|
|
13
19
|
* 1. Call this endpoint with `gas_sponsorship=false` to get an unsigned transaction,
|
|
@@ -15,7 +21,7 @@ export declare class Cctp extends ClientSDK {
|
|
|
15
21
|
* 2. Owner signs the transaction or typed data
|
|
16
22
|
* 3. Broadcast the transaction on the source chain (or submit to `/gas_sponsorship/prepare`)
|
|
17
23
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
18
|
-
* 5. Call the mint endpoint
|
|
24
|
+
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
19
25
|
*
|
|
20
26
|
* **Supported chains:**
|
|
21
27
|
* - Ethereum (domain 0)
|
|
@@ -23,7 +29,7 @@ export declare class Cctp extends ClientSDK {
|
|
|
23
29
|
* - Base (domain 6)
|
|
24
30
|
*
|
|
25
31
|
* **Note:** The USDC must already be deposited in the Earn Account. If approval is needed
|
|
26
|
-
* for the
|
|
32
|
+
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
27
33
|
*
|
|
28
34
|
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
29
35
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cctp.d.ts","sourceRoot":"","sources":["../../../src/sdk/cctp.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,IAAK,SAAQ,SAAS;IACjC
|
|
1
|
+
{"version":3,"file":"cctp.d.ts","sourceRoot":"","sources":["../../../src/sdk/cctp.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,IAAK,SAAQ,SAAS;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;CAO1C"}
|
|
@@ -10,11 +10,17 @@ const sdks_js_1 = require("../lib/sdks.js");
|
|
|
10
10
|
const fp_js_1 = require("../types/fp.js");
|
|
11
11
|
class Cctp extends sdks_js_1.ClientSDK {
|
|
12
12
|
/**
|
|
13
|
-
* Build depositForBurn transaction for Earn Account
|
|
13
|
+
* Build depositForBurn transaction for Earn Account (CCTP V2)
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
* Build a transaction to burn USDC from an Earn Account (Safe) on the source chain
|
|
17
|
-
* and initiate a cross-chain transfer via Circle's CCTP (Cross-Chain Transfer Protocol).
|
|
17
|
+
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
18
|
+
*
|
|
19
|
+
* **Transfer modes:**
|
|
20
|
+
* - `standard` (default): ~15-19 minute transfers, **free** (no fee)
|
|
21
|
+
* - `fast`: ~30 second transfers, requires a small fee (typically ~0.01%)
|
|
22
|
+
*
|
|
23
|
+
* The fee for fast mode is automatically calculated based on Circle's current rates.
|
|
18
24
|
*
|
|
19
25
|
* **Flow:**
|
|
20
26
|
* 1. Call this endpoint with `gas_sponsorship=false` to get an unsigned transaction,
|
|
@@ -22,7 +28,7 @@ class Cctp extends sdks_js_1.ClientSDK {
|
|
|
22
28
|
* 2. Owner signs the transaction or typed data
|
|
23
29
|
* 3. Broadcast the transaction on the source chain (or submit to `/gas_sponsorship/prepare`)
|
|
24
30
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
25
|
-
* 5. Call the mint endpoint
|
|
31
|
+
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
26
32
|
*
|
|
27
33
|
* **Supported chains:**
|
|
28
34
|
* - Ethereum (domain 0)
|
|
@@ -30,7 +36,7 @@ class Cctp extends sdks_js_1.ClientSDK {
|
|
|
30
36
|
* - Base (domain 6)
|
|
31
37
|
*
|
|
32
38
|
* **Note:** The USDC must already be deposited in the Earn Account. If approval is needed
|
|
33
|
-
* for the
|
|
39
|
+
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
34
40
|
*
|
|
35
41
|
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
36
42
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cctp.js","sourceRoot":"","sources":["../../../src/sdk/cctp.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8DAAwD;AACxD,8DAAwD;AACxD,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,IAAK,SAAQ,mBAAS;IACjC
|
|
1
|
+
{"version":3,"file":"cctp.js","sourceRoot":"","sources":["../../../src/sdk/cctp.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8DAAwD;AACxD,8DAAwD;AACxD,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,IAAK,SAAQ,mBAAS;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA5FD,oBA4FC"}
|
|
@@ -9,11 +9,17 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
|
9
9
|
import { APIPromise } from "../types/async.js";
|
|
10
10
|
import { Result } from "../types/fp.js";
|
|
11
11
|
/**
|
|
12
|
-
* Build depositForBurn transaction for Earn Account
|
|
12
|
+
* Build depositForBurn transaction for Earn Account (CCTP V2)
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Build a transaction to burn USDC from an Earn Account (Safe) on the source chain
|
|
16
|
-
* and initiate a cross-chain transfer via Circle's CCTP (Cross-Chain Transfer Protocol).
|
|
16
|
+
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
17
|
+
*
|
|
18
|
+
* **Transfer modes:**
|
|
19
|
+
* - `standard` (default): ~15-19 minute transfers, **free** (no fee)
|
|
20
|
+
* - `fast`: ~30 second transfers, requires a small fee (typically ~0.01%)
|
|
21
|
+
*
|
|
22
|
+
* The fee for fast mode is automatically calculated based on Circle's current rates.
|
|
17
23
|
*
|
|
18
24
|
* **Flow:**
|
|
19
25
|
* 1. Call this endpoint with `gas_sponsorship=false` to get an unsigned transaction,
|
|
@@ -21,7 +27,7 @@ import { Result } from "../types/fp.js";
|
|
|
21
27
|
* 2. Owner signs the transaction or typed data
|
|
22
28
|
* 3. Broadcast the transaction on the source chain (or submit to `/gas_sponsorship/prepare`)
|
|
23
29
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
24
|
-
* 5. Call the mint endpoint
|
|
30
|
+
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
25
31
|
*
|
|
26
32
|
* **Supported chains:**
|
|
27
33
|
* - Ethereum (domain 0)
|
|
@@ -29,7 +35,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
35
|
* - Base (domain 6)
|
|
30
36
|
*
|
|
31
37
|
* **Note:** The USDC must already be deposited in the Earn Account. If approval is needed
|
|
32
|
-
* for the
|
|
38
|
+
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
33
39
|
*
|
|
34
40
|
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
35
41
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cctpCCTPBurn.d.ts","sourceRoot":"","sources":["../../../src/funcs/cctpCCTPBurn.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC
|
|
1
|
+
{"version":3,"file":"cctpCCTPBurn.d.ts","sourceRoot":"","sources":["../../../src/funcs/cctpCCTPBurn.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,sBAAsB,EAC/B,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -11,11 +11,17 @@ import * as components from "../models/components/index.js";
|
|
|
11
11
|
import * as errors from "../models/errors/index.js";
|
|
12
12
|
import { APIPromise } from "../types/async.js";
|
|
13
13
|
/**
|
|
14
|
-
* Build depositForBurn transaction for Earn Account
|
|
14
|
+
* Build depositForBurn transaction for Earn Account (CCTP V2)
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
17
|
* Build a transaction to burn USDC from an Earn Account (Safe) on the source chain
|
|
18
|
-
* and initiate a cross-chain transfer via Circle's CCTP (Cross-Chain Transfer Protocol).
|
|
18
|
+
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
19
|
+
*
|
|
20
|
+
* **Transfer modes:**
|
|
21
|
+
* - `standard` (default): ~15-19 minute transfers, **free** (no fee)
|
|
22
|
+
* - `fast`: ~30 second transfers, requires a small fee (typically ~0.01%)
|
|
23
|
+
*
|
|
24
|
+
* The fee for fast mode is automatically calculated based on Circle's current rates.
|
|
19
25
|
*
|
|
20
26
|
* **Flow:**
|
|
21
27
|
* 1. Call this endpoint with `gas_sponsorship=false` to get an unsigned transaction,
|
|
@@ -23,7 +29,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
23
29
|
* 2. Owner signs the transaction or typed data
|
|
24
30
|
* 3. Broadcast the transaction on the source chain (or submit to `/gas_sponsorship/prepare`)
|
|
25
31
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
26
|
-
* 5. Call the mint endpoint
|
|
32
|
+
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
27
33
|
*
|
|
28
34
|
* **Supported chains:**
|
|
29
35
|
* - Ethereum (domain 0)
|
|
@@ -31,7 +37,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
31
37
|
* - Base (domain 6)
|
|
32
38
|
*
|
|
33
39
|
* **Note:** The USDC must already be deposited in the Earn Account. If approval is needed
|
|
34
|
-
* for the
|
|
40
|
+
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
35
41
|
*
|
|
36
42
|
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
37
43
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cctpCCTPBurn.js","sourceRoot":"","sources":["../../../src/funcs/cctpCCTPBurn.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE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G,EAAE,MAAM,CAAC,iCAAiC,CAAC,EACxD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -28,6 +28,17 @@ export declare const DestinationChain: {
|
|
|
28
28
|
* The destination chain where USDC will be minted.
|
|
29
29
|
*/
|
|
30
30
|
export type DestinationChain = ClosedEnum<typeof DestinationChain>;
|
|
31
|
+
/**
|
|
32
|
+
* Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'.
|
|
33
|
+
*/
|
|
34
|
+
export declare const DepositForBurnRequestTransferMode: {
|
|
35
|
+
readonly Fast: "fast";
|
|
36
|
+
readonly Standard: "standard";
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'.
|
|
40
|
+
*/
|
|
41
|
+
export type DepositForBurnRequestTransferMode = ClosedEnum<typeof DepositForBurnRequestTransferMode>;
|
|
31
42
|
/**
|
|
32
43
|
* Request model for CCTP depositForBurn transaction from a smart account.
|
|
33
44
|
*
|
|
@@ -63,14 +74,14 @@ export type DepositForBurnRequest = {
|
|
|
63
74
|
* The destination chain where USDC will be minted.
|
|
64
75
|
*/
|
|
65
76
|
destinationChain: DestinationChain;
|
|
66
|
-
/**
|
|
67
|
-
* The recipient address on the destination chain.
|
|
68
|
-
*/
|
|
69
|
-
destinationAddress: string;
|
|
70
77
|
/**
|
|
71
78
|
* Optionally request gas sponsorship. If set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
72
79
|
*/
|
|
73
80
|
gasSponsorship?: boolean | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'.
|
|
83
|
+
*/
|
|
84
|
+
transferMode?: DepositForBurnRequestTransferMode | undefined;
|
|
74
85
|
};
|
|
75
86
|
/** @internal */
|
|
76
87
|
export declare const DepositForBurnRequestChain$outboundSchema: z.ZodNativeEnum<typeof DepositForBurnRequestChain>;
|
|
@@ -82,13 +93,15 @@ export declare function depositForBurnRequestAmountToJSON(depositForBurnRequestA
|
|
|
82
93
|
/** @internal */
|
|
83
94
|
export declare const DestinationChain$outboundSchema: z.ZodNativeEnum<typeof DestinationChain>;
|
|
84
95
|
/** @internal */
|
|
96
|
+
export declare const DepositForBurnRequestTransferMode$outboundSchema: z.ZodNativeEnum<typeof DepositForBurnRequestTransferMode>;
|
|
97
|
+
/** @internal */
|
|
85
98
|
export type DepositForBurnRequest$Outbound = {
|
|
86
99
|
owner: string;
|
|
87
100
|
chain: string;
|
|
88
101
|
amount: number | string;
|
|
89
102
|
destination_chain: string;
|
|
90
|
-
destination_address: string;
|
|
91
103
|
gas_sponsorship?: boolean | undefined;
|
|
104
|
+
transfer_mode?: string | undefined;
|
|
92
105
|
};
|
|
93
106
|
/** @internal */
|
|
94
107
|
export declare const DepositForBurnRequest$outboundSchema: z.ZodType<DepositForBurnRequest$Outbound, z.ZodTypeDef, DepositForBurnRequest>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depositforburnrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/depositforburnrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;CAI7B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,UAAU,CACjD,OAAO,0BAA0B,CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEnE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,0BAA0B,CAAC;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,gBAAgB,EAAE,gBAAgB,CAAC;IACnC;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"depositforburnrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/depositforburnrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;CAI7B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,UAAU,CACjD,OAAO,0BAA0B,CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1D;;GAEG;A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,MAAM,MAAM,8BAA8B,GAAG;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,8BAA8B,EAC9B,CAAC,CAAC,UAAU,EACZ,qBAAqB,CAcrB,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,qBAAqB,EAAE,qBAAqB,GAC3C,MAAM,CAIR"}
|
|
@@ -19,6 +19,13 @@ export const DestinationChain = {
|
|
|
19
19
|
Arbitrum: "arbitrum",
|
|
20
20
|
Base: "base",
|
|
21
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'.
|
|
24
|
+
*/
|
|
25
|
+
export const DepositForBurnRequestTransferMode = {
|
|
26
|
+
Fast: "fast",
|
|
27
|
+
Standard: "standard",
|
|
28
|
+
};
|
|
22
29
|
/** @internal */
|
|
23
30
|
export const DepositForBurnRequestChain$outboundSchema = z.nativeEnum(DepositForBurnRequestChain);
|
|
24
31
|
/** @internal */
|
|
@@ -29,18 +36,20 @@ export function depositForBurnRequestAmountToJSON(depositForBurnRequestAmount) {
|
|
|
29
36
|
/** @internal */
|
|
30
37
|
export const DestinationChain$outboundSchema = z.nativeEnum(DestinationChain);
|
|
31
38
|
/** @internal */
|
|
39
|
+
export const DepositForBurnRequestTransferMode$outboundSchema = z.nativeEnum(DepositForBurnRequestTransferMode);
|
|
40
|
+
/** @internal */
|
|
32
41
|
export const DepositForBurnRequest$outboundSchema = z.object({
|
|
33
42
|
owner: z.string(),
|
|
34
43
|
chain: DepositForBurnRequestChain$outboundSchema,
|
|
35
44
|
amount: z.union([z.number(), z.string()]),
|
|
36
45
|
destinationChain: DestinationChain$outboundSchema,
|
|
37
|
-
destinationAddress: z.string(),
|
|
38
46
|
gasSponsorship: z.boolean().optional(),
|
|
47
|
+
transferMode: DepositForBurnRequestTransferMode$outboundSchema.optional(),
|
|
39
48
|
}).transform((v) => {
|
|
40
49
|
return remap$(v, {
|
|
41
50
|
destinationChain: "destination_chain",
|
|
42
|
-
destinationAddress: "destination_address",
|
|
43
51
|
gasSponsorship: "gas_sponsorship",
|
|
52
|
+
transferMode: "transfer_mode",
|
|
44
53
|
});
|
|
45
54
|
});
|
|
46
55
|
export function depositForBurnRequestToJSON(depositForBurnRequest) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depositforburnrequest.js","sourceRoot":"","sources":["../../../../src/models/components/depositforburnrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAG1D;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACJ,CAAC;AAaX;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"depositforburnrequest.js","sourceRoot":"","sources":["../../../../src/models/components/depositforburnrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAG1D;;GAEG;AACH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zC,gBAAgB,EAAE,+BAA+B;IACjD,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACtC,YAAY,EAAE,gDAAgD,CAAC,QAAQ,EAAE;CAC1E,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,gBAAgB,EAAE,mBAAmB;QACrC,cAAc,EAAE,iBAAiB;QACjC,YAAY,EAAE,eAAe;KAC9B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,2BAA2B,CACzC,qBAA4C;IAE5C,OAAO,IAAI,CAAC,SAAS,CACnB,oCAAoC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAClE,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
5
|
import { BatchedSafeOperationsResponseOutput } from "./batchedsafeoperationsresponseoutput.js";
|
|
5
6
|
import { UnsignedTransaction } from "./unsignedtransaction.js";
|
|
7
|
+
/**
|
|
8
|
+
* The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min).
|
|
9
|
+
*/
|
|
10
|
+
export declare const DepositForBurnResponseTransferMode: {
|
|
11
|
+
readonly Fast: "fast";
|
|
12
|
+
readonly Standard: "standard";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min).
|
|
16
|
+
*/
|
|
17
|
+
export type DepositForBurnResponseTransferMode = ClosedEnum<typeof DepositForBurnResponseTransferMode>;
|
|
6
18
|
/**
|
|
7
19
|
* Response model for CCTP depositForBurn transaction from a smart account.
|
|
8
20
|
*
|
|
@@ -22,6 +34,9 @@ import { UnsignedTransaction } from "./unsignedtransaction.js";
|
|
|
22
34
|
* eip_712: EIP-712 typed data for off-chain signing. The owner signs this
|
|
23
35
|
* data and submits it to /gas_sponsorship/prepare for a relayer to execute.
|
|
24
36
|
* Present when gas_sponsorship=True.
|
|
37
|
+
* transfer_mode: The transfer speed mode used for this bridge operation.
|
|
38
|
+
* fee: Fee amount in USDC (only charged for fast mode, None for standard).
|
|
39
|
+
* estimated_time_seconds: Estimated time to complete the bridge in seconds.
|
|
25
40
|
*/
|
|
26
41
|
export type DepositForBurnResponse = {
|
|
27
42
|
/**
|
|
@@ -30,8 +45,22 @@ export type DepositForBurnResponse = {
|
|
|
30
45
|
bridgeId?: string | null | undefined;
|
|
31
46
|
transaction: UnsignedTransaction | null;
|
|
32
47
|
eip712: BatchedSafeOperationsResponseOutput | null;
|
|
48
|
+
/**
|
|
49
|
+
* The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min).
|
|
50
|
+
*/
|
|
51
|
+
transferMode: DepositForBurnResponseTransferMode;
|
|
52
|
+
/**
|
|
53
|
+
* Fee amount in USDC charged for this transfer. Only present for fast mode. Standard mode transfers are free (fee is None or 0).
|
|
54
|
+
*/
|
|
55
|
+
fee?: string | null | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Estimated time to complete the bridge in seconds.
|
|
58
|
+
*/
|
|
59
|
+
estimatedTimeSeconds: number;
|
|
33
60
|
};
|
|
34
61
|
/** @internal */
|
|
62
|
+
export declare const DepositForBurnResponseTransferMode$inboundSchema: z.ZodNativeEnum<typeof DepositForBurnResponseTransferMode>;
|
|
63
|
+
/** @internal */
|
|
35
64
|
export declare const DepositForBurnResponse$inboundSchema: z.ZodType<DepositForBurnResponse, z.ZodTypeDef, unknown>;
|
|
36
65
|
export declare function depositForBurnResponseFromJSON(jsonString: string): SafeParseResult<DepositForBurnResponse, SDKValidationError>;
|
|
37
66
|
//# sourceMappingURL=depositforburnresponse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depositforburnresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/depositforburnresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,mCAAmC,EAEpC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC
|
|
1
|
+
{"version":3,"file":"depositforburnresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/depositforburnresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,mCAAmC,EAEpC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,eAAO,MAAM,kCAAkC;;;CAGrC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,UAAU,CACzD,OAAO,kCAAkC,CAC1C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,WAAW,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACxC,MAAM,EAAE,mCAAmC,GAAG,IAAI,CAAC;IACnD;;OAEG;IACH,YAAY,EAAE,kCAAkC,CAAC;IACjD;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gDAAgD,EAAE,CAAC,CAAC,aAAa,CAC5E,OAAO,kCAAkC,CACS,CAAC;AAErD,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,OAAO,CAeP,CAAC;AAEH,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAM7D"}
|
|
@@ -6,15 +6,29 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { BatchedSafeOperationsResponseOutput$inboundSchema, } from "./batchedsafeoperationsresponseoutput.js";
|
|
8
8
|
import { UnsignedTransaction$inboundSchema, } from "./unsignedtransaction.js";
|
|
9
|
+
/**
|
|
10
|
+
* The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min).
|
|
11
|
+
*/
|
|
12
|
+
export const DepositForBurnResponseTransferMode = {
|
|
13
|
+
Fast: "fast",
|
|
14
|
+
Standard: "standard",
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const DepositForBurnResponseTransferMode$inboundSchema = z.nativeEnum(DepositForBurnResponseTransferMode);
|
|
9
18
|
/** @internal */
|
|
10
19
|
export const DepositForBurnResponse$inboundSchema = z.object({
|
|
11
20
|
bridge_id: z.nullable(z.string()).optional(),
|
|
12
21
|
transaction: z.nullable(UnsignedTransaction$inboundSchema),
|
|
13
22
|
eip_712: z.nullable(BatchedSafeOperationsResponseOutput$inboundSchema),
|
|
23
|
+
transfer_mode: DepositForBurnResponseTransferMode$inboundSchema,
|
|
24
|
+
fee: z.nullable(z.string()).optional(),
|
|
25
|
+
estimated_time_seconds: z.number().int(),
|
|
14
26
|
}).transform((v) => {
|
|
15
27
|
return remap$(v, {
|
|
16
28
|
"bridge_id": "bridgeId",
|
|
17
29
|
"eip_712": "eip712",
|
|
30
|
+
"transfer_mode": "transferMode",
|
|
31
|
+
"estimated_time_seconds": "estimatedTimeSeconds",
|
|
18
32
|
});
|
|
19
33
|
});
|
|
20
34
|
export function depositForBurnResponseFromJSON(jsonString) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depositforburnresponse.js","sourceRoot":"","sources":["../../../../src/models/components/depositforburnresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"depositforburnresponse.js","sourceRoot":"","sources":["../../../../src/models/components/depositforburnresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAIjD,OAAO,EAEL,iDAAiD,GAClD,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAEL,iCAAiC,GAClC,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;CACZ,CAAC;AAoDX,gBAAgB;AAChB,MAAM,CAAC,MAAM,gDAAgD,GAEzD,CAAC,CAAC,UAAU,CAAC,kCAAkC,CAAC,CAAC;AAErD,gBAAgB;AAChB,MAAM,CAAC,MAAM,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC5C,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC1D,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,iDAAiD,CAAC;IACtE,aAAa,EAAE,gDAAgD;IAC/D,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CACzC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,WAAW,EAAE,UAAU;QACvB,SAAS,EAAE,QAAQ;QACnB,eAAe,EAAE,cAAc;QAC/B,wBAAwB,EAAE,sBAAsB;KACjD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,8BAA8B,CAC5C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,oCAAoC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChE,oDAAoD,CACrD,CAAC;AACJ,CAAC"}
|
package/dist/esm/sdk/cctp.d.ts
CHANGED
|
@@ -3,11 +3,17 @@ import * as components from "../models/components/index.js";
|
|
|
3
3
|
import * as operations from "../models/operations/index.js";
|
|
4
4
|
export declare class Cctp extends ClientSDK {
|
|
5
5
|
/**
|
|
6
|
-
* Build depositForBurn transaction for Earn Account
|
|
6
|
+
* Build depositForBurn transaction for Earn Account (CCTP V2)
|
|
7
7
|
*
|
|
8
8
|
* @remarks
|
|
9
9
|
* Build a transaction to burn USDC from an Earn Account (Safe) on the source chain
|
|
10
|
-
* and initiate a cross-chain transfer via Circle's CCTP (Cross-Chain Transfer Protocol).
|
|
10
|
+
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
11
|
+
*
|
|
12
|
+
* **Transfer modes:**
|
|
13
|
+
* - `standard` (default): ~15-19 minute transfers, **free** (no fee)
|
|
14
|
+
* - `fast`: ~30 second transfers, requires a small fee (typically ~0.01%)
|
|
15
|
+
*
|
|
16
|
+
* The fee for fast mode is automatically calculated based on Circle's current rates.
|
|
11
17
|
*
|
|
12
18
|
* **Flow:**
|
|
13
19
|
* 1. Call this endpoint with `gas_sponsorship=false` to get an unsigned transaction,
|
|
@@ -15,7 +21,7 @@ export declare class Cctp extends ClientSDK {
|
|
|
15
21
|
* 2. Owner signs the transaction or typed data
|
|
16
22
|
* 3. Broadcast the transaction on the source chain (or submit to `/gas_sponsorship/prepare`)
|
|
17
23
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
18
|
-
* 5. Call the mint endpoint
|
|
24
|
+
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
19
25
|
*
|
|
20
26
|
* **Supported chains:**
|
|
21
27
|
* - Ethereum (domain 0)
|
|
@@ -23,7 +29,7 @@ export declare class Cctp extends ClientSDK {
|
|
|
23
29
|
* - Base (domain 6)
|
|
24
30
|
*
|
|
25
31
|
* **Note:** The USDC must already be deposited in the Earn Account. If approval is needed
|
|
26
|
-
* for the
|
|
32
|
+
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
27
33
|
*
|
|
28
34
|
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
29
35
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cctp.d.ts","sourceRoot":"","sources":["../../../src/sdk/cctp.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,IAAK,SAAQ,SAAS;IACjC
|
|
1
|
+
{"version":3,"file":"cctp.d.ts","sourceRoot":"","sources":["../../../src/sdk/cctp.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,IAAK,SAAQ,SAAS;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;CAO1C"}
|
package/dist/esm/sdk/cctp.js
CHANGED
|
@@ -7,11 +7,17 @@ import { ClientSDK } from "../lib/sdks.js";
|
|
|
7
7
|
import { unwrapAsync } from "../types/fp.js";
|
|
8
8
|
export class Cctp extends ClientSDK {
|
|
9
9
|
/**
|
|
10
|
-
* Build depositForBurn transaction for Earn Account
|
|
10
|
+
* Build depositForBurn transaction for Earn Account (CCTP V2)
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
13
|
* Build a transaction to burn USDC from an Earn Account (Safe) on the source chain
|
|
14
|
-
* and initiate a cross-chain transfer via Circle's CCTP (Cross-Chain Transfer Protocol).
|
|
14
|
+
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
15
|
+
*
|
|
16
|
+
* **Transfer modes:**
|
|
17
|
+
* - `standard` (default): ~15-19 minute transfers, **free** (no fee)
|
|
18
|
+
* - `fast`: ~30 second transfers, requires a small fee (typically ~0.01%)
|
|
19
|
+
*
|
|
20
|
+
* The fee for fast mode is automatically calculated based on Circle's current rates.
|
|
15
21
|
*
|
|
16
22
|
* **Flow:**
|
|
17
23
|
* 1. Call this endpoint with `gas_sponsorship=false` to get an unsigned transaction,
|
|
@@ -19,7 +25,7 @@ export class Cctp extends ClientSDK {
|
|
|
19
25
|
* 2. Owner signs the transaction or typed data
|
|
20
26
|
* 3. Broadcast the transaction on the source chain (or submit to `/gas_sponsorship/prepare`)
|
|
21
27
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
22
|
-
* 5. Call the mint endpoint
|
|
28
|
+
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
23
29
|
*
|
|
24
30
|
* **Supported chains:**
|
|
25
31
|
* - Ethereum (domain 0)
|
|
@@ -27,7 +33,7 @@ export class Cctp extends ClientSDK {
|
|
|
27
33
|
* - Base (domain 6)
|
|
28
34
|
*
|
|
29
35
|
* **Note:** The USDC must already be deposited in the Earn Account. If approval is needed
|
|
30
|
-
* for the
|
|
36
|
+
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
31
37
|
*
|
|
32
38
|
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
33
39
|
*/
|
package/dist/esm/sdk/cctp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cctp.js","sourceRoot":"","sources":["../../../src/sdk/cctp.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,IAAK,SAAQ,SAAS;IACjC
|
|
1
|
+
{"version":3,"file":"cctp.js","sourceRoot":"","sources":["../../../src/sdk/cctp.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,IAAK,SAAQ,SAAS;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAyC,EACzC,OAAwB;QAExB,OAAO,WAAW,CAAC,YAAY,CAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAsC,EACtC,OAAwB;QAExB,OAAO,WAAW,CAAC,YAAY,CAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -26,11 +26,17 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Build depositForBurn transaction for Earn Account
|
|
29
|
+
* Build depositForBurn transaction for Earn Account (CCTP V2)
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Build a transaction to burn USDC from an Earn Account (Safe) on the source chain
|
|
33
|
-
* and initiate a cross-chain transfer via Circle's CCTP (Cross-Chain Transfer Protocol).
|
|
33
|
+
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
34
|
+
*
|
|
35
|
+
* **Transfer modes:**
|
|
36
|
+
* - `standard` (default): ~15-19 minute transfers, **free** (no fee)
|
|
37
|
+
* - `fast`: ~30 second transfers, requires a small fee (typically ~0.01%)
|
|
38
|
+
*
|
|
39
|
+
* The fee for fast mode is automatically calculated based on Circle's current rates.
|
|
34
40
|
*
|
|
35
41
|
* **Flow:**
|
|
36
42
|
* 1. Call this endpoint with `gas_sponsorship=false` to get an unsigned transaction,
|
|
@@ -38,7 +44,7 @@ import { Result } from "../types/fp.js";
|
|
|
38
44
|
* 2. Owner signs the transaction or typed data
|
|
39
45
|
* 3. Broadcast the transaction on the source chain (or submit to `/gas_sponsorship/prepare`)
|
|
40
46
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
41
|
-
* 5. Call the mint endpoint
|
|
47
|
+
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
42
48
|
*
|
|
43
49
|
* **Supported chains:**
|
|
44
50
|
* - Ethereum (domain 0)
|
|
@@ -46,7 +52,7 @@ import { Result } from "../types/fp.js";
|
|
|
46
52
|
* - Base (domain 6)
|
|
47
53
|
*
|
|
48
54
|
* **Note:** The USDC must already be deposited in the Earn Account. If approval is needed
|
|
49
|
-
* for the
|
|
55
|
+
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
50
56
|
*
|
|
51
57
|
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
52
58
|
*/
|
|
@@ -39,6 +39,20 @@ export const DestinationChain = {
|
|
|
39
39
|
*/
|
|
40
40
|
export type DestinationChain = ClosedEnum<typeof DestinationChain>;
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'.
|
|
44
|
+
*/
|
|
45
|
+
export const DepositForBurnRequestTransferMode = {
|
|
46
|
+
Fast: "fast",
|
|
47
|
+
Standard: "standard",
|
|
48
|
+
} as const;
|
|
49
|
+
/**
|
|
50
|
+
* Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'.
|
|
51
|
+
*/
|
|
52
|
+
export type DepositForBurnRequestTransferMode = ClosedEnum<
|
|
53
|
+
typeof DepositForBurnRequestTransferMode
|
|
54
|
+
>;
|
|
55
|
+
|
|
42
56
|
/**
|
|
43
57
|
* Request model for CCTP depositForBurn transaction from a smart account.
|
|
44
58
|
*
|
|
@@ -74,14 +88,14 @@ export type DepositForBurnRequest = {
|
|
|
74
88
|
* The destination chain where USDC will be minted.
|
|
75
89
|
*/
|
|
76
90
|
destinationChain: DestinationChain;
|
|
77
|
-
/**
|
|
78
|
-
* The recipient address on the destination chain.
|
|
79
|
-
*/
|
|
80
|
-
destinationAddress: string;
|
|
81
91
|
/**
|
|
82
92
|
* Optionally request gas sponsorship. If set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
83
93
|
*/
|
|
84
94
|
gasSponsorship?: boolean | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'.
|
|
97
|
+
*/
|
|
98
|
+
transferMode?: DepositForBurnRequestTransferMode | undefined;
|
|
85
99
|
};
|
|
86
100
|
|
|
87
101
|
/** @internal */
|
|
@@ -114,14 +128,19 @@ export const DestinationChain$outboundSchema: z.ZodNativeEnum<
|
|
|
114
128
|
typeof DestinationChain
|
|
115
129
|
> = z.nativeEnum(DestinationChain);
|
|
116
130
|
|
|
131
|
+
/** @internal */
|
|
132
|
+
export const DepositForBurnRequestTransferMode$outboundSchema: z.ZodNativeEnum<
|
|
133
|
+
typeof DepositForBurnRequestTransferMode
|
|
134
|
+
> = z.nativeEnum(DepositForBurnRequestTransferMode);
|
|
135
|
+
|
|
117
136
|
/** @internal */
|
|
118
137
|
export type DepositForBurnRequest$Outbound = {
|
|
119
138
|
owner: string;
|
|
120
139
|
chain: string;
|
|
121
140
|
amount: number | string;
|
|
122
141
|
destination_chain: string;
|
|
123
|
-
destination_address: string;
|
|
124
142
|
gas_sponsorship?: boolean | undefined;
|
|
143
|
+
transfer_mode?: string | undefined;
|
|
125
144
|
};
|
|
126
145
|
|
|
127
146
|
/** @internal */
|
|
@@ -134,13 +153,13 @@ export const DepositForBurnRequest$outboundSchema: z.ZodType<
|
|
|
134
153
|
chain: DepositForBurnRequestChain$outboundSchema,
|
|
135
154
|
amount: z.union([z.number(), z.string()]),
|
|
136
155
|
destinationChain: DestinationChain$outboundSchema,
|
|
137
|
-
destinationAddress: z.string(),
|
|
138
156
|
gasSponsorship: z.boolean().optional(),
|
|
157
|
+
transferMode: DepositForBurnRequestTransferMode$outboundSchema.optional(),
|
|
139
158
|
}).transform((v) => {
|
|
140
159
|
return remap$(v, {
|
|
141
160
|
destinationChain: "destination_chain",
|
|
142
|
-
destinationAddress: "destination_address",
|
|
143
161
|
gasSponsorship: "gas_sponsorship",
|
|
162
|
+
transferMode: "transfer_mode",
|
|
144
163
|
});
|
|
145
164
|
});
|
|
146
165
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
import {
|
|
@@ -16,6 +17,20 @@ import {
|
|
|
16
17
|
UnsignedTransaction$inboundSchema,
|
|
17
18
|
} from "./unsignedtransaction.js";
|
|
18
19
|
|
|
20
|
+
/**
|
|
21
|
+
* The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min).
|
|
22
|
+
*/
|
|
23
|
+
export const DepositForBurnResponseTransferMode = {
|
|
24
|
+
Fast: "fast",
|
|
25
|
+
Standard: "standard",
|
|
26
|
+
} as const;
|
|
27
|
+
/**
|
|
28
|
+
* The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min).
|
|
29
|
+
*/
|
|
30
|
+
export type DepositForBurnResponseTransferMode = ClosedEnum<
|
|
31
|
+
typeof DepositForBurnResponseTransferMode
|
|
32
|
+
>;
|
|
33
|
+
|
|
19
34
|
/**
|
|
20
35
|
* Response model for CCTP depositForBurn transaction from a smart account.
|
|
21
36
|
*
|
|
@@ -35,6 +50,9 @@ import {
|
|
|
35
50
|
* eip_712: EIP-712 typed data for off-chain signing. The owner signs this
|
|
36
51
|
* data and submits it to /gas_sponsorship/prepare for a relayer to execute.
|
|
37
52
|
* Present when gas_sponsorship=True.
|
|
53
|
+
* transfer_mode: The transfer speed mode used for this bridge operation.
|
|
54
|
+
* fee: Fee amount in USDC (only charged for fast mode, None for standard).
|
|
55
|
+
* estimated_time_seconds: Estimated time to complete the bridge in seconds.
|
|
38
56
|
*/
|
|
39
57
|
export type DepositForBurnResponse = {
|
|
40
58
|
/**
|
|
@@ -43,8 +61,25 @@ export type DepositForBurnResponse = {
|
|
|
43
61
|
bridgeId?: string | null | undefined;
|
|
44
62
|
transaction: UnsignedTransaction | null;
|
|
45
63
|
eip712: BatchedSafeOperationsResponseOutput | null;
|
|
64
|
+
/**
|
|
65
|
+
* The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min).
|
|
66
|
+
*/
|
|
67
|
+
transferMode: DepositForBurnResponseTransferMode;
|
|
68
|
+
/**
|
|
69
|
+
* Fee amount in USDC charged for this transfer. Only present for fast mode. Standard mode transfers are free (fee is None or 0).
|
|
70
|
+
*/
|
|
71
|
+
fee?: string | null | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Estimated time to complete the bridge in seconds.
|
|
74
|
+
*/
|
|
75
|
+
estimatedTimeSeconds: number;
|
|
46
76
|
};
|
|
47
77
|
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const DepositForBurnResponseTransferMode$inboundSchema: z.ZodNativeEnum<
|
|
80
|
+
typeof DepositForBurnResponseTransferMode
|
|
81
|
+
> = z.nativeEnum(DepositForBurnResponseTransferMode);
|
|
82
|
+
|
|
48
83
|
/** @internal */
|
|
49
84
|
export const DepositForBurnResponse$inboundSchema: z.ZodType<
|
|
50
85
|
DepositForBurnResponse,
|
|
@@ -54,10 +89,15 @@ export const DepositForBurnResponse$inboundSchema: z.ZodType<
|
|
|
54
89
|
bridge_id: z.nullable(z.string()).optional(),
|
|
55
90
|
transaction: z.nullable(UnsignedTransaction$inboundSchema),
|
|
56
91
|
eip_712: z.nullable(BatchedSafeOperationsResponseOutput$inboundSchema),
|
|
92
|
+
transfer_mode: DepositForBurnResponseTransferMode$inboundSchema,
|
|
93
|
+
fee: z.nullable(z.string()).optional(),
|
|
94
|
+
estimated_time_seconds: z.number().int(),
|
|
57
95
|
}).transform((v) => {
|
|
58
96
|
return remap$(v, {
|
|
59
97
|
"bridge_id": "bridgeId",
|
|
60
98
|
"eip_712": "eip712",
|
|
99
|
+
"transfer_mode": "transferMode",
|
|
100
|
+
"estimated_time_seconds": "estimatedTimeSeconds",
|
|
61
101
|
});
|
|
62
102
|
});
|
|
63
103
|
|
package/src/sdk/cctp.ts
CHANGED
|
@@ -11,11 +11,17 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
11
11
|
|
|
12
12
|
export class Cctp extends ClientSDK {
|
|
13
13
|
/**
|
|
14
|
-
* Build depositForBurn transaction for Earn Account
|
|
14
|
+
* Build depositForBurn transaction for Earn Account (CCTP V2)
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
17
|
* Build a transaction to burn USDC from an Earn Account (Safe) on the source chain
|
|
18
|
-
* and initiate a cross-chain transfer via Circle's CCTP (Cross-Chain Transfer Protocol).
|
|
18
|
+
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
19
|
+
*
|
|
20
|
+
* **Transfer modes:**
|
|
21
|
+
* - `standard` (default): ~15-19 minute transfers, **free** (no fee)
|
|
22
|
+
* - `fast`: ~30 second transfers, requires a small fee (typically ~0.01%)
|
|
23
|
+
*
|
|
24
|
+
* The fee for fast mode is automatically calculated based on Circle's current rates.
|
|
19
25
|
*
|
|
20
26
|
* **Flow:**
|
|
21
27
|
* 1. Call this endpoint with `gas_sponsorship=false` to get an unsigned transaction,
|
|
@@ -23,7 +29,7 @@ export class Cctp extends ClientSDK {
|
|
|
23
29
|
* 2. Owner signs the transaction or typed data
|
|
24
30
|
* 3. Broadcast the transaction on the source chain (or submit to `/gas_sponsorship/prepare`)
|
|
25
31
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
26
|
-
* 5. Call the mint endpoint
|
|
32
|
+
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
27
33
|
*
|
|
28
34
|
* **Supported chains:**
|
|
29
35
|
* - Ethereum (domain 0)
|
|
@@ -31,7 +37,7 @@ export class Cctp extends ClientSDK {
|
|
|
31
37
|
* - Base (domain 6)
|
|
32
38
|
*
|
|
33
39
|
* **Note:** The USDC must already be deposited in the Earn Account. If approval is needed
|
|
34
|
-
* for the
|
|
40
|
+
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
35
41
|
*
|
|
36
42
|
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
37
43
|
*/
|