@compass-labs/api-sdk 2.1.10-rc.6 → 2.1.10-rc.8
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/models/components/depositforburnrequest.d.ts +3 -13
- package/dist/commonjs/models/components/depositforburnrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/depositforburnrequest.js.map +1 -1
- package/dist/commonjs/models/components/mintpreparereadyresponse.d.ts +3 -17
- package/dist/commonjs/models/components/mintpreparereadyresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/mintpreparereadyresponse.js +1 -7
- package/dist/commonjs/models/components/mintpreparereadyresponse.js.map +1 -1
- package/dist/commonjs/models/components/mintpreparerequest.d.ts +4 -18
- package/dist/commonjs/models/components/mintpreparerequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/mintpreparerequest.js +1 -3
- package/dist/commonjs/models/components/mintpreparerequest.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/models/components/depositforburnrequest.d.ts +3 -13
- package/dist/esm/models/components/depositforburnrequest.d.ts.map +1 -1
- package/dist/esm/models/components/depositforburnrequest.js.map +1 -1
- package/dist/esm/models/components/mintpreparereadyresponse.d.ts +3 -17
- package/dist/esm/models/components/mintpreparereadyresponse.d.ts.map +1 -1
- package/dist/esm/models/components/mintpreparereadyresponse.js +1 -7
- package/dist/esm/models/components/mintpreparereadyresponse.js.map +1 -1
- package/dist/esm/models/components/mintpreparerequest.d.ts +4 -18
- package/dist/esm/models/components/mintpreparerequest.d.ts.map +1 -1
- package/dist/esm/models/components/mintpreparerequest.js +1 -3
- package/dist/esm/models/components/mintpreparerequest.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/models/components/depositforburnrequest.ts +3 -13
- package/src/models/components/mintpreparereadyresponse.ts +4 -26
- package/src/models/components/mintpreparerequest.ts +5 -21
- package/src/sdk/bridge.ts +11 -14
|
@@ -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,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,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD
|
|
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;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AG,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"}
|
|
@@ -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,mBAAmB,CAAC;AAGxD
|
|
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,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22 +44,12 @@ export type DepositForBurnRequestTransferMode = ClosedEnum<typeof DepositForBurn
|
|
|
44
44
|
*
|
|
45
45
|
* @remarks
|
|
46
46
|
*
|
|
47
|
-
* Burns USDC from
|
|
48
|
-
*
|
|
49
|
-
* supporting both direct owner execution and gas-sponsored transactions.
|
|
50
|
-
*
|
|
51
|
-
* Flow:
|
|
52
|
-
* 1. Owner calls this endpoint to get either:
|
|
53
|
-
* - An unsigned transaction (gas_sponsorship=False)
|
|
54
|
-
* - EIP-712 typed data for signing (gas_sponsorship=True)
|
|
55
|
-
* 2. Owner signs the transaction/typed data
|
|
56
|
-
* 3. Transaction is broadcast on source chain
|
|
57
|
-
* 4. Wait for Circle's attestation service
|
|
58
|
-
* 5. Call receiveMessage on destination chain to mint USDC
|
|
47
|
+
* Burns USDC from a Product Account to initiate a cross-chain transfer via Circle's
|
|
48
|
+
* CCTP.
|
|
59
49
|
*/
|
|
60
50
|
export type DepositForBurnRequest = {
|
|
61
51
|
/**
|
|
62
|
-
* The primary wallet address that owns and controls the
|
|
52
|
+
* The primary wallet address that owns and controls the Product Account.
|
|
63
53
|
*/
|
|
64
54
|
owner: string;
|
|
65
55
|
/**
|
|
@@ -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;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;CAGpC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,UAAU,CACxD,OAAO,iCAAiC,CACzC,CAAC;AAEF
|
|
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;;;;;;;GAOG;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,CAAC;IACrC;;OAEG;IACH,YAAY,CAAC,EAAE,iCAAiC,GAAG,SAAS,CAAC;CAC9D,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,aAAa,CACrE,OAAO,0BAA0B,CACS,CAAC;AAE7C,gBAAgB;AAChB,MAAM,MAAM,oCAAoC,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnE,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,OAAO,CAChE,oCAAoC,EACpC,CAAC,CAAC,UAAU,EACZ,2BAA2B,CACQ,CAAC;AAEtC,wBAAgB,iCAAiC,CAC/C,2BAA2B,EAAE,2BAA2B,GACvD,MAAM,CAMR;AAED,gBAAgB;AAChB,eAAO,MAAM,+BAA+B,EAAE,CAAC,CAAC,aAAa,CAC3D,OAAO,gBAAgB,CACS,CAAC;AAEnC,gBAAgB;AAChB,eAAO,MAAM,gDAAgD,EAAE,CAAC,CAAC,aAAa,CAC5E,OAAO,iCAAiC,CACS,CAAC;AAEpD,gBAAgB;AAChB,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depositforburnrequest.js","sourceRoot":"","sources":["../../../../src/models/components/depositforburnrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MA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
import * as z from "zod/v3";
|
|
2
2
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
import { BatchedSafeOperationsResponseOutput } from "./batchedsafeoperationsresponseoutput.js";
|
|
5
4
|
import { UnsignedTransaction } from "./unsignedtransaction.js";
|
|
6
5
|
/**
|
|
7
6
|
* Response when attestation is ready and mint transaction can be built.
|
|
8
7
|
*
|
|
9
8
|
* @remarks
|
|
10
9
|
*
|
|
11
|
-
* Returned with 200 OK status code. Contains
|
|
12
|
-
*
|
|
13
|
-
* calls receiveMessage on the MessageTransmitter contract through the Earn Account
|
|
14
|
-
* (Safe).
|
|
10
|
+
* Returned with 200 OK status code. Contains an unsigned transaction that calls
|
|
11
|
+
* receiveMessage on the MessageTransmitter contract.
|
|
15
12
|
*/
|
|
16
13
|
export type MintPrepareReadyResponse = {
|
|
17
14
|
/**
|
|
@@ -22,18 +19,7 @@ export type MintPrepareReadyResponse = {
|
|
|
22
19
|
* The bridge identifier.
|
|
23
20
|
*/
|
|
24
21
|
bridgeId: string;
|
|
25
|
-
|
|
26
|
-
* Unsigned Safe execTransaction for the destination chain that calls receiveMessage on the MessageTransmitter contract. Sign and broadcast this to mint USDC to your Earn Account. Present when gas_sponsorship=False.
|
|
27
|
-
*/
|
|
28
|
-
transaction?: UnsignedTransaction | null | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* EIP-712 typed data for off-chain signing. The owner signs this data and submits it to /gas_sponsorship/prepare for a relayer to execute. Present when gas_sponsorship=True.
|
|
31
|
-
*/
|
|
32
|
-
eip712?: BatchedSafeOperationsResponseOutput | null | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* The CCTP message hash used to obtain the attestation.
|
|
35
|
-
*/
|
|
36
|
-
messageHash: string;
|
|
22
|
+
transaction: UnsignedTransaction;
|
|
37
23
|
};
|
|
38
24
|
/** @internal */
|
|
39
25
|
export declare const MintPrepareReadyResponse$inboundSchema: z.ZodType<MintPrepareReadyResponse, z.ZodTypeDef, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintpreparereadyresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/mintpreparereadyresponse.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,
|
|
1
|
+
{"version":3,"file":"mintpreparereadyresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/mintpreparereadyresponse.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,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC;;;;;;;GAOG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,mBAAmB,CAAC;CAClC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,OAAO,CASP,CAAC;AAEH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAM/D"}
|
|
@@ -4,21 +4,15 @@
|
|
|
4
4
|
import * as z from "zod/v3";
|
|
5
5
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { BatchedSafeOperationsResponseOutput$inboundSchema, } from "./batchedsafeoperationsresponseoutput.js";
|
|
8
7
|
import { UnsignedTransaction$inboundSchema, } from "./unsignedtransaction.js";
|
|
9
8
|
/** @internal */
|
|
10
9
|
export const MintPrepareReadyResponse$inboundSchema = z.object({
|
|
11
10
|
status: z.literal("ready").default("ready").optional(),
|
|
12
11
|
bridge_id: z.string(),
|
|
13
|
-
transaction:
|
|
14
|
-
eip_712: z.nullable(BatchedSafeOperationsResponseOutput$inboundSchema)
|
|
15
|
-
.optional(),
|
|
16
|
-
message_hash: z.string(),
|
|
12
|
+
transaction: UnsignedTransaction$inboundSchema,
|
|
17
13
|
}).transform((v) => {
|
|
18
14
|
return remap$(v, {
|
|
19
15
|
"bridge_id": "bridgeId",
|
|
20
|
-
"eip_712": "eip712",
|
|
21
|
-
"message_hash": "messageHash",
|
|
22
16
|
});
|
|
23
17
|
});
|
|
24
18
|
export function mintPrepareReadyResponseFromJSON(jsonString) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintpreparereadyresponse.js","sourceRoot":"","sources":["../../../../src/models/components/mintpreparereadyresponse.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;AAGjD,OAAO,EAEL,
|
|
1
|
+
{"version":3,"file":"mintpreparereadyresponse.js","sourceRoot":"","sources":["../../../../src/models/components/mintpreparereadyresponse.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;AAGjD,OAAO,EAEL,iCAAiC,GAClC,MAAM,0BAA0B,CAAC;AAsBlC,gBAAgB;AAChB,MAAM,CAAC,MAAM,sCAAsC,GAI/C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;IACtD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,WAAW,EAAE,iCAAiC;CAC/C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,WAAW,EAAE,UAAU;KACxB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,gCAAgC,CAC9C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,sCAAsC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClE,sDAAsD,CACvD,CAAC;AACJ,CAAC"}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
2
|
/**
|
|
3
|
-
* Request model for preparing a CCTP mint transaction
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
*
|
|
7
|
-
* The mint/prepare endpoint uses the bridge_id and burn_tx_hash to:
|
|
8
|
-
* 1. Look up the bridge session created during burn/prepare
|
|
9
|
-
* 2. Find the DepositForBurn event using the burn transaction hash
|
|
10
|
-
* 3. Extract the CCTP message and compute its hash
|
|
11
|
-
* 4. Check if Circle's attestation is ready
|
|
12
|
-
* 5. Return the mint transaction wrapped in Safe execTransaction
|
|
3
|
+
* Request model for preparing a CCTP mint transaction.
|
|
13
4
|
*/
|
|
14
5
|
export type MintPrepareRequest = {
|
|
15
6
|
/**
|
|
@@ -21,20 +12,15 @@ export type MintPrepareRequest = {
|
|
|
21
12
|
*/
|
|
22
13
|
burnTxHash: string;
|
|
23
14
|
/**
|
|
24
|
-
* The
|
|
15
|
+
* The wallet address that will sign and send the mint transaction.
|
|
25
16
|
*/
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* 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`).
|
|
29
|
-
*/
|
|
30
|
-
gasSponsorship?: boolean | undefined;
|
|
17
|
+
sender: string;
|
|
31
18
|
};
|
|
32
19
|
/** @internal */
|
|
33
20
|
export type MintPrepareRequest$Outbound = {
|
|
34
21
|
bridge_id: string;
|
|
35
22
|
burn_tx_hash: string;
|
|
36
|
-
|
|
37
|
-
gas_sponsorship?: boolean | undefined;
|
|
23
|
+
sender: string;
|
|
38
24
|
};
|
|
39
25
|
/** @internal */
|
|
40
26
|
export declare const MintPrepareRequest$outboundSchema: z.ZodType<MintPrepareRequest$Outbound, z.ZodTypeDef, MintPrepareRequest>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintpreparerequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/mintpreparerequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B
|
|
1
|
+
{"version":3,"file":"mintpreparerequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/mintpreparerequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GAAG;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CAUlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR"}
|
|
@@ -7,13 +7,11 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
export const MintPrepareRequest$outboundSchema = z.object({
|
|
8
8
|
bridgeId: z.string(),
|
|
9
9
|
burnTxHash: z.string(),
|
|
10
|
-
|
|
11
|
-
gasSponsorship: z.boolean().optional(),
|
|
10
|
+
sender: z.string(),
|
|
12
11
|
}).transform((v) => {
|
|
13
12
|
return remap$(v, {
|
|
14
13
|
bridgeId: "bridge_id",
|
|
15
14
|
burnTxHash: "burn_tx_hash",
|
|
16
|
-
gasSponsorship: "gas_sponsorship",
|
|
17
15
|
});
|
|
18
16
|
});
|
|
19
17
|
export function mintPrepareRequestToJSON(mintPrepareRequest) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintpreparerequest.js","sourceRoot":"","sources":["../../../../src/models/components/mintpreparerequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"mintpreparerequest.js","sourceRoot":"","sources":["../../../../src/models/components/mintpreparerequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AA2B1D,gBAAgB;AAChB,MAAM,CAAC,MAAM,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,cAAc;KAC3B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,iCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,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,
|