@compass-labs/api-sdk 2.1.10-rc.7 → 2.1.10-rc.9
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/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/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/package.json +1 -1
- package/src/models/components/depositforburnrequest.ts +3 -13
- package/src/models/components/mintpreparereadyresponse.ts +4 -26
- package/src/models/components/mintpreparerequest.ts +5 -21
|
@@ -44,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"depositforburnrequest.js","sourceRoot":"","sources":["../../../../src/models/components/depositforburnrequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuGH,8EAQC;AA0CD,kEAMC;AA7JD,0CAA4B;AAC5B,2DAA0D;AAG1D;;GAEG;AACU,QAAA,0BAA0B,GAAG;IACxC,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACJ,CAAC;AAaX;;GAEG;AACU,QAAA,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACJ,CAAC;AAMX;;GAEG;AACU,QAAA,iCAAiC,GAAG;IAC/C,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;CACZ,CAAC;AA2CX,gBAAgB;AACH,QAAA,yCAAyC,GAElD,CAAC,CAAC,UAAU,CAAC,kCAA0B,CAAC,CAAC;AAK7C,gBAAgB;AACH,QAAA,0CAA0C,GAInD,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEtC,SAAgB,iCAAiC,CAC/C,2BAAwD;IAExD,OAAO,IAAI,CAAC,SAAS,CACnB,kDAA0C,CAAC,KAAK,CAC9C,2BAA2B,CAC5B,CACF,CAAC;AACJ,CAAC;AAED,gBAAgB;AACH,QAAA,+BAA+B,GAExC,CAAC,CAAC,UAAU,CAAC,wBAAgB,CAAC,CAAC;AAEnC,gBAAgB;AACH,QAAA,gDAAgD,GAEzD,CAAC,CAAC,UAAU,CAAC,yCAAiC,CAAC,CAAC;AAYpD,gBAAgB;AACH,QAAA,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,iDAAyC;IAChD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,gBAAgB,EAAE,uCAA+B;IACjD,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACtC,YAAY,EAAE,wDAAgD,CAAC,QAAQ,EAAE;CAC1E,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,gBAAgB,EAAE,mBAAmB;QACrC,cAAc,EAAE,iBAAiB;QACjC,YAAY,EAAE,eAAe;KAC9B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,2BAA2B,CACzC,qBAA4C;IAE5C,OAAO,IAAI,CAAC,SAAS,CACnB,4CAAoC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAClE,CAAC;AACJ,CAAC"}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
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"}
|
|
@@ -41,21 +41,15 @@ exports.mintPrepareReadyResponseFromJSON = mintPrepareReadyResponseFromJSON;
|
|
|
41
41
|
const z = __importStar(require("zod/v3"));
|
|
42
42
|
const primitives_js_1 = require("../../lib/primitives.js");
|
|
43
43
|
const schemas_js_1 = require("../../lib/schemas.js");
|
|
44
|
-
const batchedsafeoperationsresponseoutput_js_1 = require("./batchedsafeoperationsresponseoutput.js");
|
|
45
44
|
const unsignedtransaction_js_1 = require("./unsignedtransaction.js");
|
|
46
45
|
/** @internal */
|
|
47
46
|
exports.MintPrepareReadyResponse$inboundSchema = z.object({
|
|
48
47
|
status: z.literal("ready").default("ready").optional(),
|
|
49
48
|
bridge_id: z.string(),
|
|
50
|
-
transaction:
|
|
51
|
-
eip_712: z.nullable(batchedsafeoperationsresponseoutput_js_1.BatchedSafeOperationsResponseOutput$inboundSchema)
|
|
52
|
-
.optional(),
|
|
53
|
-
message_hash: z.string(),
|
|
49
|
+
transaction: unsignedtransaction_js_1.UnsignedTransaction$inboundSchema,
|
|
54
50
|
}).transform((v) => {
|
|
55
51
|
return (0, primitives_js_1.remap)(v, {
|
|
56
52
|
"bridge_id": "bridgeId",
|
|
57
|
-
"eip_712": "eip712",
|
|
58
|
-
"message_hash": "messageHash",
|
|
59
53
|
});
|
|
60
54
|
});
|
|
61
55
|
function mintPrepareReadyResponseFromJSON(jsonString) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintpreparereadyresponse.js","sourceRoot":"","sources":["../../../../src/models/components/mintpreparereadyresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"mintpreparereadyresponse.js","sourceRoot":"","sources":["../../../../src/models/components/mintpreparereadyresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CH,4EAQC;AArDD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAGjD,qEAGkC;AAsBlC,gBAAgB;AACH,QAAA,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,0DAAiC;CAC/C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,WAAW,EAAE,UAAU;KACxB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,gCAAgC,CAC9C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8CAAsC,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"}
|
|
@@ -44,13 +44,11 @@ const primitives_js_1 = require("../../lib/primitives.js");
|
|
|
44
44
|
exports.MintPrepareRequest$outboundSchema = z.object({
|
|
45
45
|
bridgeId: z.string(),
|
|
46
46
|
burnTxHash: z.string(),
|
|
47
|
-
|
|
48
|
-
gasSponsorship: z.boolean().optional(),
|
|
47
|
+
sender: z.string(),
|
|
49
48
|
}).transform((v) => {
|
|
50
49
|
return (0, primitives_js_1.remap)(v, {
|
|
51
50
|
bridgeId: "bridge_id",
|
|
52
51
|
burnTxHash: "burn_tx_hash",
|
|
53
|
-
gasSponsorship: "gas_sponsorship",
|
|
54
52
|
});
|
|
55
53
|
});
|
|
56
54
|
function mintPrepareRequestToJSON(mintPrepareRequest) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintpreparerequest.js","sourceRoot":"","sources":["../../../../src/models/components/mintpreparerequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"mintpreparerequest.js","sourceRoot":"","sources":["../../../../src/models/components/mintpreparerequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CH,4DAMC;AAlDD,0CAA4B;AAC5B,2DAA0D;AA2B1D,gBAAgB;AACH,QAAA,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,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,cAAc;KAC3B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,yCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,CAAC"}
|
|
@@ -44,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,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAG1D;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACJ,CAAC;AAaX;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACJ,CAAC;AAMX;;GAEG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;CACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"depositforburnrequest.js","sourceRoot":"","sources":["../../../../src/models/components/depositforburnrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAG1D;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACJ,CAAC;AAaX;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACJ,CAAC;AAMX;;GAEG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;CACZ,CAAC;AA2CX,gBAAgB;AAChB,MAAM,CAAC,MAAM,yCAAyC,GAElD,CAAC,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;AAK7C,gBAAgB;AAChB,MAAM,CAAC,MAAM,0CAA0C,GAInD,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEtC,MAAM,UAAU,iCAAiC,CAC/C,2BAAwD;IAExD,OAAO,IAAI,CAAC,SAAS,CACnB,0CAA0C,CAAC,KAAK,CAC9C,2BAA2B,CAC5B,CACF,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,+BAA+B,GAExC,CAAC,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;AAEnC,gBAAgB;AAChB,MAAM,CAAC,MAAM,gDAAgD,GAEzD,CAAC,CAAC,UAAU,CAAC,iCAAiC,CAAC,CAAC;AAYpD,gBAAgB;AAChB,MAAM,CAAC,MAAM,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,yCAAyC;IAChD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,gBAAgB,EAAE,+BAA+B;IACjD,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACtC,YAAY,EAAE,gDAAgD,CAAC,QAAQ,EAAE;CAC1E,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,gBAAgB,EAAE,mBAAmB;QACrC,cAAc,EAAE,iBAAiB;QACjC,YAAY,EAAE,eAAe;KAC9B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,2BAA2B,CACzC,qBAA4C;IAE5C,OAAO,IAAI,CAAC,SAAS,CACnB,oCAAoC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAClE,CAAC;AACJ,CAAC"}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
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/package.json
CHANGED
|
@@ -58,22 +58,12 @@ export type DepositForBurnRequestTransferMode = ClosedEnum<
|
|
|
58
58
|
*
|
|
59
59
|
* @remarks
|
|
60
60
|
*
|
|
61
|
-
* Burns USDC from
|
|
62
|
-
*
|
|
63
|
-
* supporting both direct owner execution and gas-sponsored transactions.
|
|
64
|
-
*
|
|
65
|
-
* Flow:
|
|
66
|
-
* 1. Owner calls this endpoint to get either:
|
|
67
|
-
* - An unsigned transaction (gas_sponsorship=False)
|
|
68
|
-
* - EIP-712 typed data for signing (gas_sponsorship=True)
|
|
69
|
-
* 2. Owner signs the transaction/typed data
|
|
70
|
-
* 3. Transaction is broadcast on source chain
|
|
71
|
-
* 4. Wait for Circle's attestation service
|
|
72
|
-
* 5. Call receiveMessage on destination chain to mint USDC
|
|
61
|
+
* Burns USDC from a Product Account to initiate a cross-chain transfer via Circle's
|
|
62
|
+
* CCTP.
|
|
73
63
|
*/
|
|
74
64
|
export type DepositForBurnRequest = {
|
|
75
65
|
/**
|
|
76
|
-
* The primary wallet address that owns and controls the
|
|
66
|
+
* The primary wallet address that owns and controls the Product Account.
|
|
77
67
|
*/
|
|
78
68
|
owner: string;
|
|
79
69
|
/**
|
|
@@ -7,10 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
import {
|
|
11
|
-
BatchedSafeOperationsResponseOutput,
|
|
12
|
-
BatchedSafeOperationsResponseOutput$inboundSchema,
|
|
13
|
-
} from "./batchedsafeoperationsresponseoutput.js";
|
|
14
10
|
import {
|
|
15
11
|
UnsignedTransaction,
|
|
16
12
|
UnsignedTransaction$inboundSchema,
|
|
@@ -21,10 +17,8 @@ import {
|
|
|
21
17
|
*
|
|
22
18
|
* @remarks
|
|
23
19
|
*
|
|
24
|
-
* Returned with 200 OK status code. Contains
|
|
25
|
-
*
|
|
26
|
-
* calls receiveMessage on the MessageTransmitter contract through the Earn Account
|
|
27
|
-
* (Safe).
|
|
20
|
+
* Returned with 200 OK status code. Contains an unsigned transaction that calls
|
|
21
|
+
* receiveMessage on the MessageTransmitter contract.
|
|
28
22
|
*/
|
|
29
23
|
export type MintPrepareReadyResponse = {
|
|
30
24
|
/**
|
|
@@ -35,18 +29,7 @@ export type MintPrepareReadyResponse = {
|
|
|
35
29
|
* The bridge identifier.
|
|
36
30
|
*/
|
|
37
31
|
bridgeId: string;
|
|
38
|
-
|
|
39
|
-
* 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.
|
|
40
|
-
*/
|
|
41
|
-
transaction?: UnsignedTransaction | null | undefined;
|
|
42
|
-
/**
|
|
43
|
-
* 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.
|
|
44
|
-
*/
|
|
45
|
-
eip712?: BatchedSafeOperationsResponseOutput | null | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* The CCTP message hash used to obtain the attestation.
|
|
48
|
-
*/
|
|
49
|
-
messageHash: string;
|
|
32
|
+
transaction: UnsignedTransaction;
|
|
50
33
|
};
|
|
51
34
|
|
|
52
35
|
/** @internal */
|
|
@@ -57,15 +40,10 @@ export const MintPrepareReadyResponse$inboundSchema: z.ZodType<
|
|
|
57
40
|
> = z.object({
|
|
58
41
|
status: z.literal("ready").default("ready").optional(),
|
|
59
42
|
bridge_id: z.string(),
|
|
60
|
-
transaction:
|
|
61
|
-
eip_712: z.nullable(BatchedSafeOperationsResponseOutput$inboundSchema)
|
|
62
|
-
.optional(),
|
|
63
|
-
message_hash: z.string(),
|
|
43
|
+
transaction: UnsignedTransaction$inboundSchema,
|
|
64
44
|
}).transform((v) => {
|
|
65
45
|
return remap$(v, {
|
|
66
46
|
"bridge_id": "bridgeId",
|
|
67
|
-
"eip_712": "eip712",
|
|
68
|
-
"message_hash": "messageHash",
|
|
69
47
|
});
|
|
70
48
|
});
|
|
71
49
|
|
|
@@ -6,16 +6,7 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Request model for preparing a CCTP mint transaction
|
|
10
|
-
*
|
|
11
|
-
* @remarks
|
|
12
|
-
*
|
|
13
|
-
* The mint/prepare endpoint uses the bridge_id and burn_tx_hash to:
|
|
14
|
-
* 1. Look up the bridge session created during burn/prepare
|
|
15
|
-
* 2. Find the DepositForBurn event using the burn transaction hash
|
|
16
|
-
* 3. Extract the CCTP message and compute its hash
|
|
17
|
-
* 4. Check if Circle's attestation is ready
|
|
18
|
-
* 5. Return the mint transaction wrapped in Safe execTransaction
|
|
9
|
+
* Request model for preparing a CCTP mint transaction.
|
|
19
10
|
*/
|
|
20
11
|
export type MintPrepareRequest = {
|
|
21
12
|
/**
|
|
@@ -27,21 +18,16 @@ export type MintPrepareRequest = {
|
|
|
27
18
|
*/
|
|
28
19
|
burnTxHash: string;
|
|
29
20
|
/**
|
|
30
|
-
* The
|
|
21
|
+
* The wallet address that will sign and send the mint transaction.
|
|
31
22
|
*/
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* 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`).
|
|
35
|
-
*/
|
|
36
|
-
gasSponsorship?: boolean | undefined;
|
|
23
|
+
sender: string;
|
|
37
24
|
};
|
|
38
25
|
|
|
39
26
|
/** @internal */
|
|
40
27
|
export type MintPrepareRequest$Outbound = {
|
|
41
28
|
bridge_id: string;
|
|
42
29
|
burn_tx_hash: string;
|
|
43
|
-
|
|
44
|
-
gas_sponsorship?: boolean | undefined;
|
|
30
|
+
sender: string;
|
|
45
31
|
};
|
|
46
32
|
|
|
47
33
|
/** @internal */
|
|
@@ -52,13 +38,11 @@ export const MintPrepareRequest$outboundSchema: z.ZodType<
|
|
|
52
38
|
> = z.object({
|
|
53
39
|
bridgeId: z.string(),
|
|
54
40
|
burnTxHash: z.string(),
|
|
55
|
-
|
|
56
|
-
gasSponsorship: z.boolean().optional(),
|
|
41
|
+
sender: z.string(),
|
|
57
42
|
}).transform((v) => {
|
|
58
43
|
return remap$(v, {
|
|
59
44
|
bridgeId: "bridge_id",
|
|
60
45
|
burnTxHash: "burn_tx_hash",
|
|
61
|
-
gasSponsorship: "gas_sponsorship",
|
|
62
46
|
});
|
|
63
47
|
});
|
|
64
48
|
|