@compass-labs/api-sdk 2.1.10-rc.5 → 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 +5 -5
- package/dist/commonjs/funcs/{cctpCCTPBurn.d.ts → bridgeCctpBurn.d.ts} +7 -7
- package/dist/commonjs/funcs/bridgeCctpBurn.d.ts.map +1 -0
- package/dist/commonjs/funcs/{cctpCCTPBurn.js → bridgeCctpBurn.js} +8 -8
- package/dist/commonjs/funcs/bridgeCctpBurn.js.map +1 -0
- package/dist/commonjs/funcs/{cctpCCTPMint.d.ts → bridgeCctpMint.d.ts} +13 -12
- package/dist/commonjs/funcs/bridgeCctpMint.d.ts.map +1 -0
- package/dist/commonjs/funcs/{cctpCCTPMint.js → bridgeCctpMint.js} +14 -13
- package/dist/commonjs/funcs/bridgeCctpMint.js.map +1 -0
- package/dist/{esm/sdk/cctp.d.ts → commonjs/sdk/bridge.d.ts} +18 -17
- package/dist/commonjs/sdk/bridge.d.ts.map +1 -0
- package/dist/commonjs/sdk/{cctp.js → bridge.js} +24 -23
- package/dist/commonjs/sdk/bridge.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -3
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +3 -3
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/{cctpCCTPBurn.d.ts → bridgeCctpBurn.d.ts} +7 -7
- package/dist/esm/funcs/bridgeCctpBurn.d.ts.map +1 -0
- package/dist/esm/funcs/{cctpCCTPBurn.js → bridgeCctpBurn.js} +7 -7
- package/dist/esm/funcs/bridgeCctpBurn.js.map +1 -0
- package/dist/esm/funcs/{cctpCCTPMint.d.ts → bridgeCctpMint.d.ts} +13 -12
- package/dist/esm/funcs/bridgeCctpMint.d.ts.map +1 -0
- package/dist/esm/funcs/{cctpCCTPMint.js → bridgeCctpMint.js} +13 -12
- package/dist/esm/funcs/bridgeCctpMint.js.map +1 -0
- package/dist/{commonjs/sdk/cctp.d.ts → esm/sdk/bridge.d.ts} +18 -17
- package/dist/esm/sdk/bridge.d.ts.map +1 -0
- package/dist/esm/sdk/{cctp.js → bridge.js} +22 -21
- package/dist/esm/sdk/bridge.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -3
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +3 -3
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/{cctpCCTPBurn.ts → bridgeCctpBurn.ts} +6 -6
- package/src/funcs/{cctpCCTPMint.ts → bridgeCctpMint.ts} +12 -11
- package/src/sdk/{cctp.ts → bridge.ts} +21 -20
- package/src/sdk/sdk.ts +4 -4
- package/dist/commonjs/funcs/cctpCCTPBurn.d.ts.map +0 -1
- package/dist/commonjs/funcs/cctpCCTPBurn.js.map +0 -1
- package/dist/commonjs/funcs/cctpCCTPMint.d.ts.map +0 -1
- package/dist/commonjs/funcs/cctpCCTPMint.js.map +0 -1
- package/dist/commonjs/sdk/cctp.d.ts.map +0 -1
- package/dist/commonjs/sdk/cctp.js.map +0 -1
- package/dist/esm/funcs/cctpCCTPBurn.d.ts.map +0 -1
- package/dist/esm/funcs/cctpCCTPBurn.js.map +0 -1
- package/dist/esm/funcs/cctpCCTPMint.d.ts.map +0 -1
- package/dist/esm/funcs/cctpCCTPMint.js.map +0 -1
- package/dist/esm/sdk/cctp.d.ts.map +0 -1
- package/dist/esm/sdk/cctp.js.map +0 -1
package/README.md
CHANGED
|
@@ -166,10 +166,10 @@ run();
|
|
|
166
166
|
* [aerodromeSlipstreamLiquidityProvisionIncrease](docs/sdks/aerodromeslipstream/README.md#aerodromeslipstreamliquidityprovisionincrease) - Increase an LP Position
|
|
167
167
|
* [aerodromeSlipstreamLiquidityProvisionWithdraw](docs/sdks/aerodromeslipstream/README.md#aerodromeslipstreamliquidityprovisionwithdraw) - Withdraw an LP Position
|
|
168
168
|
|
|
169
|
-
### [
|
|
169
|
+
### [bridge](docs/sdks/bridge/README.md)
|
|
170
170
|
|
|
171
|
-
* [cctpBurn](docs/sdks/
|
|
172
|
-
* [cctpMint](docs/sdks/
|
|
171
|
+
* [cctpBurn](docs/sdks/bridge/README.md#cctpburn) - Initiate USDC bridging
|
|
172
|
+
* [cctpMint](docs/sdks/bridge/README.md#cctpmint) - Confirm USDC bridging
|
|
173
173
|
|
|
174
174
|
### [earn](docs/sdks/earn/README.md)
|
|
175
175
|
|
|
@@ -320,8 +320,8 @@ 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
|
-
- [`
|
|
324
|
-
- [`
|
|
323
|
+
- [`bridgeCctpBurn`](docs/sdks/bridge/README.md#cctpburn) - Initiate USDC 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
|
|
@@ -9,10 +9,10 @@ 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
|
-
*
|
|
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:**
|
|
@@ -29,15 +29,15 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
30
30
|
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
31
31
|
*
|
|
32
|
+
* Step 5 is only required as a fail safe mechanism to mint USDC on a destination chain when bridging has not been confirmed up automatically.
|
|
33
|
+
*
|
|
32
34
|
* **Supported chains:**
|
|
33
35
|
* - Ethereum (domain 0)
|
|
34
36
|
* - Arbitrum (domain 3)
|
|
35
37
|
* - Base (domain 6)
|
|
36
38
|
*
|
|
37
|
-
* **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
|
|
38
40
|
* 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
41
|
*/
|
|
42
|
-
export declare function
|
|
43
|
-
//# sourceMappingURL=
|
|
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>>;
|
|
43
|
+
//# sourceMappingURL=bridgeCctpBurn.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.bridgeCctpBurn = bridgeCctpBurn;
|
|
40
40
|
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
41
|
const M = __importStar(require("../lib/matchers.js"));
|
|
42
42
|
const primitives_js_1 = require("../lib/primitives.js");
|
|
@@ -47,10 +47,10 @@ 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
|
-
*
|
|
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:**
|
|
@@ -67,17 +67,17 @@ const async_js_1 = require("../types/async.js");
|
|
|
67
67
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
68
68
|
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
69
69
|
*
|
|
70
|
+
* Step 5 is only required as a fail safe mechanism to mint USDC on a destination chain when bridging has not been confirmed up automatically.
|
|
71
|
+
*
|
|
70
72
|
* **Supported chains:**
|
|
71
73
|
* - Ethereum (domain 0)
|
|
72
74
|
* - Arbitrum (domain 3)
|
|
73
75
|
* - Base (domain 6)
|
|
74
76
|
*
|
|
75
|
-
* **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
|
|
76
78
|
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
77
|
-
*
|
|
78
|
-
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
79
79
|
*/
|
|
80
|
-
function
|
|
80
|
+
function bridgeCctpBurn(client, request, options) {
|
|
81
81
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
82
82
|
}
|
|
83
83
|
async function $do(client, request, options) {
|
|
@@ -140,4 +140,4 @@ async function $do(client, request, options) {
|
|
|
140
140
|
}
|
|
141
141
|
return [result, { status: "complete", request: req, response }];
|
|
142
142
|
}
|
|
143
|
-
//# sourceMappingURL=
|
|
143
|
+
//# sourceMappingURL=bridgeCctpBurn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAyB,EACzB,OAAyC,EACzC,OAAwB;IAkBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,oCAAoC,CAAC,KAAK,CAAC,KAAK,CAAC,EACvE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAA,yBAAU,EAAC,MAAM,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAE5D,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,eAAe,CAAC,EAAE,CAAC;IAE3C,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC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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,26 +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
|
-
*
|
|
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
|
+
*
|
|
18
|
+
* Prepare a receiveMessage transaction to mint USDC to any Product Account on the
|
|
17
19
|
* destination chain.
|
|
18
20
|
*
|
|
19
21
|
* **How it works:**
|
|
20
22
|
*
|
|
21
23
|
* This endpoint uses the `bridge_id` from `/burn` to:
|
|
22
|
-
* 1. Look up the bridge session
|
|
23
|
-
* 2.
|
|
24
|
-
* 3.
|
|
25
|
-
* 4. Check if Circle's attestation is ready
|
|
26
|
-
* 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
|
|
27
27
|
*
|
|
28
28
|
* **Request parameters:**
|
|
29
29
|
*
|
|
30
30
|
* - `bridge_id`: The bridge ID returned from `/burn`
|
|
31
|
-
* - `
|
|
32
|
-
* - `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
|
|
33
32
|
*
|
|
34
33
|
* **Response codes:**
|
|
35
34
|
*
|
|
@@ -39,6 +38,8 @@ import { Result } from "../types/fp.js";
|
|
|
39
38
|
*
|
|
40
39
|
* **After receiving 202:**
|
|
41
40
|
*
|
|
41
|
+
* The SSE stream and status endpoint are in progress. Keep an eye on the updates from our team.
|
|
42
|
+
*
|
|
42
43
|
* Either:
|
|
43
44
|
* - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
|
|
44
45
|
* - Poll this endpoint periodically until you get 200
|
|
@@ -46,7 +47,7 @@ import { Result } from "../types/fp.js";
|
|
|
46
47
|
* **After receiving 200:**
|
|
47
48
|
*
|
|
48
49
|
* Sign and broadcast the returned transaction on the destination chain to mint USDC
|
|
49
|
-
* to your
|
|
50
|
+
* to your Product Account.
|
|
50
51
|
*/
|
|
51
|
-
export declare function
|
|
52
|
-
//# sourceMappingURL=
|
|
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>>;
|
|
53
|
+
//# sourceMappingURL=bridgeCctpMint.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.bridgeCctpMint = bridgeCctpMint;
|
|
40
40
|
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
41
|
const M = __importStar(require("../lib/matchers.js"));
|
|
42
42
|
const primitives_js_1 = require("../lib/primitives.js");
|
|
@@ -48,26 +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
|
-
*
|
|
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
|
+
*
|
|
56
|
+
* Prepare a receiveMessage transaction to mint USDC to any Product Account on the
|
|
55
57
|
* destination chain.
|
|
56
58
|
*
|
|
57
59
|
* **How it works:**
|
|
58
60
|
*
|
|
59
61
|
* 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
|
|
62
|
+
* 1. Look up the bridge session
|
|
63
|
+
* 2. Check if Circle's attestation is ready
|
|
64
|
+
* 3. Return the mint transaction
|
|
65
65
|
*
|
|
66
66
|
* **Request parameters:**
|
|
67
67
|
*
|
|
68
68
|
* - `bridge_id`: The bridge ID returned from `/burn`
|
|
69
|
-
* - `
|
|
70
|
-
* - `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
|
|
71
70
|
*
|
|
72
71
|
* **Response codes:**
|
|
73
72
|
*
|
|
@@ -77,6 +76,8 @@ const async_js_1 = require("../types/async.js");
|
|
|
77
76
|
*
|
|
78
77
|
* **After receiving 202:**
|
|
79
78
|
*
|
|
79
|
+
* The SSE stream and status endpoint are in progress. Keep an eye on the updates from our team.
|
|
80
|
+
*
|
|
80
81
|
* Either:
|
|
81
82
|
* - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
|
|
82
83
|
* - Poll this endpoint periodically until you get 200
|
|
@@ -84,9 +85,9 @@ const async_js_1 = require("../types/async.js");
|
|
|
84
85
|
* **After receiving 200:**
|
|
85
86
|
*
|
|
86
87
|
* Sign and broadcast the returned transaction on the destination chain to mint USDC
|
|
87
|
-
* to your
|
|
88
|
+
* to your Product Account.
|
|
88
89
|
*/
|
|
89
|
-
function
|
|
90
|
+
function bridgeCctpMint(client, request, options) {
|
|
90
91
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
91
92
|
}
|
|
92
93
|
async function $do(client, request, options) {
|
|
@@ -149,4 +150,4 @@ async function $do(client, request, options) {
|
|
|
149
150
|
}
|
|
150
151
|
return [result, { status: "complete", request: req, response }];
|
|
151
152
|
}
|
|
152
|
-
//# sourceMappingURL=
|
|
153
|
+
//# sourceMappingURL=bridgeCctpMint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridgeCctpMint.js","sourceRoot":"","sources":["../../../src/funcs/bridgeCctpMint.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEH,wCAuBC;AAtFD,sDAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAGpD,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,SAAgB,cAAc,CAC5B,MAAyB,EACzB,OAAsC,EACtC,OAAwB;IAexB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAyB,EACzB,OAAsC,EACtC,OAAwB;IAkBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,iCAAiC,CAAC,KAAK,CAAC,KAAK,CAAC,EACpE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAA,yBAAU,EAAC,MAAM,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAE5D,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,eAAe,CAAC,EA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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"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
2
|
import * as components from "../models/components/index.js";
|
|
3
3
|
import * as operations from "../models/operations/index.js";
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class Bridge extends ClientSDK {
|
|
5
5
|
/**
|
|
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:**
|
|
@@ -23,38 +23,37 @@ export declare class Cctp extends ClientSDK {
|
|
|
23
23
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
24
24
|
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
25
25
|
*
|
|
26
|
+
* Step 5 is only required as a fail safe mechanism to mint USDC on a destination chain when bridging has not been confirmed up automatically.
|
|
27
|
+
*
|
|
26
28
|
* **Supported chains:**
|
|
27
29
|
* - Ethereum (domain 0)
|
|
28
30
|
* - Arbitrum (domain 3)
|
|
29
31
|
* - Base (domain 6)
|
|
30
32
|
*
|
|
31
|
-
* **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
|
|
32
34
|
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
33
|
-
*
|
|
34
|
-
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
35
35
|
*/
|
|
36
36
|
cctpBurn(request: components.DepositForBurnRequest, options?: RequestOptions): Promise<components.DepositForBurnResponse>;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Confirm USDC bridging
|
|
39
39
|
*
|
|
40
40
|
* @remarks
|
|
41
|
-
*
|
|
41
|
+
* ***This endpoint is only needed to be called in rare cases when bridging was not confirmed automatically***
|
|
42
|
+
*
|
|
43
|
+
* Prepare a receiveMessage transaction to mint USDC to any Product Account on the
|
|
42
44
|
* destination chain.
|
|
43
45
|
*
|
|
44
46
|
* **How it works:**
|
|
45
47
|
*
|
|
46
48
|
* This endpoint uses the `bridge_id` from `/burn` to:
|
|
47
|
-
* 1. Look up the bridge session
|
|
48
|
-
* 2.
|
|
49
|
-
* 3.
|
|
50
|
-
* 4. Check if Circle's attestation is ready
|
|
51
|
-
* 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
|
|
52
52
|
*
|
|
53
53
|
* **Request parameters:**
|
|
54
54
|
*
|
|
55
55
|
* - `bridge_id`: The bridge ID returned from `/burn`
|
|
56
|
-
* - `
|
|
57
|
-
* - `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
|
|
58
57
|
*
|
|
59
58
|
* **Response codes:**
|
|
60
59
|
*
|
|
@@ -64,6 +63,8 @@ export declare class Cctp extends ClientSDK {
|
|
|
64
63
|
*
|
|
65
64
|
* **After receiving 202:**
|
|
66
65
|
*
|
|
66
|
+
* The SSE stream and status endpoint are in progress. Keep an eye on the updates from our team.
|
|
67
|
+
*
|
|
67
68
|
* Either:
|
|
68
69
|
* - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
|
|
69
70
|
* - Poll this endpoint periodically until you get 200
|
|
@@ -71,8 +72,8 @@ export declare class Cctp extends ClientSDK {
|
|
|
71
72
|
* **After receiving 200:**
|
|
72
73
|
*
|
|
73
74
|
* Sign and broadcast the returned transaction on the destination chain to mint USDC
|
|
74
|
-
* to your
|
|
75
|
+
* to your Product Account.
|
|
75
76
|
*/
|
|
76
77
|
cctpMint(request: components.MintPrepareRequest, options?: RequestOptions): Promise<operations.V2CctpMintResponse>;
|
|
77
78
|
}
|
|
78
|
-
//# sourceMappingURL=
|
|
79
|
+
//# sourceMappingURL=bridge.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
const
|
|
8
|
-
const
|
|
6
|
+
exports.Bridge = void 0;
|
|
7
|
+
const bridgeCctpBurn_js_1 = require("../funcs/bridgeCctpBurn.js");
|
|
8
|
+
const bridgeCctpMint_js_1 = require("../funcs/bridgeCctpMint.js");
|
|
9
9
|
const sdks_js_1 = require("../lib/sdks.js");
|
|
10
10
|
const fp_js_1 = require("../types/fp.js");
|
|
11
|
-
class
|
|
11
|
+
class Bridge extends sdks_js_1.ClientSDK {
|
|
12
12
|
/**
|
|
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:**
|
|
@@ -30,40 +30,39 @@ class Cctp extends sdks_js_1.ClientSDK {
|
|
|
30
30
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
31
31
|
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
32
32
|
*
|
|
33
|
+
* Step 5 is only required as a fail safe mechanism to mint USDC on a destination chain when bridging has not been confirmed up automatically.
|
|
34
|
+
*
|
|
33
35
|
* **Supported chains:**
|
|
34
36
|
* - Ethereum (domain 0)
|
|
35
37
|
* - Arbitrum (domain 3)
|
|
36
38
|
* - Base (domain 6)
|
|
37
39
|
*
|
|
38
|
-
* **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
|
|
39
41
|
* for the TokenMessengerV2 contract, it will be included in the transaction automatically.
|
|
40
|
-
*
|
|
41
|
-
* **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
|
|
42
42
|
*/
|
|
43
43
|
async cctpBurn(request, options) {
|
|
44
|
-
return (0, fp_js_1.unwrapAsync)((0,
|
|
44
|
+
return (0, fp_js_1.unwrapAsync)((0, bridgeCctpBurn_js_1.bridgeCctpBurn)(this, request, options));
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Confirm USDC bridging
|
|
48
48
|
*
|
|
49
49
|
* @remarks
|
|
50
|
-
*
|
|
50
|
+
* ***This endpoint is only needed to be called in rare cases when bridging was not confirmed automatically***
|
|
51
|
+
*
|
|
52
|
+
* Prepare a receiveMessage transaction to mint USDC to any Product Account on the
|
|
51
53
|
* destination chain.
|
|
52
54
|
*
|
|
53
55
|
* **How it works:**
|
|
54
56
|
*
|
|
55
57
|
* This endpoint uses the `bridge_id` from `/burn` to:
|
|
56
|
-
* 1. Look up the bridge session
|
|
57
|
-
* 2.
|
|
58
|
-
* 3.
|
|
59
|
-
* 4. Check if Circle's attestation is ready
|
|
60
|
-
* 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
|
|
61
61
|
*
|
|
62
62
|
* **Request parameters:**
|
|
63
63
|
*
|
|
64
64
|
* - `bridge_id`: The bridge ID returned from `/burn`
|
|
65
|
-
* - `
|
|
66
|
-
* - `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
|
|
67
66
|
*
|
|
68
67
|
* **Response codes:**
|
|
69
68
|
*
|
|
@@ -73,6 +72,8 @@ class Cctp extends sdks_js_1.ClientSDK {
|
|
|
73
72
|
*
|
|
74
73
|
* **After receiving 202:**
|
|
75
74
|
*
|
|
75
|
+
* The SSE stream and status endpoint are in progress. Keep an eye on the updates from our team.
|
|
76
|
+
*
|
|
76
77
|
* Either:
|
|
77
78
|
* - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
|
|
78
79
|
* - Poll this endpoint periodically until you get 200
|
|
@@ -80,11 +81,11 @@ class Cctp extends sdks_js_1.ClientSDK {
|
|
|
80
81
|
* **After receiving 200:**
|
|
81
82
|
*
|
|
82
83
|
* Sign and broadcast the returned transaction on the destination chain to mint USDC
|
|
83
|
-
* to your
|
|
84
|
+
* to your Product Account.
|
|
84
85
|
*/
|
|
85
86
|
async cctpMint(request, options) {
|
|
86
|
-
return (0, fp_js_1.unwrapAsync)((0,
|
|
87
|
+
return (0, fp_js_1.unwrapAsync)((0, bridgeCctpMint_js_1.bridgeCctpMint)(this, request, options));
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
|
-
exports.
|
|
90
|
-
//# sourceMappingURL=
|
|
90
|
+
exports.Bridge = Bridge;
|
|
91
|
+
//# sourceMappingURL=bridge.js.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClientSDK } from "../lib/sdks.js";
|
|
2
2
|
import { AaveV3 } from "./aavev3.js";
|
|
3
3
|
import { AerodromeSlipstream } from "./aerodromeslipstream.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Bridge } from "./bridge.js";
|
|
5
5
|
import { Earn } from "./earn.js";
|
|
6
6
|
import { Erc4626Vaults } from "./erc4626vaults.js";
|
|
7
7
|
import { Ethena } from "./ethena.js";
|
|
@@ -49,7 +49,7 @@ export declare class CompassApiSDK extends ClientSDK {
|
|
|
49
49
|
get gasSponsorship(): GasSponsorship;
|
|
50
50
|
private _earn?;
|
|
51
51
|
get earn(): Earn;
|
|
52
|
-
private
|
|
53
|
-
get
|
|
52
|
+
private _bridge?;
|
|
53
|
+
get bridge(): Bridge;
|
|
54
54
|
}
|
|
55
55
|
//# sourceMappingURL=sdk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,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ACrC,IAAI,YAAY,IAAI,YAAY,CAE/B;IAED,OAAO,CAAC,cAAc,CAAC,CAAgB;IACvC,IAAI,aAAa,IAAI,aAAa,CAEjC;IAED,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,OAAO,CAAC,QAAQ,CAAC,CAAU;IAC3B,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,OAAO,CAAC,eAAe,CAAC,CAAiB;IACzC,IAAI,cAAc,IAAI,cAAc,CAEnC;IAED,OAAO,CAAC,KAAK,CAAC,CAAO;IACrB,IAAI,IAAI,IAAI,IAAI,CAEf;IAED,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,IAAI,MAAM,IAAI,MAAM,CAEnB;CACF"}
|
package/dist/commonjs/sdk/sdk.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.CompassApiSDK = void 0;
|
|
|
7
7
|
const sdks_js_1 = require("../lib/sdks.js");
|
|
8
8
|
const aavev3_js_1 = require("./aavev3.js");
|
|
9
9
|
const aerodromeslipstream_js_1 = require("./aerodromeslipstream.js");
|
|
10
|
-
const
|
|
10
|
+
const bridge_js_1 = require("./bridge.js");
|
|
11
11
|
const earn_js_1 = require("./earn.js");
|
|
12
12
|
const erc4626vaults_js_1 = require("./erc4626vaults.js");
|
|
13
13
|
const ethena_js_1 = require("./ethena.js");
|
|
@@ -71,8 +71,8 @@ class CompassApiSDK extends sdks_js_1.ClientSDK {
|
|
|
71
71
|
get earn() {
|
|
72
72
|
return (this._earn ?? (this._earn = new earn_js_1.Earn(this._options)));
|
|
73
73
|
}
|
|
74
|
-
get
|
|
75
|
-
return (this.
|
|
74
|
+
get bridge() {
|
|
75
|
+
return (this._bridge ?? (this._bridge = new bridge_js_1.Bridge(this._options)));
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
exports.CompassApiSDK = CompassApiSDK;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sourceRo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I,CAAC,QAAQ,CAAC,EAAC,CAAC;IACtD,CAAC;IAGD,IAAI,OAAO;QACT,OAAO,CAAC,IAAI,CAAC,QAAQ,KAAb,IAAI,CAAC,QAAQ,GAAK,IAAI,oBAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACxD,CAAC;IAGD,IAAI,cAAc;QAChB,OAAO,CAAC,IAAI,CAAC,eAAe,KAApB,IAAI,CAAC,eAAe,GAAK,IAAI,kCAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACtE,CAAC;IAGD,IAAI,IAAI;QACN,OAAO,CAAC,IAAI,CAAC,KAAK,KAAV,IAAI,CAAC,KAAK,GAAK,IAAI,cAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAClD,CAAC;IAGD,IAAI,MAAM;QACR,OAAO,CAAC,IAAI,CAAC,OAAO,KAAZ,IAAI,CAAC,OAAO,GAAK,IAAI,kBAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACtD,CAAC;CACF;AAvFD,sCAuFC"}
|
|
@@ -9,10 +9,10 @@ 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
|
-
*
|
|
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:**
|
|
@@ -29,15 +29,15 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
30
30
|
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
31
31
|
*
|
|
32
|
+
* Step 5 is only required as a fail safe mechanism to mint USDC on a destination chain when bridging has not been confirmed up automatically.
|
|
33
|
+
*
|
|
32
34
|
* **Supported chains:**
|
|
33
35
|
* - Ethereum (domain 0)
|
|
34
36
|
* - Arbitrum (domain 3)
|
|
35
37
|
* - Base (domain 6)
|
|
36
38
|
*
|
|
37
|
-
* **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
|
|
38
40
|
* 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
41
|
*/
|
|
42
|
-
export declare function
|
|
43
|
-
//# sourceMappingURL=
|
|
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>>;
|
|
43
|
+
//# sourceMappingURL=bridgeCctpBurn.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
|
|
@@ -11,10 +11,10 @@ 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
|
-
*
|
|
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:**
|
|
@@ -31,17 +31,17 @@ import { APIPromise } from "../types/async.js";
|
|
|
31
31
|
* 4. Wait for Circle's attestation service to attest the burn
|
|
32
32
|
* 5. Call the mint endpoint to receive USDC on the destination chain
|
|
33
33
|
*
|
|
34
|
+
* Step 5 is only required as a fail safe mechanism to mint USDC on a destination chain when bridging has not been confirmed up automatically.
|
|
35
|
+
*
|
|
34
36
|
* **Supported chains:**
|
|
35
37
|
* - Ethereum (domain 0)
|
|
36
38
|
* - Arbitrum (domain 3)
|
|
37
39
|
* - Base (domain 6)
|
|
38
40
|
*
|
|
39
|
-
* **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
|
|
40
42
|
* 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
43
|
*/
|
|
44
|
-
export function
|
|
44
|
+
export function bridgeCctpBurn(client, request, options) {
|
|
45
45
|
return new APIPromise($do(client, request, options));
|
|
46
46
|
}
|
|
47
47
|
async function $do(client, request, options) {
|
|
@@ -104,4 +104,4 @@ async function $do(client, request, options) {
|
|
|
104
104
|
}
|
|
105
105
|
return [result, { status: "complete", request: req, response }];
|
|
106
106
|
}
|
|
107
|
-
//# sourceMappingURL=
|
|
107
|
+
//# sourceMappingURL=bridgeCctpBurn.js.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,UAAU,cAAc,CAC5B,MAAyB,E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