@compass-labs/api-sdk 2.1.10-rc.6 → 2.1.10-rc.7
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/bridgeCctpBurn.d.ts +2 -4
- package/dist/commonjs/funcs/bridgeCctpBurn.d.ts.map +1 -1
- package/dist/commonjs/funcs/bridgeCctpBurn.js +2 -4
- package/dist/commonjs/funcs/bridgeCctpBurn.js.map +1 -1
- package/dist/commonjs/funcs/bridgeCctpMint.d.ts +9 -10
- package/dist/commonjs/funcs/bridgeCctpMint.d.ts.map +1 -1
- package/dist/commonjs/funcs/bridgeCctpMint.js +9 -10
- package/dist/commonjs/funcs/bridgeCctpMint.js.map +1 -1
- package/dist/commonjs/sdk/bridge.d.ts +11 -14
- package/dist/commonjs/sdk/bridge.d.ts.map +1 -1
- package/dist/commonjs/sdk/bridge.js +11 -14
- package/dist/commonjs/sdk/bridge.js.map +1 -1
- package/dist/esm/funcs/bridgeCctpBurn.d.ts +2 -4
- package/dist/esm/funcs/bridgeCctpBurn.d.ts.map +1 -1
- package/dist/esm/funcs/bridgeCctpBurn.js +2 -4
- package/dist/esm/funcs/bridgeCctpBurn.js.map +1 -1
- package/dist/esm/funcs/bridgeCctpMint.d.ts +9 -10
- package/dist/esm/funcs/bridgeCctpMint.d.ts.map +1 -1
- package/dist/esm/funcs/bridgeCctpMint.js +9 -10
- package/dist/esm/funcs/bridgeCctpMint.js.map +1 -1
- package/dist/esm/sdk/bridge.d.ts +11 -14
- package/dist/esm/sdk/bridge.d.ts.map +1 -1
- package/dist/esm/sdk/bridge.js +11 -14
- package/dist/esm/sdk/bridge.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/bridgeCctpBurn.ts +2 -4
- package/src/funcs/bridgeCctpMint.ts +9 -10
- package/src/sdk/bridge.ts +11 -14
package/README.md
CHANGED
|
@@ -169,7 +169,7 @@ run();
|
|
|
169
169
|
### [bridge](docs/sdks/bridge/README.md)
|
|
170
170
|
|
|
171
171
|
* [cctpBurn](docs/sdks/bridge/README.md#cctpburn) - Initiate USDC bridging
|
|
172
|
-
* [cctpMint](docs/sdks/bridge/README.md#cctpmint) - Confirm bridging
|
|
172
|
+
* [cctpMint](docs/sdks/bridge/README.md#cctpmint) - Confirm USDC bridging
|
|
173
173
|
|
|
174
174
|
### [earn](docs/sdks/earn/README.md)
|
|
175
175
|
|
|
@@ -321,7 +321,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
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
323
|
- [`bridgeCctpBurn`](docs/sdks/bridge/README.md#cctpburn) - Initiate USDC bridging
|
|
324
|
-
- [`bridgeCctpMint`](docs/sdks/bridge/README.md#cctpmint) - Confirm bridging
|
|
324
|
+
- [`bridgeCctpMint`](docs/sdks/bridge/README.md#cctpmint) - Confirm USDC bridging
|
|
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
|
|
327
327
|
- [`earnEarnManage`](docs/sdks/earn/README.md#earnmanage) - Manage earn position
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Initiate USDC bridging
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Build a transaction to burn USDC from
|
|
15
|
+
* Build a transaction to burn USDC from any Product Account on the source chain
|
|
16
16
|
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
17
17
|
*
|
|
18
18
|
* **Transfer modes:**
|
|
@@ -36,10 +36,8 @@ import { Result } from "../types/fp.js";
|
|
|
36
36
|
* - Arbitrum (domain 3)
|
|
37
37
|
* - Base (domain 6)
|
|
38
38
|
*
|
|
39
|
-
* **Note:** The USDC must already be deposited in the
|
|
39
|
+
* **Note:** The USDC must already be deposited in the Product Account. If approval is needed
|
|
40
40
|
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
41
|
-
*
|
|
42
|
-
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
43
41
|
*/
|
|
44
42
|
export declare function bridgeCctpBurn(client: CompassApiSDKCore, request: components.DepositForBurnRequest, options?: RequestOptions): APIPromise<Result<components.DepositForBurnResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
45
43
|
//# sourceMappingURL=bridgeCctpBurn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridgeCctpBurn.d.ts","sourceRoot":"","sources":["../../../src/funcs/bridgeCctpBurn.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":"bridgeCctpBurn.d.ts","sourceRoot":"","sources":["../../../src/funcs/bridgeCctpBurn.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,cAAc,CAC5B,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"}
|
|
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* Initiate USDC bridging
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Build a transaction to burn USDC from
|
|
53
|
+
* Build a transaction to burn USDC from any Product Account on the source chain
|
|
54
54
|
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
55
55
|
*
|
|
56
56
|
* **Transfer modes:**
|
|
@@ -74,10 +74,8 @@ const async_js_1 = require("../types/async.js");
|
|
|
74
74
|
* - Arbitrum (domain 3)
|
|
75
75
|
* - Base (domain 6)
|
|
76
76
|
*
|
|
77
|
-
* **Note:** The USDC must already be deposited in the
|
|
77
|
+
* **Note:** The USDC must already be deposited in the Product Account. If approval is needed
|
|
78
78
|
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
79
|
-
*
|
|
80
|
-
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
81
79
|
*/
|
|
82
80
|
function bridgeCctpBurn(client, request, options) {
|
|
83
81
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridgeCctpBurn.js","sourceRoot":"","sources":["../../../src/funcs/bridgeCctpBurn.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"bridgeCctpBurn.js","sourceRoot":"","sources":["../../../src/funcs/bridgeCctpBurn.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDH,wCAuBC;AA5ED,sDAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAGpD,gDAAwD;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,SAAgB,cAAc,CAC5B,MAAyB,EACzB,OAAyC,EACzC,OAAwB;IAexB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO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AC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAY5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,oCAAoC,CAAC,EAC5D,CAAC,CAAC,OAAO,CAAC,GAAG,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"}
|
|
@@ -10,28 +10,25 @@ import * as operations from "../models/operations/index.js";
|
|
|
10
10
|
import { APIPromise } from "../types/async.js";
|
|
11
11
|
import { Result } from "../types/fp.js";
|
|
12
12
|
/**
|
|
13
|
-
* Confirm bridging
|
|
13
|
+
* Confirm USDC bridging
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
* ***This endpoint is only needed to be called in rare cases when bridging was not confirmed automatically***
|
|
17
17
|
*
|
|
18
|
-
* Prepare a receiveMessage transaction to mint USDC to
|
|
18
|
+
* Prepare a receiveMessage transaction to mint USDC to any Product Account on the
|
|
19
19
|
* destination chain.
|
|
20
20
|
*
|
|
21
21
|
* **How it works:**
|
|
22
22
|
*
|
|
23
23
|
* This endpoint uses the `bridge_id` from `/burn` to:
|
|
24
|
-
* 1. Look up the bridge session
|
|
25
|
-
* 2.
|
|
26
|
-
* 3.
|
|
27
|
-
* 4. Check if Circle's attestation is ready
|
|
28
|
-
* 5. Return the mint transaction wrapped in Safe execTransaction
|
|
24
|
+
* 1. Look up the bridge session
|
|
25
|
+
* 2. Check if Circle's attestation is ready
|
|
26
|
+
* 3. Return the mint transaction
|
|
29
27
|
*
|
|
30
28
|
* **Request parameters:**
|
|
31
29
|
*
|
|
32
30
|
* - `bridge_id`: The bridge ID returned from `/burn`
|
|
33
|
-
* - `
|
|
34
|
-
* - `gas_sponsorship`: If true, returns EIP-712 typed data for gas-sponsored execution
|
|
31
|
+
* - `burn_tx_hash`: The transaction hash of the burn transaction on the source chain
|
|
35
32
|
*
|
|
36
33
|
* **Response codes:**
|
|
37
34
|
*
|
|
@@ -41,6 +38,8 @@ import { Result } from "../types/fp.js";
|
|
|
41
38
|
*
|
|
42
39
|
* **After receiving 202:**
|
|
43
40
|
*
|
|
41
|
+
* The SSE stream and status endpoint are in progress. Keep an eye on the updates from our team.
|
|
42
|
+
*
|
|
44
43
|
* Either:
|
|
45
44
|
* - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
|
|
46
45
|
* - Poll this endpoint periodically until you get 200
|
|
@@ -48,7 +47,7 @@ import { Result } from "../types/fp.js";
|
|
|
48
47
|
* **After receiving 200:**
|
|
49
48
|
*
|
|
50
49
|
* Sign and broadcast the returned transaction on the destination chain to mint USDC
|
|
51
|
-
* to your
|
|
50
|
+
* to your Product Account.
|
|
52
51
|
*/
|
|
53
52
|
export declare function bridgeCctpMint(client: CompassApiSDKCore, request: components.MintPrepareRequest, options?: RequestOptions): APIPromise<Result<operations.V2CctpMintResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
54
53
|
//# sourceMappingURL=bridgeCctpMint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridgeCctpMint.d.ts","sourceRoot":"","sources":["../../../src/funcs/bridgeCctpMint.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,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC
|
|
1
|
+
{"version":3,"file":"bridgeCctpMint.d.ts","sourceRoot":"","sources":["../../../src/funcs/bridgeCctpMint.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,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,kBAAkB,EAC3B,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -48,28 +48,25 @@ const errors = __importStar(require("../models/errors/index.js"));
|
|
|
48
48
|
const operations = __importStar(require("../models/operations/index.js"));
|
|
49
49
|
const async_js_1 = require("../types/async.js");
|
|
50
50
|
/**
|
|
51
|
-
* Confirm bridging
|
|
51
|
+
* Confirm USDC bridging
|
|
52
52
|
*
|
|
53
53
|
* @remarks
|
|
54
54
|
* ***This endpoint is only needed to be called in rare cases when bridging was not confirmed automatically***
|
|
55
55
|
*
|
|
56
|
-
* Prepare a receiveMessage transaction to mint USDC to
|
|
56
|
+
* Prepare a receiveMessage transaction to mint USDC to any Product Account on the
|
|
57
57
|
* destination chain.
|
|
58
58
|
*
|
|
59
59
|
* **How it works:**
|
|
60
60
|
*
|
|
61
61
|
* This endpoint uses the `bridge_id` from `/burn` to:
|
|
62
|
-
* 1. Look up the bridge session
|
|
63
|
-
* 2.
|
|
64
|
-
* 3.
|
|
65
|
-
* 4. Check if Circle's attestation is ready
|
|
66
|
-
* 5. Return the mint transaction wrapped in Safe execTransaction
|
|
62
|
+
* 1. Look up the bridge session
|
|
63
|
+
* 2. Check if Circle's attestation is ready
|
|
64
|
+
* 3. Return the mint transaction
|
|
67
65
|
*
|
|
68
66
|
* **Request parameters:**
|
|
69
67
|
*
|
|
70
68
|
* - `bridge_id`: The bridge ID returned from `/burn`
|
|
71
|
-
* - `
|
|
72
|
-
* - `gas_sponsorship`: If true, returns EIP-712 typed data for gas-sponsored execution
|
|
69
|
+
* - `burn_tx_hash`: The transaction hash of the burn transaction on the source chain
|
|
73
70
|
*
|
|
74
71
|
* **Response codes:**
|
|
75
72
|
*
|
|
@@ -79,6 +76,8 @@ const async_js_1 = require("../types/async.js");
|
|
|
79
76
|
*
|
|
80
77
|
* **After receiving 202:**
|
|
81
78
|
*
|
|
79
|
+
* The SSE stream and status endpoint are in progress. Keep an eye on the updates from our team.
|
|
80
|
+
*
|
|
82
81
|
* Either:
|
|
83
82
|
* - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
|
|
84
83
|
* - Poll this endpoint periodically until you get 200
|
|
@@ -86,7 +85,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
86
85
|
* **After receiving 200:**
|
|
87
86
|
*
|
|
88
87
|
* Sign and broadcast the returned transaction on the destination chain to mint USDC
|
|
89
|
-
* to your
|
|
88
|
+
* to your Product Account.
|
|
90
89
|
*/
|
|
91
90
|
function bridgeCctpMint(client, request, options) {
|
|
92
91
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridgeCctpMint.js","sourceRoot":"","sources":["../../../src/funcs/bridgeCctpMint.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"bridgeCctpMint.js","sourceRoot":"","sources":["../../../src/funcs/bridgeCctpMint.ts"],"names":[],"mappings":";AAAA;;G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,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -6,7 +6,7 @@ export declare class Bridge extends ClientSDK {
|
|
|
6
6
|
* Initiate USDC bridging
|
|
7
7
|
*
|
|
8
8
|
* @remarks
|
|
9
|
-
* Build a transaction to burn USDC from
|
|
9
|
+
* Build a transaction to burn USDC from any Product Account on the source chain
|
|
10
10
|
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
11
11
|
*
|
|
12
12
|
* **Transfer modes:**
|
|
@@ -30,35 +30,30 @@ export declare class Bridge extends ClientSDK {
|
|
|
30
30
|
* - Arbitrum (domain 3)
|
|
31
31
|
* - Base (domain 6)
|
|
32
32
|
*
|
|
33
|
-
* **Note:** The USDC must already be deposited in the
|
|
33
|
+
* **Note:** The USDC must already be deposited in the Product Account. If approval is needed
|
|
34
34
|
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
35
|
-
*
|
|
36
|
-
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
37
35
|
*/
|
|
38
36
|
cctpBurn(request: components.DepositForBurnRequest, options?: RequestOptions): Promise<components.DepositForBurnResponse>;
|
|
39
37
|
/**
|
|
40
|
-
* Confirm bridging
|
|
38
|
+
* Confirm USDC bridging
|
|
41
39
|
*
|
|
42
40
|
* @remarks
|
|
43
41
|
* ***This endpoint is only needed to be called in rare cases when bridging was not confirmed automatically***
|
|
44
42
|
*
|
|
45
|
-
* Prepare a receiveMessage transaction to mint USDC to
|
|
43
|
+
* Prepare a receiveMessage transaction to mint USDC to any Product Account on the
|
|
46
44
|
* destination chain.
|
|
47
45
|
*
|
|
48
46
|
* **How it works:**
|
|
49
47
|
*
|
|
50
48
|
* This endpoint uses the `bridge_id` from `/burn` to:
|
|
51
|
-
* 1. Look up the bridge session
|
|
52
|
-
* 2.
|
|
53
|
-
* 3.
|
|
54
|
-
* 4. Check if Circle's attestation is ready
|
|
55
|
-
* 5. Return the mint transaction wrapped in Safe execTransaction
|
|
49
|
+
* 1. Look up the bridge session
|
|
50
|
+
* 2. Check if Circle's attestation is ready
|
|
51
|
+
* 3. Return the mint transaction
|
|
56
52
|
*
|
|
57
53
|
* **Request parameters:**
|
|
58
54
|
*
|
|
59
55
|
* - `bridge_id`: The bridge ID returned from `/burn`
|
|
60
|
-
* - `
|
|
61
|
-
* - `gas_sponsorship`: If true, returns EIP-712 typed data for gas-sponsored execution
|
|
56
|
+
* - `burn_tx_hash`: The transaction hash of the burn transaction on the source chain
|
|
62
57
|
*
|
|
63
58
|
* **Response codes:**
|
|
64
59
|
*
|
|
@@ -68,6 +63,8 @@ export declare class Bridge extends ClientSDK {
|
|
|
68
63
|
*
|
|
69
64
|
* **After receiving 202:**
|
|
70
65
|
*
|
|
66
|
+
* The SSE stream and status endpoint are in progress. Keep an eye on the updates from our team.
|
|
67
|
+
*
|
|
71
68
|
* Either:
|
|
72
69
|
* - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
|
|
73
70
|
* - Poll this endpoint periodically until you get 200
|
|
@@ -75,7 +72,7 @@ export declare class Bridge extends ClientSDK {
|
|
|
75
72
|
* **After receiving 200:**
|
|
76
73
|
*
|
|
77
74
|
* Sign and broadcast the returned transaction on the destination chain to mint USDC
|
|
78
|
-
* to your
|
|
75
|
+
* to your Product Account.
|
|
79
76
|
*/
|
|
80
77
|
cctpMint(request: components.MintPrepareRequest, options?: RequestOptions): Promise<operations.V2CctpMintResponse>;
|
|
81
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../../src/sdk/bridge.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,MAAO,SAAQ,SAAS;IACnC
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../../src/sdk/bridge.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,MAAO,SAAQ,SAAS;IACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;CAO1C"}
|
|
@@ -13,7 +13,7 @@ class Bridge extends sdks_js_1.ClientSDK {
|
|
|
13
13
|
* Initiate USDC bridging
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Build a transaction to burn USDC from
|
|
16
|
+
* Build a transaction to burn USDC from any Product Account on the source chain
|
|
17
17
|
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
18
18
|
*
|
|
19
19
|
* **Transfer modes:**
|
|
@@ -37,37 +37,32 @@ class Bridge extends sdks_js_1.ClientSDK {
|
|
|
37
37
|
* - Arbitrum (domain 3)
|
|
38
38
|
* - Base (domain 6)
|
|
39
39
|
*
|
|
40
|
-
* **Note:** The USDC must already be deposited in the
|
|
40
|
+
* **Note:** The USDC must already be deposited in the Product Account. If approval is needed
|
|
41
41
|
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
42
|
-
*
|
|
43
|
-
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
44
42
|
*/
|
|
45
43
|
async cctpBurn(request, options) {
|
|
46
44
|
return (0, fp_js_1.unwrapAsync)((0, bridgeCctpBurn_js_1.bridgeCctpBurn)(this, request, options));
|
|
47
45
|
}
|
|
48
46
|
/**
|
|
49
|
-
* Confirm bridging
|
|
47
|
+
* Confirm USDC bridging
|
|
50
48
|
*
|
|
51
49
|
* @remarks
|
|
52
50
|
* ***This endpoint is only needed to be called in rare cases when bridging was not confirmed automatically***
|
|
53
51
|
*
|
|
54
|
-
* Prepare a receiveMessage transaction to mint USDC to
|
|
52
|
+
* Prepare a receiveMessage transaction to mint USDC to any Product Account on the
|
|
55
53
|
* destination chain.
|
|
56
54
|
*
|
|
57
55
|
* **How it works:**
|
|
58
56
|
*
|
|
59
57
|
* This endpoint uses the `bridge_id` from `/burn` to:
|
|
60
|
-
* 1. Look up the bridge session
|
|
61
|
-
* 2.
|
|
62
|
-
* 3.
|
|
63
|
-
* 4. Check if Circle's attestation is ready
|
|
64
|
-
* 5. Return the mint transaction wrapped in Safe execTransaction
|
|
58
|
+
* 1. Look up the bridge session
|
|
59
|
+
* 2. Check if Circle's attestation is ready
|
|
60
|
+
* 3. Return the mint transaction
|
|
65
61
|
*
|
|
66
62
|
* **Request parameters:**
|
|
67
63
|
*
|
|
68
64
|
* - `bridge_id`: The bridge ID returned from `/burn`
|
|
69
|
-
* - `
|
|
70
|
-
* - `gas_sponsorship`: If true, returns EIP-712 typed data for gas-sponsored execution
|
|
65
|
+
* - `burn_tx_hash`: The transaction hash of the burn transaction on the source chain
|
|
71
66
|
*
|
|
72
67
|
* **Response codes:**
|
|
73
68
|
*
|
|
@@ -77,6 +72,8 @@ class Bridge extends sdks_js_1.ClientSDK {
|
|
|
77
72
|
*
|
|
78
73
|
* **After receiving 202:**
|
|
79
74
|
*
|
|
75
|
+
* The SSE stream and status endpoint are in progress. Keep an eye on the updates from our team.
|
|
76
|
+
*
|
|
80
77
|
* Either:
|
|
81
78
|
* - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
|
|
82
79
|
* - Poll this endpoint periodically until you get 200
|
|
@@ -84,7 +81,7 @@ class Bridge extends sdks_js_1.ClientSDK {
|
|
|
84
81
|
* **After receiving 200:**
|
|
85
82
|
*
|
|
86
83
|
* Sign and broadcast the returned transaction on the destination chain to mint USDC
|
|
87
|
-
* to your
|
|
84
|
+
* to your Product Account.
|
|
88
85
|
*/
|
|
89
86
|
async cctpMint(request, options) {
|
|
90
87
|
return (0, fp_js_1.unwrapAsync)((0, bridgeCctpMint_js_1.bridgeCctpMint)(this, request, options));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.js","sourceRoot":"","sources":["../../../src/sdk/bridge.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kEAA4D;AAC5D,kEAA4D;AAC5D,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,MAAO,SAAQ,mBAAS;IACnC
|
|
1
|
+
{"version":3,"file":"bridge.js","sourceRoot":"","sources":["../../../src/sdk/bridge.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kEAA4D;AAC5D,kEAA4D;AAC5D,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,MAAO,SAAQ,mBAAS;IACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA7FD,wBA6FC"}
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Initiate USDC bridging
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Build a transaction to burn USDC from
|
|
15
|
+
* Build a transaction to burn USDC from any Product Account on the source chain
|
|
16
16
|
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
17
17
|
*
|
|
18
18
|
* **Transfer modes:**
|
|
@@ -36,10 +36,8 @@ import { Result } from "../types/fp.js";
|
|
|
36
36
|
* - Arbitrum (domain 3)
|
|
37
37
|
* - Base (domain 6)
|
|
38
38
|
*
|
|
39
|
-
* **Note:** The USDC must already be deposited in the
|
|
39
|
+
* **Note:** The USDC must already be deposited in the Product Account. If approval is needed
|
|
40
40
|
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
41
|
-
*
|
|
42
|
-
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
43
41
|
*/
|
|
44
42
|
export declare function bridgeCctpBurn(client: CompassApiSDKCore, request: components.DepositForBurnRequest, options?: RequestOptions): APIPromise<Result<components.DepositForBurnResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
45
43
|
//# sourceMappingURL=bridgeCctpBurn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridgeCctpBurn.d.ts","sourceRoot":"","sources":["../../../src/funcs/bridgeCctpBurn.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,e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MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -14,7 +14,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
14
14
|
* Initiate USDC bridging
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
|
-
* Build a transaction to burn USDC from
|
|
17
|
+
* Build a transaction to burn USDC from any Product Account on the source chain
|
|
18
18
|
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
19
19
|
*
|
|
20
20
|
* **Transfer modes:**
|
|
@@ -38,10 +38,8 @@ import { APIPromise } from "../types/async.js";
|
|
|
38
38
|
* - Arbitrum (domain 3)
|
|
39
39
|
* - Base (domain 6)
|
|
40
40
|
*
|
|
41
|
-
* **Note:** The USDC must already be deposited in the
|
|
41
|
+
* **Note:** The USDC must already be deposited in the Product Account. If approval is needed
|
|
42
42
|
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
43
|
-
*
|
|
44
|
-
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
45
43
|
*/
|
|
46
44
|
export function bridgeCctpBurn(client, request, options) {
|
|
47
45
|
return new APIPromise($do(client, request, options));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridgeCctpBurn.js","sourceRoot":"","sources":["../../../src/funcs/bridgeCctpBurn.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,CA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CAAC,OAAO,CAAC,GAAG,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"}
|
|
@@ -10,28 +10,25 @@ import * as operations from "../models/operations/index.js";
|
|
|
10
10
|
import { APIPromise } from "../types/async.js";
|
|
11
11
|
import { Result } from "../types/fp.js";
|
|
12
12
|
/**
|
|
13
|
-
* Confirm bridging
|
|
13
|
+
* Confirm USDC bridging
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
* ***This endpoint is only needed to be called in rare cases when bridging was not confirmed automatically***
|
|
17
17
|
*
|
|
18
|
-
* Prepare a receiveMessage transaction to mint USDC to
|
|
18
|
+
* Prepare a receiveMessage transaction to mint USDC to any Product Account on the
|
|
19
19
|
* destination chain.
|
|
20
20
|
*
|
|
21
21
|
* **How it works:**
|
|
22
22
|
*
|
|
23
23
|
* This endpoint uses the `bridge_id` from `/burn` to:
|
|
24
|
-
* 1. Look up the bridge session
|
|
25
|
-
* 2.
|
|
26
|
-
* 3.
|
|
27
|
-
* 4. Check if Circle's attestation is ready
|
|
28
|
-
* 5. Return the mint transaction wrapped in Safe execTransaction
|
|
24
|
+
* 1. Look up the bridge session
|
|
25
|
+
* 2. Check if Circle's attestation is ready
|
|
26
|
+
* 3. Return the mint transaction
|
|
29
27
|
*
|
|
30
28
|
* **Request parameters:**
|
|
31
29
|
*
|
|
32
30
|
* - `bridge_id`: The bridge ID returned from `/burn`
|
|
33
|
-
* - `
|
|
34
|
-
* - `gas_sponsorship`: If true, returns EIP-712 typed data for gas-sponsored execution
|
|
31
|
+
* - `burn_tx_hash`: The transaction hash of the burn transaction on the source chain
|
|
35
32
|
*
|
|
36
33
|
* **Response codes:**
|
|
37
34
|
*
|
|
@@ -41,6 +38,8 @@ import { Result } from "../types/fp.js";
|
|
|
41
38
|
*
|
|
42
39
|
* **After receiving 202:**
|
|
43
40
|
*
|
|
41
|
+
* The SSE stream and status endpoint are in progress. Keep an eye on the updates from our team.
|
|
42
|
+
*
|
|
44
43
|
* Either:
|
|
45
44
|
* - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
|
|
46
45
|
* - Poll this endpoint periodically until you get 200
|
|
@@ -48,7 +47,7 @@ import { Result } from "../types/fp.js";
|
|
|
48
47
|
* **After receiving 200:**
|
|
49
48
|
*
|
|
50
49
|
* Sign and broadcast the returned transaction on the destination chain to mint USDC
|
|
51
|
-
* to your
|
|
50
|
+
* to your Product Account.
|
|
52
51
|
*/
|
|
53
52
|
export declare function bridgeCctpMint(client: CompassApiSDKCore, request: components.MintPrepareRequest, options?: RequestOptions): APIPromise<Result<operations.V2CctpMintResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
54
53
|
//# sourceMappingURL=bridgeCctpMint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridgeCctpMint.d.ts","sourceRoot":"","sources":["../../../src/funcs/bridgeCctpMint.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,C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AuCG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,kBAAkB,EAC3B,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -12,28 +12,25 @@ import * as errors from "../models/errors/index.js";
|
|
|
12
12
|
import * as operations from "../models/operations/index.js";
|
|
13
13
|
import { APIPromise } from "../types/async.js";
|
|
14
14
|
/**
|
|
15
|
-
* Confirm bridging
|
|
15
|
+
* Confirm USDC bridging
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
18
|
* ***This endpoint is only needed to be called in rare cases when bridging was not confirmed automatically***
|
|
19
19
|
*
|
|
20
|
-
* Prepare a receiveMessage transaction to mint USDC to
|
|
20
|
+
* Prepare a receiveMessage transaction to mint USDC to any Product Account on the
|
|
21
21
|
* destination chain.
|
|
22
22
|
*
|
|
23
23
|
* **How it works:**
|
|
24
24
|
*
|
|
25
25
|
* This endpoint uses the `bridge_id` from `/burn` to:
|
|
26
|
-
* 1. Look up the bridge session
|
|
27
|
-
* 2.
|
|
28
|
-
* 3.
|
|
29
|
-
* 4. Check if Circle's attestation is ready
|
|
30
|
-
* 5. Return the mint transaction wrapped in Safe execTransaction
|
|
26
|
+
* 1. Look up the bridge session
|
|
27
|
+
* 2. Check if Circle's attestation is ready
|
|
28
|
+
* 3. Return the mint transaction
|
|
31
29
|
*
|
|
32
30
|
* **Request parameters:**
|
|
33
31
|
*
|
|
34
32
|
* - `bridge_id`: The bridge ID returned from `/burn`
|
|
35
|
-
* - `
|
|
36
|
-
* - `gas_sponsorship`: If true, returns EIP-712 typed data for gas-sponsored execution
|
|
33
|
+
* - `burn_tx_hash`: The transaction hash of the burn transaction on the source chain
|
|
37
34
|
*
|
|
38
35
|
* **Response codes:**
|
|
39
36
|
*
|
|
@@ -43,6 +40,8 @@ import { APIPromise } from "../types/async.js";
|
|
|
43
40
|
*
|
|
44
41
|
* **After receiving 202:**
|
|
45
42
|
*
|
|
43
|
+
* The SSE stream and status endpoint are in progress. Keep an eye on the updates from our team.
|
|
44
|
+
*
|
|
46
45
|
* Either:
|
|
47
46
|
* - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
|
|
48
47
|
* - Poll this endpoint periodically until you get 200
|
|
@@ -50,7 +49,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
50
49
|
* **After receiving 200:**
|
|
51
50
|
*
|
|
52
51
|
* Sign and broadcast the returned transaction on the destination chain to mint USDC
|
|
53
|
-
* to your
|
|
52
|
+
* to your Product Account.
|
|
54
53
|
*/
|
|
55
54
|
export function bridgeCctpMint(client, request, options) {
|
|
56
55
|
return new APIPromise($do(client, request, options));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridgeCctpMint.js","sourceRoot":"","sources":["../../../src/funcs/bridgeCctpMint.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,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAS5D,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAGpD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,m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,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"}
|
package/dist/esm/sdk/bridge.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare class Bridge extends ClientSDK {
|
|
|
6
6
|
* Initiate USDC bridging
|
|
7
7
|
*
|
|
8
8
|
* @remarks
|
|
9
|
-
* Build a transaction to burn USDC from
|
|
9
|
+
* Build a transaction to burn USDC from any Product Account on the source chain
|
|
10
10
|
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
11
11
|
*
|
|
12
12
|
* **Transfer modes:**
|
|
@@ -30,35 +30,30 @@ export declare class Bridge extends ClientSDK {
|
|
|
30
30
|
* - Arbitrum (domain 3)
|
|
31
31
|
* - Base (domain 6)
|
|
32
32
|
*
|
|
33
|
-
* **Note:** The USDC must already be deposited in the
|
|
33
|
+
* **Note:** The USDC must already be deposited in the Product Account. If approval is needed
|
|
34
34
|
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
35
|
-
*
|
|
36
|
-
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
37
35
|
*/
|
|
38
36
|
cctpBurn(request: components.DepositForBurnRequest, options?: RequestOptions): Promise<components.DepositForBurnResponse>;
|
|
39
37
|
/**
|
|
40
|
-
* Confirm bridging
|
|
38
|
+
* Confirm USDC bridging
|
|
41
39
|
*
|
|
42
40
|
* @remarks
|
|
43
41
|
* ***This endpoint is only needed to be called in rare cases when bridging was not confirmed automatically***
|
|
44
42
|
*
|
|
45
|
-
* Prepare a receiveMessage transaction to mint USDC to
|
|
43
|
+
* Prepare a receiveMessage transaction to mint USDC to any Product Account on the
|
|
46
44
|
* destination chain.
|
|
47
45
|
*
|
|
48
46
|
* **How it works:**
|
|
49
47
|
*
|
|
50
48
|
* This endpoint uses the `bridge_id` from `/burn` to:
|
|
51
|
-
* 1. Look up the bridge session
|
|
52
|
-
* 2.
|
|
53
|
-
* 3.
|
|
54
|
-
* 4. Check if Circle's attestation is ready
|
|
55
|
-
* 5. Return the mint transaction wrapped in Safe execTransaction
|
|
49
|
+
* 1. Look up the bridge session
|
|
50
|
+
* 2. Check if Circle's attestation is ready
|
|
51
|
+
* 3. Return the mint transaction
|
|
56
52
|
*
|
|
57
53
|
* **Request parameters:**
|
|
58
54
|
*
|
|
59
55
|
* - `bridge_id`: The bridge ID returned from `/burn`
|
|
60
|
-
* - `
|
|
61
|
-
* - `gas_sponsorship`: If true, returns EIP-712 typed data for gas-sponsored execution
|
|
56
|
+
* - `burn_tx_hash`: The transaction hash of the burn transaction on the source chain
|
|
62
57
|
*
|
|
63
58
|
* **Response codes:**
|
|
64
59
|
*
|
|
@@ -68,6 +63,8 @@ export declare class Bridge extends ClientSDK {
|
|
|
68
63
|
*
|
|
69
64
|
* **After receiving 202:**
|
|
70
65
|
*
|
|
66
|
+
* The SSE stream and status endpoint are in progress. Keep an eye on the updates from our team.
|
|
67
|
+
*
|
|
71
68
|
* Either:
|
|
72
69
|
* - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
|
|
73
70
|
* - Poll this endpoint periodically until you get 200
|
|
@@ -75,7 +72,7 @@ export declare class Bridge extends ClientSDK {
|
|
|
75
72
|
* **After receiving 200:**
|
|
76
73
|
*
|
|
77
74
|
* Sign and broadcast the returned transaction on the destination chain to mint USDC
|
|
78
|
-
* to your
|
|
75
|
+
* to your Product Account.
|
|
79
76
|
*/
|
|
80
77
|
cctpMint(request: components.MintPrepareRequest, options?: RequestOptions): Promise<operations.V2CctpMintResponse>;
|
|
81
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../../src/sdk/bridge.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,MAAO,SAAQ,SAAS;IACnC
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../../src/sdk/bridge.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,MAAO,SAAQ,SAAS;IACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;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/bridge.js
CHANGED
|
@@ -10,7 +10,7 @@ export class Bridge extends ClientSDK {
|
|
|
10
10
|
* Initiate USDC bridging
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
|
-
* Build a transaction to burn USDC from
|
|
13
|
+
* Build a transaction to burn USDC from any Product Account on the source chain
|
|
14
14
|
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
15
15
|
*
|
|
16
16
|
* **Transfer modes:**
|
|
@@ -34,37 +34,32 @@ export class Bridge extends ClientSDK {
|
|
|
34
34
|
* - Arbitrum (domain 3)
|
|
35
35
|
* - Base (domain 6)
|
|
36
36
|
*
|
|
37
|
-
* **Note:** The USDC must already be deposited in the
|
|
37
|
+
* **Note:** The USDC must already be deposited in the Product Account. If approval is needed
|
|
38
38
|
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
39
|
-
*
|
|
40
|
-
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
41
39
|
*/
|
|
42
40
|
async cctpBurn(request, options) {
|
|
43
41
|
return unwrapAsync(bridgeCctpBurn(this, request, options));
|
|
44
42
|
}
|
|
45
43
|
/**
|
|
46
|
-
* Confirm bridging
|
|
44
|
+
* Confirm USDC bridging
|
|
47
45
|
*
|
|
48
46
|
* @remarks
|
|
49
47
|
* ***This endpoint is only needed to be called in rare cases when bridging was not confirmed automatically***
|
|
50
48
|
*
|
|
51
|
-
* Prepare a receiveMessage transaction to mint USDC to
|
|
49
|
+
* Prepare a receiveMessage transaction to mint USDC to any Product Account on the
|
|
52
50
|
* destination chain.
|
|
53
51
|
*
|
|
54
52
|
* **How it works:**
|
|
55
53
|
*
|
|
56
54
|
* This endpoint uses the `bridge_id` from `/burn` to:
|
|
57
|
-
* 1. Look up the bridge session
|
|
58
|
-
* 2.
|
|
59
|
-
* 3.
|
|
60
|
-
* 4. Check if Circle's attestation is ready
|
|
61
|
-
* 5. Return the mint transaction wrapped in Safe execTransaction
|
|
55
|
+
* 1. Look up the bridge session
|
|
56
|
+
* 2. Check if Circle's attestation is ready
|
|
57
|
+
* 3. Return the mint transaction
|
|
62
58
|
*
|
|
63
59
|
* **Request parameters:**
|
|
64
60
|
*
|
|
65
61
|
* - `bridge_id`: The bridge ID returned from `/burn`
|
|
66
|
-
* - `
|
|
67
|
-
* - `gas_sponsorship`: If true, returns EIP-712 typed data for gas-sponsored execution
|
|
62
|
+
* - `burn_tx_hash`: The transaction hash of the burn transaction on the source chain
|
|
68
63
|
*
|
|
69
64
|
* **Response codes:**
|
|
70
65
|
*
|
|
@@ -74,6 +69,8 @@ export class Bridge extends ClientSDK {
|
|
|
74
69
|
*
|
|
75
70
|
* **After receiving 202:**
|
|
76
71
|
*
|
|
72
|
+
* The SSE stream and status endpoint are in progress. Keep an eye on the updates from our team.
|
|
73
|
+
*
|
|
77
74
|
* Either:
|
|
78
75
|
* - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
|
|
79
76
|
* - Poll this endpoint periodically until you get 200
|
|
@@ -81,7 +78,7 @@ export class Bridge extends ClientSDK {
|
|
|
81
78
|
* **After receiving 200:**
|
|
82
79
|
*
|
|
83
80
|
* Sign and broadcast the returned transaction on the destination chain to mint USDC
|
|
84
|
-
* to your
|
|
81
|
+
* to your Product Account.
|
|
85
82
|
*/
|
|
86
83
|
async cctpMint(request, options) {
|
|
87
84
|
return unwrapAsync(bridgeCctpMint(this, request, options));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.js","sourceRoot":"","sources":["../../../src/sdk/bridge.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,MAAO,SAAQ,SAAS;IACnC
|
|
1
|
+
{"version":3,"file":"bridge.js","sourceRoot":"","sources":["../../../src/sdk/bridge.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,MAAO,SAAQ,SAAS;IACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAyC,EACzC,OAAwB;QAExB,OAAO,WAAW,CAAC,cAAc,CAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAsC,EACtC,OAAwB;QAExB,OAAO,WAAW,CAAC,cAAc,CAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Initiate USDC bridging
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Build a transaction to burn USDC from
|
|
32
|
+
* Build a transaction to burn USDC from any Product Account on the source chain
|
|
33
33
|
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
34
34
|
*
|
|
35
35
|
* **Transfer modes:**
|
|
@@ -53,10 +53,8 @@ import { Result } from "../types/fp.js";
|
|
|
53
53
|
* - Arbitrum (domain 3)
|
|
54
54
|
* - Base (domain 6)
|
|
55
55
|
*
|
|
56
|
-
* **Note:** The USDC must already be deposited in the
|
|
56
|
+
* **Note:** The USDC must already be deposited in the Product Account. If approval is needed
|
|
57
57
|
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
58
|
-
*
|
|
59
|
-
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
60
58
|
*/
|
|
61
59
|
export function bridgeCctpBurn(
|
|
62
60
|
client: CompassApiSDKCore,
|
|
@@ -27,28 +27,25 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
27
27
|
import { Result } from "../types/fp.js";
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Confirm bridging
|
|
30
|
+
* Confirm USDC bridging
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
33
|
* ***This endpoint is only needed to be called in rare cases when bridging was not confirmed automatically***
|
|
34
34
|
*
|
|
35
|
-
* Prepare a receiveMessage transaction to mint USDC to
|
|
35
|
+
* Prepare a receiveMessage transaction to mint USDC to any Product Account on the
|
|
36
36
|
* destination chain.
|
|
37
37
|
*
|
|
38
38
|
* **How it works:**
|
|
39
39
|
*
|
|
40
40
|
* This endpoint uses the `bridge_id` from `/burn` to:
|
|
41
|
-
* 1. Look up the bridge session
|
|
42
|
-
* 2.
|
|
43
|
-
* 3.
|
|
44
|
-
* 4. Check if Circle's attestation is ready
|
|
45
|
-
* 5. Return the mint transaction wrapped in Safe execTransaction
|
|
41
|
+
* 1. Look up the bridge session
|
|
42
|
+
* 2. Check if Circle's attestation is ready
|
|
43
|
+
* 3. Return the mint transaction
|
|
46
44
|
*
|
|
47
45
|
* **Request parameters:**
|
|
48
46
|
*
|
|
49
47
|
* - `bridge_id`: The bridge ID returned from `/burn`
|
|
50
|
-
* - `
|
|
51
|
-
* - `gas_sponsorship`: If true, returns EIP-712 typed data for gas-sponsored execution
|
|
48
|
+
* - `burn_tx_hash`: The transaction hash of the burn transaction on the source chain
|
|
52
49
|
*
|
|
53
50
|
* **Response codes:**
|
|
54
51
|
*
|
|
@@ -58,6 +55,8 @@ import { Result } from "../types/fp.js";
|
|
|
58
55
|
*
|
|
59
56
|
* **After receiving 202:**
|
|
60
57
|
*
|
|
58
|
+
* The SSE stream and status endpoint are in progress. Keep an eye on the updates from our team.
|
|
59
|
+
*
|
|
61
60
|
* Either:
|
|
62
61
|
* - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
|
|
63
62
|
* - Poll this endpoint periodically until you get 200
|
|
@@ -65,7 +64,7 @@ import { Result } from "../types/fp.js";
|
|
|
65
64
|
* **After receiving 200:**
|
|
66
65
|
*
|
|
67
66
|
* Sign and broadcast the returned transaction on the destination chain to mint USDC
|
|
68
|
-
* to your
|
|
67
|
+
* to your Product Account.
|
|
69
68
|
*/
|
|
70
69
|
export function bridgeCctpMint(
|
|
71
70
|
client: CompassApiSDKCore,
|
package/src/sdk/bridge.ts
CHANGED
|
@@ -14,7 +14,7 @@ export class Bridge extends ClientSDK {
|
|
|
14
14
|
* Initiate USDC bridging
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
|
-
* Build a transaction to burn USDC from
|
|
17
|
+
* Build a transaction to burn USDC from any Product Account on the source chain
|
|
18
18
|
* and initiate a cross-chain transfer via Circle's CCTP V2 (Cross-Chain Transfer Protocol).
|
|
19
19
|
*
|
|
20
20
|
* **Transfer modes:**
|
|
@@ -38,10 +38,8 @@ export class Bridge extends ClientSDK {
|
|
|
38
38
|
* - Arbitrum (domain 3)
|
|
39
39
|
* - Base (domain 6)
|
|
40
40
|
*
|
|
41
|
-
* **Note:** The USDC must already be deposited in the
|
|
41
|
+
* **Note:** The USDC must already be deposited in the Product Account. If approval is needed
|
|
42
42
|
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
43
|
-
*
|
|
44
|
-
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
45
43
|
*/
|
|
46
44
|
async cctpBurn(
|
|
47
45
|
request: components.DepositForBurnRequest,
|
|
@@ -55,28 +53,25 @@ export class Bridge extends ClientSDK {
|
|
|
55
53
|
}
|
|
56
54
|
|
|
57
55
|
/**
|
|
58
|
-
* Confirm bridging
|
|
56
|
+
* Confirm USDC bridging
|
|
59
57
|
*
|
|
60
58
|
* @remarks
|
|
61
59
|
* ***This endpoint is only needed to be called in rare cases when bridging was not confirmed automatically***
|
|
62
60
|
*
|
|
63
|
-
* Prepare a receiveMessage transaction to mint USDC to
|
|
61
|
+
* Prepare a receiveMessage transaction to mint USDC to any Product Account on the
|
|
64
62
|
* destination chain.
|
|
65
63
|
*
|
|
66
64
|
* **How it works:**
|
|
67
65
|
*
|
|
68
66
|
* This endpoint uses the `bridge_id` from `/burn` to:
|
|
69
|
-
* 1. Look up the bridge session
|
|
70
|
-
* 2.
|
|
71
|
-
* 3.
|
|
72
|
-
* 4. Check if Circle's attestation is ready
|
|
73
|
-
* 5. Return the mint transaction wrapped in Safe execTransaction
|
|
67
|
+
* 1. Look up the bridge session
|
|
68
|
+
* 2. Check if Circle's attestation is ready
|
|
69
|
+
* 3. Return the mint transaction
|
|
74
70
|
*
|
|
75
71
|
* **Request parameters:**
|
|
76
72
|
*
|
|
77
73
|
* - `bridge_id`: The bridge ID returned from `/burn`
|
|
78
|
-
* - `
|
|
79
|
-
* - `gas_sponsorship`: If true, returns EIP-712 typed data for gas-sponsored execution
|
|
74
|
+
* - `burn_tx_hash`: The transaction hash of the burn transaction on the source chain
|
|
80
75
|
*
|
|
81
76
|
* **Response codes:**
|
|
82
77
|
*
|
|
@@ -86,6 +81,8 @@ export class Bridge extends ClientSDK {
|
|
|
86
81
|
*
|
|
87
82
|
* **After receiving 202:**
|
|
88
83
|
*
|
|
84
|
+
* The SSE stream and status endpoint are in progress. Keep an eye on the updates from our team.
|
|
85
|
+
*
|
|
89
86
|
* Either:
|
|
90
87
|
* - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
|
|
91
88
|
* - Poll this endpoint periodically until you get 200
|
|
@@ -93,7 +90,7 @@ export class Bridge extends ClientSDK {
|
|
|
93
90
|
* **After receiving 200:**
|
|
94
91
|
*
|
|
95
92
|
* Sign and broadcast the returned transaction on the destination chain to mint USDC
|
|
96
|
-
* to your
|
|
93
|
+
* to your Product Account.
|
|
97
94
|
*/
|
|
98
95
|
async cctpMint(
|
|
99
96
|
request: components.MintPrepareRequest,
|