@compass-labs/api-sdk 2.1.9 → 2.1.10-rc.2

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.
Files changed (134) hide show
  1. package/README.md +7 -0
  2. package/dist/commonjs/funcs/cctpCCTPBurn.d.ts +37 -0
  3. package/dist/commonjs/funcs/cctpCCTPBurn.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/cctpCCTPBurn.js +137 -0
  5. package/dist/commonjs/funcs/cctpCCTPBurn.js.map +1 -0
  6. package/dist/commonjs/funcs/cctpCCTPMint.d.ts +52 -0
  7. package/dist/commonjs/funcs/cctpCCTPMint.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/cctpCCTPMint.js +152 -0
  9. package/dist/commonjs/funcs/cctpCCTPMint.js.map +1 -0
  10. package/dist/commonjs/lib/config.d.ts +2 -2
  11. package/dist/commonjs/lib/config.js +2 -2
  12. package/dist/commonjs/lib/encodings.d.ts +1 -0
  13. package/dist/commonjs/lib/encodings.d.ts.map +1 -1
  14. package/dist/commonjs/lib/encodings.js +9 -0
  15. package/dist/commonjs/lib/encodings.js.map +1 -1
  16. package/dist/commonjs/models/components/depositforburnrequest.d.ts +96 -0
  17. package/dist/commonjs/models/components/depositforburnrequest.d.ts.map +1 -0
  18. package/dist/commonjs/models/components/depositforburnrequest.js +87 -0
  19. package/dist/commonjs/models/components/depositforburnrequest.js.map +1 -0
  20. package/dist/commonjs/models/components/depositforburnresponse.d.ts +37 -0
  21. package/dist/commonjs/models/components/depositforburnresponse.d.ts.map +1 -0
  22. package/dist/commonjs/models/components/depositforburnresponse.js +60 -0
  23. package/dist/commonjs/models/components/depositforburnresponse.js.map +1 -0
  24. package/dist/commonjs/models/components/index.d.ts +5 -0
  25. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  26. package/dist/commonjs/models/components/index.js +5 -0
  27. package/dist/commonjs/models/components/index.js.map +1 -1
  28. package/dist/commonjs/models/components/mintpreparependingresponse.d.ts +43 -0
  29. package/dist/commonjs/models/components/mintpreparependingresponse.d.ts.map +1 -0
  30. package/dist/commonjs/models/components/mintpreparependingresponse.js +64 -0
  31. package/dist/commonjs/models/components/mintpreparependingresponse.js.map +1 -0
  32. package/dist/commonjs/models/components/mintpreparereadyresponse.d.ts +41 -0
  33. package/dist/commonjs/models/components/mintpreparereadyresponse.d.ts.map +1 -0
  34. package/dist/commonjs/models/components/mintpreparereadyresponse.js +64 -0
  35. package/dist/commonjs/models/components/mintpreparereadyresponse.js.map +1 -0
  36. package/dist/commonjs/models/components/mintpreparerequest.d.ts +39 -0
  37. package/dist/commonjs/models/components/mintpreparerequest.d.ts.map +1 -0
  38. package/dist/commonjs/models/components/mintpreparerequest.js +57 -0
  39. package/dist/commonjs/models/components/mintpreparerequest.js.map +1 -0
  40. package/dist/commonjs/models/operations/index.d.ts +1 -0
  41. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  42. package/dist/commonjs/models/operations/index.js +1 -0
  43. package/dist/commonjs/models/operations/index.js.map +1 -1
  44. package/dist/commonjs/models/operations/v2cctpmint.d.ts +9 -0
  45. package/dist/commonjs/models/operations/v2cctpmint.d.ts.map +1 -0
  46. package/dist/commonjs/models/operations/v2cctpmint.js +52 -0
  47. package/dist/commonjs/models/operations/v2cctpmint.js.map +1 -0
  48. package/dist/commonjs/sdk/cctp.d.ts +72 -0
  49. package/dist/commonjs/sdk/cctp.d.ts.map +1 -0
  50. package/dist/commonjs/sdk/cctp.js +84 -0
  51. package/dist/commonjs/sdk/cctp.js.map +1 -0
  52. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  53. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  54. package/dist/commonjs/sdk/sdk.js +4 -0
  55. package/dist/commonjs/sdk/sdk.js.map +1 -1
  56. package/dist/commonjs/types/unrecognized.d.ts +7 -1
  57. package/dist/commonjs/types/unrecognized.d.ts.map +1 -1
  58. package/dist/commonjs/types/unrecognized.js +9 -1
  59. package/dist/commonjs/types/unrecognized.js.map +1 -1
  60. package/dist/esm/funcs/cctpCCTPBurn.d.ts +37 -0
  61. package/dist/esm/funcs/cctpCCTPBurn.d.ts.map +1 -0
  62. package/dist/esm/funcs/cctpCCTPBurn.js +101 -0
  63. package/dist/esm/funcs/cctpCCTPBurn.js.map +1 -0
  64. package/dist/esm/funcs/cctpCCTPMint.d.ts +52 -0
  65. package/dist/esm/funcs/cctpCCTPMint.d.ts.map +1 -0
  66. package/dist/esm/funcs/cctpCCTPMint.js +116 -0
  67. package/dist/esm/funcs/cctpCCTPMint.js.map +1 -0
  68. package/dist/esm/lib/config.d.ts +2 -2
  69. package/dist/esm/lib/config.js +2 -2
  70. package/dist/esm/lib/encodings.d.ts +1 -0
  71. package/dist/esm/lib/encodings.d.ts.map +1 -1
  72. package/dist/esm/lib/encodings.js +9 -0
  73. package/dist/esm/lib/encodings.js.map +1 -1
  74. package/dist/esm/models/components/depositforburnrequest.d.ts +96 -0
  75. package/dist/esm/models/components/depositforburnrequest.d.ts.map +1 -0
  76. package/dist/esm/models/components/depositforburnrequest.js +49 -0
  77. package/dist/esm/models/components/depositforburnrequest.js.map +1 -0
  78. package/dist/esm/models/components/depositforburnresponse.d.ts +37 -0
  79. package/dist/esm/models/components/depositforburnresponse.d.ts.map +1 -0
  80. package/dist/esm/models/components/depositforburnresponse.js +23 -0
  81. package/dist/esm/models/components/depositforburnresponse.js.map +1 -0
  82. package/dist/esm/models/components/index.d.ts +5 -0
  83. package/dist/esm/models/components/index.d.ts.map +1 -1
  84. package/dist/esm/models/components/index.js +5 -0
  85. package/dist/esm/models/components/index.js.map +1 -1
  86. package/dist/esm/models/components/mintpreparependingresponse.d.ts +43 -0
  87. package/dist/esm/models/components/mintpreparependingresponse.d.ts.map +1 -0
  88. package/dist/esm/models/components/mintpreparependingresponse.js +27 -0
  89. package/dist/esm/models/components/mintpreparependingresponse.js.map +1 -0
  90. package/dist/esm/models/components/mintpreparereadyresponse.d.ts +41 -0
  91. package/dist/esm/models/components/mintpreparereadyresponse.d.ts.map +1 -0
  92. package/dist/esm/models/components/mintpreparereadyresponse.js +27 -0
  93. package/dist/esm/models/components/mintpreparereadyresponse.js.map +1 -0
  94. package/dist/esm/models/components/mintpreparerequest.d.ts +39 -0
  95. package/dist/esm/models/components/mintpreparerequest.d.ts.map +1 -0
  96. package/dist/esm/models/components/mintpreparerequest.js +20 -0
  97. package/dist/esm/models/components/mintpreparerequest.js.map +1 -0
  98. package/dist/esm/models/operations/index.d.ts +1 -0
  99. package/dist/esm/models/operations/index.d.ts.map +1 -1
  100. package/dist/esm/models/operations/index.js +1 -0
  101. package/dist/esm/models/operations/index.js.map +1 -1
  102. package/dist/esm/models/operations/v2cctpmint.d.ts +9 -0
  103. package/dist/esm/models/operations/v2cctpmint.d.ts.map +1 -0
  104. package/dist/esm/models/operations/v2cctpmint.js +15 -0
  105. package/dist/esm/models/operations/v2cctpmint.js.map +1 -0
  106. package/dist/esm/sdk/cctp.d.ts +72 -0
  107. package/dist/esm/sdk/cctp.d.ts.map +1 -0
  108. package/dist/esm/sdk/cctp.js +80 -0
  109. package/dist/esm/sdk/cctp.js.map +1 -0
  110. package/dist/esm/sdk/sdk.d.ts +3 -0
  111. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  112. package/dist/esm/sdk/sdk.js +4 -0
  113. package/dist/esm/sdk/sdk.js.map +1 -1
  114. package/dist/esm/types/unrecognized.d.ts +7 -1
  115. package/dist/esm/types/unrecognized.d.ts.map +1 -1
  116. package/dist/esm/types/unrecognized.js +9 -1
  117. package/dist/esm/types/unrecognized.js.map +1 -1
  118. package/package.json +1 -1
  119. package/src/funcs/cctpCCTPBurn.ts +188 -0
  120. package/src/funcs/cctpCCTPMint.ts +204 -0
  121. package/src/lib/config.ts +2 -2
  122. package/src/lib/encodings.ts +13 -0
  123. package/src/models/components/depositforburnrequest.ts +153 -0
  124. package/src/models/components/depositforburnresponse.ts +72 -0
  125. package/src/models/components/index.ts +5 -0
  126. package/src/models/components/mintpreparependingresponse.ts +78 -0
  127. package/src/models/components/mintpreparereadyresponse.ts +80 -0
  128. package/src/models/components/mintpreparerequest.ts +66 -0
  129. package/src/models/operations/index.ts +1 -0
  130. package/src/models/operations/v2cctpmint.ts +33 -0
  131. package/src/sdk/cctp.ts +98 -0
  132. package/src/sdk/sdk.ts +6 -0
  133. package/src/types/unrecognized.ts +9 -1
  134. package/tsconfig.json +0 -1
@@ -0,0 +1,39 @@
1
+ import * as z from "zod/v3";
2
+ /**
3
+ * Request model for preparing a CCTP mint transaction on an Earn Account.
4
+ *
5
+ * @remarks
6
+ *
7
+ * The mint/prepare endpoint uses the bridge_id to:
8
+ * 1. Look up the bridge session created during burn/prepare
9
+ * 2. Find the DepositForBurn event on the source chain
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
13
+ *
14
+ * This eliminates the need for users to provide the burn transaction hash.
15
+ */
16
+ export type MintPrepareRequest = {
17
+ /**
18
+ * The bridge identifier returned from /burn endpoint. This is used to look up the bridge session and find the burn event.
19
+ */
20
+ bridgeId: string;
21
+ /**
22
+ * The primary wallet address that owns and controls the Earn Account (Safe) on the destination chain. This is used to determine the Safe address that will receive and execute the receiveMessage transaction.
23
+ */
24
+ owner: string;
25
+ /**
26
+ * 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`).
27
+ */
28
+ gasSponsorship?: boolean | undefined;
29
+ };
30
+ /** @internal */
31
+ export type MintPrepareRequest$Outbound = {
32
+ bridge_id: string;
33
+ owner: string;
34
+ gas_sponsorship?: boolean | undefined;
35
+ };
36
+ /** @internal */
37
+ export declare const MintPrepareRequest$outboundSchema: z.ZodType<MintPrepareRequest$Outbound, z.ZodTypeDef, MintPrepareRequest>;
38
+ export declare function mintPrepareRequestToJSON(mintPrepareRequest: MintPrepareRequest): string;
39
+ //# sourceMappingURL=mintpreparerequest.d.ts.map
@@ -0,0 +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;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GAAG;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACvC,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"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.MintPrepareRequest$outboundSchema = void 0;
40
+ exports.mintPrepareRequestToJSON = mintPrepareRequestToJSON;
41
+ const z = __importStar(require("zod/v3"));
42
+ const primitives_js_1 = require("../../lib/primitives.js");
43
+ /** @internal */
44
+ exports.MintPrepareRequest$outboundSchema = z.object({
45
+ bridgeId: z.string(),
46
+ owner: z.string(),
47
+ gasSponsorship: z.boolean().optional(),
48
+ }).transform((v) => {
49
+ return (0, primitives_js_1.remap)(v, {
50
+ bridgeId: "bridge_id",
51
+ gasSponsorship: "gas_sponsorship",
52
+ });
53
+ });
54
+ function mintPrepareRequestToJSON(mintPrepareRequest) {
55
+ return JSON.stringify(exports.MintPrepareRequest$outboundSchema.parse(mintPrepareRequest));
56
+ }
57
+ //# sourceMappingURL=mintpreparerequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mintpreparerequest.js","sourceRoot":"","sources":["../../../../src/models/components/mintpreparerequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDH,4DAMC;AA7DD,0CAA4B;AAC5B,2DAA0D;AAsC1D,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,QAAQ,EAAE,WAAW;QACrB,cAAc,EAAE,iBAAiB;KAClC,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"}
@@ -36,6 +36,7 @@ export * from "./v1uniswapquotebuyexactly.js";
36
36
  export * from "./v1uniswapquotesellexactly.js";
37
37
  export * from "./v1vaultsvault.js";
38
38
  export * from "./v1wildcatmarket.js";
39
+ export * from "./v2cctpmint.js";
39
40
  export * from "./v2earnaavetokenrates.js";
40
41
  export * from "./v2earnpositions.js";
41
42
  export * from "./v2earnpositionspositionid.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/index.ts"],"names":[],"mappings":"AAIA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uDAAuD,CAAC;AACtE,cAAc,qCAAqC,CAAC;AACpD,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,c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c,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC"}
@@ -55,6 +55,7 @@ __exportStar(require("./v1uniswapquotebuyexactly.js"), exports);
55
55
  __exportStar(require("./v1uniswapquotesellexactly.js"), exports);
56
56
  __exportStar(require("./v1vaultsvault.js"), exports);
57
57
  __exportStar(require("./v1wildcatmarket.js"), exports);
58
+ __exportStar(require("./v2cctpmint.js"), exports);
58
59
  __exportStar(require("./v2earnaavetokenrates.js"), exports);
59
60
  __exportStar(require("./v2earnpositions.js"), exports);
60
61
  __exportStar(require("./v2earnpositionspositionid.js"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/operations/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,iEAA+C;AAC/C,qDAAmC;AACnC,oEAAkD;AAClD,6DAA2C;AAC3C,kDAAgC;AAChC,6DAA2C;AAC3C,qDAAmC;AACnC,wDAAsC;AACtC,kEAAgD;AAChD,iEAA+C;AAC/C,wFAAsE;AACtE,sEAAoD;AACpD,qDAAmC;AACnC,0DAAwC;AACxC,oDAAkC;AAClC,0DAAwC;AACxC,gEAA8C;AAC9C,sDAAoC;AACpC,8DAA4C;AAC5C,uDAAqC;AACrC,4DAA0C;AAC1C,qDAAmC;AACnC,sDAAoC;AACpC,sDAAoC;AACpC,uDAAqC;AACrC,yDAAuC;AACvC,qDAAmC;AACnC,sDAAoC;AACpC,mDAAiC;AACjC,oDAAkC;AAClC,oEAAkD;AAClD,0EAAwD;AACxD,4EAA0D;AAC1D,0DAAwC;AACxC,gEAA8C;AAC9C,iEAA+C;AAC/C,qDAAmC;AACnC,uDAAqC;AACrC,4DAA0C;AAC1C,uDAAqC;AACrC,iEAA+C;AAC/C,oDAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/operations/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,iEAA+C;AAC/C,qDAAmC;AACnC,oEAAkD;AAClD,6DAA2C;AAC3C,kDAAgC;AAChC,6DAA2C;AAC3C,qDAAmC;AACnC,wDAAsC;AACtC,kEAAgD;AAChD,iEAA+C;AAC/C,wFAAsE;AACtE,sEAAoD;AACpD,qDAAmC;AACnC,0DAAwC;AACxC,oDAAkC;AAClC,0DAAwC;AACxC,gEAA8C;AAC9C,sDAAoC;AACpC,8DAA4C;AAC5C,uDAAqC;AACrC,4DAA0C;AAC1C,qDAAmC;AACnC,sDAAoC;AACpC,sDAAoC;AACpC,uDAAqC;AACrC,yDAAuC;AACvC,qDAAmC;AACnC,sDAAoC;AACpC,mDAAiC;AACjC,oDAAkC;AAClC,oEAAkD;AAClD,0EAAwD;AACxD,4EAA0D;AAC1D,0DAAwC;AACxC,gEAA8C;AAC9C,iEAA+C;AAC/C,qDAAmC;AACnC,uDAAqC;AACrC,kDAAgC;AAChC,4DAA0C;AAC1C,uDAAqC;AACrC,iEAA+C;AAC/C,oDAAkC"}
@@ -0,0 +1,9 @@
1
+ import * as z from "zod/v3";
2
+ import { Result as SafeParseResult } from "../../types/fp.js";
3
+ import * as components from "../components/index.js";
4
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
5
+ export type V2CctpMintResponse = components.MintPreparePendingResponse | components.MintPrepareReadyResponse;
6
+ /** @internal */
7
+ export declare const V2CctpMintResponse$inboundSchema: z.ZodType<V2CctpMintResponse, z.ZodTypeDef, unknown>;
8
+ export declare function v2CctpMintResponseFromJSON(jsonString: string): SafeParseResult<V2CctpMintResponse, SDKValidationError>;
9
+ //# sourceMappingURL=v2cctpmint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2cctpmint.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/v2cctpmint.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,kBAAkB,GAC1B,UAAU,CAAC,0BAA0B,GACrC,UAAU,CAAC,wBAAwB,CAAC;AAExC,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,kBAAkB,EAClB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAMzD"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.V2CctpMintResponse$inboundSchema = void 0;
40
+ exports.v2CctpMintResponseFromJSON = v2CctpMintResponseFromJSON;
41
+ const z = __importStar(require("zod/v3"));
42
+ const schemas_js_1 = require("../../lib/schemas.js");
43
+ const components = __importStar(require("../components/index.js"));
44
+ /** @internal */
45
+ exports.V2CctpMintResponse$inboundSchema = z.union([
46
+ components.MintPreparePendingResponse$inboundSchema,
47
+ components.MintPrepareReadyResponse$inboundSchema,
48
+ ]);
49
+ function v2CctpMintResponseFromJSON(jsonString) {
50
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.V2CctpMintResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V2CctpMintResponse' from JSON`);
51
+ }
52
+ //# sourceMappingURL=v2cctpmint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2cctpmint.js","sourceRoot":"","sources":["../../../../src/models/operations/v2cctpmint.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBH,gEAQC;AA5BD,0CAA4B;AAC5B,qDAAiD;AAEjD,mEAAqD;AAOrD,gBAAgB;AACH,QAAA,gCAAgC,GAIzC,CAAC,CAAC,KAAK,CAAC;IACV,UAAU,CAAC,wCAAwC;IACnD,UAAU,CAAC,sCAAsC;CAClD,CAAC,CAAC;AAEH,SAAgB,0BAA0B,CACxC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,wCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC5D,gDAAgD,CACjD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
+ import * as components from "../models/components/index.js";
3
+ import * as operations from "../models/operations/index.js";
4
+ export declare class Cctp extends ClientSDK {
5
+ /**
6
+ * Build depositForBurn transaction for Earn Account
7
+ *
8
+ * @remarks
9
+ * Build a transaction to burn USDC from an Earn Account (Safe) on the source chain
10
+ * and initiate a cross-chain transfer via Circle's CCTP (Cross-Chain Transfer Protocol).
11
+ *
12
+ * **Flow:**
13
+ * 1. Call this endpoint with `gas_sponsorship=false` to get an unsigned transaction,
14
+ * or `gas_sponsorship=true` to get EIP-712 typed data for gas-sponsored execution
15
+ * 2. Owner signs the transaction or typed data
16
+ * 3. Broadcast the transaction on the source chain (or submit to `/gas_sponsorship/prepare`)
17
+ * 4. Wait for Circle's attestation service to attest the burn
18
+ * 5. Call the mint endpoint (when available) to receive USDC on the destination chain
19
+ *
20
+ * **Supported chains:**
21
+ * - Ethereum (domain 0)
22
+ * - Arbitrum (domain 3)
23
+ * - Base (domain 6)
24
+ *
25
+ * **Note:** The USDC must already be deposited in the Earn Account. If approval is needed
26
+ * for the TokenMessenger contract, it will be included in the transaction automatically.
27
+ *
28
+ * **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
29
+ */
30
+ cctpBurn(request: components.DepositForBurnRequest, options?: RequestOptions): Promise<components.DepositForBurnResponse>;
31
+ /**
32
+ * Prepare mint transaction for Earn Account on destination chain
33
+ *
34
+ * @remarks
35
+ * Prepare a receiveMessage transaction to mint USDC to an Earn Account (Safe) on the
36
+ * destination chain.
37
+ *
38
+ * **How it works:**
39
+ *
40
+ * This endpoint uses the `bridge_id` from `/burn` to:
41
+ * 1. Look up the bridge session (no burn tx hash needed!)
42
+ * 2. Find the DepositForBurn event on the source chain using stored nonce
43
+ * 3. Extract the CCTP message and compute its hash
44
+ * 4. Check if Circle's attestation is ready
45
+ * 5. Return the mint transaction wrapped in Safe execTransaction
46
+ *
47
+ * **Request parameters:**
48
+ *
49
+ * - `bridge_id`: The bridge ID returned from `/burn`
50
+ * - `owner`: The wallet address that owns the Earn Account (Safe) on the destination chain
51
+ * - `gas_sponsorship`: If true, returns EIP-712 typed data for gas-sponsored execution
52
+ *
53
+ * **Response codes:**
54
+ *
55
+ * - **200 OK**: Attestation is ready, mint transaction is included
56
+ * - **202 Accepted**: Attestation is pending, SSE URL for real-time updates is included
57
+ * - **400 Bad Request**: Bridge not found, or burn event not found yet
58
+ *
59
+ * **After receiving 202:**
60
+ *
61
+ * Either:
62
+ * - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
63
+ * - Poll this endpoint periodically until you get 200
64
+ *
65
+ * **After receiving 200:**
66
+ *
67
+ * Sign and broadcast the returned transaction on the destination chain to mint USDC
68
+ * to your Earn Account.
69
+ */
70
+ cctpMint(request: components.MintPrepareRequest, options?: RequestOptions): Promise<operations.V2CctpMintResponse>;
71
+ }
72
+ //# sourceMappingURL=cctp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cctp.d.ts","sourceRoot":"","sources":["../../../src/sdk/cctp.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,IAAK,SAAQ,SAAS;IACjC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;CAO1C"}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Cctp = void 0;
7
+ const cctpCCTPBurn_js_1 = require("../funcs/cctpCCTPBurn.js");
8
+ const cctpCCTPMint_js_1 = require("../funcs/cctpCCTPMint.js");
9
+ const sdks_js_1 = require("../lib/sdks.js");
10
+ const fp_js_1 = require("../types/fp.js");
11
+ class Cctp extends sdks_js_1.ClientSDK {
12
+ /**
13
+ * Build depositForBurn transaction for Earn Account
14
+ *
15
+ * @remarks
16
+ * Build a transaction to burn USDC from an Earn Account (Safe) on the source chain
17
+ * and initiate a cross-chain transfer via Circle's CCTP (Cross-Chain Transfer Protocol).
18
+ *
19
+ * **Flow:**
20
+ * 1. Call this endpoint with `gas_sponsorship=false` to get an unsigned transaction,
21
+ * or `gas_sponsorship=true` to get EIP-712 typed data for gas-sponsored execution
22
+ * 2. Owner signs the transaction or typed data
23
+ * 3. Broadcast the transaction on the source chain (or submit to `/gas_sponsorship/prepare`)
24
+ * 4. Wait for Circle's attestation service to attest the burn
25
+ * 5. Call the mint endpoint (when available) to receive USDC on the destination chain
26
+ *
27
+ * **Supported chains:**
28
+ * - Ethereum (domain 0)
29
+ * - Arbitrum (domain 3)
30
+ * - Base (domain 6)
31
+ *
32
+ * **Note:** The USDC must already be deposited in the Earn Account. If approval is needed
33
+ * for the TokenMessenger contract, it will be included in the transaction automatically.
34
+ *
35
+ * **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
36
+ */
37
+ async cctpBurn(request, options) {
38
+ return (0, fp_js_1.unwrapAsync)((0, cctpCCTPBurn_js_1.cctpCCTPBurn)(this, request, options));
39
+ }
40
+ /**
41
+ * Prepare mint transaction for Earn Account on destination chain
42
+ *
43
+ * @remarks
44
+ * Prepare a receiveMessage transaction to mint USDC to an Earn Account (Safe) on the
45
+ * destination chain.
46
+ *
47
+ * **How it works:**
48
+ *
49
+ * This endpoint uses the `bridge_id` from `/burn` to:
50
+ * 1. Look up the bridge session (no burn tx hash needed!)
51
+ * 2. Find the DepositForBurn event on the source chain using stored nonce
52
+ * 3. Extract the CCTP message and compute its hash
53
+ * 4. Check if Circle's attestation is ready
54
+ * 5. Return the mint transaction wrapped in Safe execTransaction
55
+ *
56
+ * **Request parameters:**
57
+ *
58
+ * - `bridge_id`: The bridge ID returned from `/burn`
59
+ * - `owner`: The wallet address that owns the Earn Account (Safe) on the destination chain
60
+ * - `gas_sponsorship`: If true, returns EIP-712 typed data for gas-sponsored execution
61
+ *
62
+ * **Response codes:**
63
+ *
64
+ * - **200 OK**: Attestation is ready, mint transaction is included
65
+ * - **202 Accepted**: Attestation is pending, SSE URL for real-time updates is included
66
+ * - **400 Bad Request**: Bridge not found, or burn event not found yet
67
+ *
68
+ * **After receiving 202:**
69
+ *
70
+ * Either:
71
+ * - Connect to the SSE stream at `sse_url` and wait for `attestation_ready` event
72
+ * - Poll this endpoint periodically until you get 200
73
+ *
74
+ * **After receiving 200:**
75
+ *
76
+ * Sign and broadcast the returned transaction on the destination chain to mint USDC
77
+ * to your Earn Account.
78
+ */
79
+ async cctpMint(request, options) {
80
+ return (0, fp_js_1.unwrapAsync)((0, cctpCCTPMint_js_1.cctpCCTPMint)(this, request, options));
81
+ }
82
+ }
83
+ exports.Cctp = Cctp;
84
+ //# sourceMappingURL=cctp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cctp.js","sourceRoot":"","sources":["../../../src/sdk/cctp.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8DAAwD;AACxD,8DAAwD;AACxD,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,IAAK,SAAQ,mBAAS;IACjC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAtFD,oBAsFC"}
@@ -1,6 +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 { Cctp } from "./cctp.js";
4
5
  import { Earn } from "./earn.js";
5
6
  import { Erc4626Vaults } from "./erc4626vaults.js";
6
7
  import { Ethena } from "./ethena.js";
@@ -48,5 +49,7 @@ export declare class CompassApiSDK extends ClientSDK {
48
49
  get gasSponsorship(): GasSponsorship;
49
50
  private _earn?;
50
51
  get earn(): Earn;
52
+ private _cctp?;
53
+ get cctp(): Cctp;
51
54
  }
52
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,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,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,qBAAa,aAAc,SAAQ,SAAS;IAC1C,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,OAAO,CAAC,oBAAoB,CAAC,CAAsB;IACnD,IAAI,mBAAmB,IAAI,mBAAmB,CAI7C;IAED,OAAO,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,CAEzB;IAED,OAAO,CAAC,UAAU,CAAC,CAAY;IAC/B,IAAI,SAAS,IAAI,SAAS,CAEzB;IAED,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,OAAO,CAAC,KAAK,CAAC,CAAO;IACrB,IAAI,IAAI,IAAI,IAAI,CAEf;IAED,OAAO,CAAC,mBAAmB,CAAC,CAAqB;IACjD,IAAI,kBAAkB,IAAI,kBAAkB,CAE3C;IAED,OAAO,CAAC,aAAa,CAAC,CAAe;IACrC,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,KAAK,CAAC,CAAO;IACrB,IAAI,IAAI,IAAI,IAAI,CAEf;CACF"}
@@ -7,6 +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 cctp_js_1 = require("./cctp.js");
10
11
  const earn_js_1 = require("./earn.js");
11
12
  const erc4626vaults_js_1 = require("./erc4626vaults.js");
12
13
  const ethena_js_1 = require("./ethena.js");
@@ -70,6 +71,9 @@ class CompassApiSDK extends sdks_js_1.ClientSDK {
70
71
  get earn() {
71
72
  return (this._earn ?? (this._earn = new earn_js_1.Earn(this._options)));
72
73
  }
74
+ get cctp() {
75
+ return (this._cctp ?? (this._cctp = new cctp_js_1.Cctp(this._options)));
76
+ }
73
77
  }
74
78
  exports.CompassApiSDK = CompassApiSDK;
75
79
  //# sourceMappingURL=sdk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../../src/sdk/sdk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAA2C;AAC3C,2CAAqC;AACrC,qEAA+D;AAC/D,uCAAiC;AACjC,yDAAmD;AACnD,2CAAqC;AACrC,2DAAqD;AACrD,2CAAqC;AACrC,2CAAqC;AACrC,qCAA+B;AAC/B,uDAAiD;AACjD,uCAAiC;AACjC,yCAAmC;AACnC,mEAA6D;AAC7D,iDAA2C;AAC3C,iDAA2C;AAC3C,6CAAuC;AAEvC,MAAa,aAAc,SAAQ,mBAAS;IAE1C,IAAI,MAAM;QACR,OAAO,CAAC,IAAI,CAAC,OAAO,KAAZ,IAAI,CAAC,OAAO,GAAK,IAAI,kBAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACtD,CAAC;IAGD,IAAI,mBAAmB;QACrB,OAAO,CAAC,IAAI,CAAC,oBAAoB,KAAzB,IAAI,CAAC,oBAAoB,GAAK,IAAI,4CAAmB,CAC3D,IAAI,CAAC,QAAQ,CACd,EAAC,CAAC;IACL,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;IAGD,IAAI,GAAG;QACL,OAAO,CAAC,IAAI,CAAC,IAAI,KAAT,IAAI,CAAC,IAAI,GAAK,IAAI,YAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAChD,CAAC;IAGD,IAAI,KAAK;QACP,OAAO,CAAC,IAAI,CAAC,MAAM,KAAX,IAAI,CAAC,MAAM,GAAK,IAAI,gBAAK,CAAC,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D,IAAI,YAAY;QACd,OAAO,CAAC,IAAI,CAAC,aAAa,KAAlB,IAAI,CAAC,aAAa,GAAK,IAAI,8BAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAClE,CAAC;IAGD,IAAI,aAAa;QACf,OAAO,CAAC,IAAI,CAAC,cAAc,KAAnB,IAAI,CAAC,cAAc,GAAK,IAAI,gCAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACpE,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;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,IAAI;QACN,OAAO,CAAC,IAAI,CAAC,KAAK,KAAV,IAAI,CAAC,KAAK,GAAK,IAAI,cAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAClD,CAAC;CACF;AAvFD,sCAuFC"}
@@ -4,7 +4,13 @@ export type Unrecognized<T> = T & {
4
4
  };
5
5
  declare function unrecognized<T>(value: T): Unrecognized<T>;
6
6
  export declare function startCountingUnrecognized(): {
7
- end: () => number;
7
+ /**
8
+ * Ends counting and returns the delta.
9
+ * @param delta - If provided, only this amount is added to the parent counter
10
+ * (used for nested unions where we only want to record the winning option's count).
11
+ * If not provided, records all counts since start().
12
+ */
13
+ end: (delta?: number) => number;
8
14
  };
9
15
  export { unrecognized };
10
16
  //# sourceMappingURL=unrecognized.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unrecognized.d.ts","sourceRoot":"","sources":["../../../src/types/unrecognized.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAEhE,iBAAS,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAGlD;AAID,wBAAgB,yBAAyB;;EAUxC;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"unrecognized.d.ts","sourceRoot":"","sources":["../../../src/types/unrecognized.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAEhE,iBAAS,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAGlD;AAID,wBAAgB,yBAAyB;IAIrC;;;;;OAKG;kBACW,MAAM;EAQvB;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -15,8 +15,16 @@ function startCountingUnrecognized() {
15
15
  refCount++;
16
16
  const start = globalCount;
17
17
  return {
18
- end: () => {
18
+ /**
19
+ * Ends counting and returns the delta.
20
+ * @param delta - If provided, only this amount is added to the parent counter
21
+ * (used for nested unions where we only want to record the winning option's count).
22
+ * If not provided, records all counts since start().
23
+ */
24
+ end: (delta) => {
19
25
  const count = globalCount - start;
26
+ // Reset globalCount back to start, then add only the specified delta
27
+ globalCount = start + (delta ?? count);
20
28
  if (--refCount === 0)
21
29
  globalCount = 0;
22
30
  return count;
@@ -1 +1 @@
1
- {"version":3,"file":"unrecognized.js","sourceRoot":"","sources":["../../../src/types/unrecognized.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAYH,8DAUC;AAEQ,oCAAY;AAnBrB,SAAS,YAAY,CAAI,KAAQ;IAC/B,WAAW,EAAE,CAAC;IACd,OAAO,KAAwB,CAAC;AAClC,CAAC;AAED,IAAI,WAAW,GAAG,CAAC,CAAC;AACpB,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,SAAgB,yBAAyB;IACvC,QAAQ,EAAE,CAAC;IACX,MAAM,KAAK,GAAG,WAAW,CAAC;IAC1B,OAAO;QACL,GAAG,EAAE,GAAG,EAAE;YACR,MAAM,KAAK,GAAG,WAAW,GAAG,KAAK,CAAC;YAClC,IAAI,EAAE,QAAQ,KAAK,CAAC;gBAAE,WAAW,GAAG,CAAC,CAAC;YACtC,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"unrecognized.js","sourceRoot":"","sources":["../../../src/types/unrecognized.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAYH,8DAkBC;AAEQ,oCAAY;AA3BrB,SAAS,YAAY,CAAI,KAAQ;IAC/B,WAAW,EAAE,CAAC;IACd,OAAO,KAAwB,CAAC;AAClC,CAAC;AAED,IAAI,WAAW,GAAG,CAAC,CAAC;AACpB,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,SAAgB,yBAAyB;IACvC,QAAQ,EAAE,CAAC;IACX,MAAM,KAAK,GAAG,WAAW,CAAC;IAC1B,OAAO;QACL;;;;;WAKG;QACH,GAAG,EAAE,CAAC,KAAc,EAAE,EAAE;YACtB,MAAM,KAAK,GAAG,WAAW,GAAG,KAAK,CAAC;YAClC,qEAAqE;YACrE,WAAW,GAAG,KAAK,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC;YACvC,IAAI,EAAE,QAAQ,KAAK,CAAC;gBAAE,WAAW,GAAG,CAAC,CAAC;YACtC,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { CompassApiSDKCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import * as components from "../models/components/index.js";
4
+ import { CompassAPISDKError } from "../models/errors/compassapisdkerror.js";
5
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
6
+ import * as errors from "../models/errors/index.js";
7
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
8
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
9
+ import { APIPromise } from "../types/async.js";
10
+ import { Result } from "../types/fp.js";
11
+ /**
12
+ * Build depositForBurn transaction for Earn Account
13
+ *
14
+ * @remarks
15
+ * Build a transaction to burn USDC from an Earn Account (Safe) on the source chain
16
+ * and initiate a cross-chain transfer via Circle's CCTP (Cross-Chain Transfer Protocol).
17
+ *
18
+ * **Flow:**
19
+ * 1. Call this endpoint with `gas_sponsorship=false` to get an unsigned transaction,
20
+ * or `gas_sponsorship=true` to get EIP-712 typed data for gas-sponsored execution
21
+ * 2. Owner signs the transaction or typed data
22
+ * 3. Broadcast the transaction on the source chain (or submit to `/gas_sponsorship/prepare`)
23
+ * 4. Wait for Circle's attestation service to attest the burn
24
+ * 5. Call the mint endpoint (when available) to receive USDC on the destination chain
25
+ *
26
+ * **Supported chains:**
27
+ * - Ethereum (domain 0)
28
+ * - Arbitrum (domain 3)
29
+ * - Base (domain 6)
30
+ *
31
+ * **Note:** The USDC must already be deposited in the Earn Account. If approval is needed
32
+ * for the TokenMessenger contract, it will be included in the transaction automatically.
33
+ *
34
+ * **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
35
+ */
36
+ export declare function cctpCCTPBurn(client: CompassApiSDKCore, request: components.DepositForBurnRequest, options?: RequestOptions): APIPromise<Result<components.DepositForBurnResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
37
+ //# sourceMappingURL=cctpCCTPBurn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cctpCCTPBurn.d.ts","sourceRoot":"","sources":["../../../src/funcs/cctpCCTPBurn.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,sBAAsB,EAC/B,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -0,0 +1,101 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import { encodeJSON } from "../lib/encodings.js";
5
+ import * as M from "../lib/matchers.js";
6
+ import { compactMap } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
9
+ import { pathToFunc } from "../lib/url.js";
10
+ import * as components from "../models/components/index.js";
11
+ import * as errors from "../models/errors/index.js";
12
+ import { APIPromise } from "../types/async.js";
13
+ /**
14
+ * Build depositForBurn transaction for Earn Account
15
+ *
16
+ * @remarks
17
+ * Build a transaction to burn USDC from an Earn Account (Safe) on the source chain
18
+ * and initiate a cross-chain transfer via Circle's CCTP (Cross-Chain Transfer Protocol).
19
+ *
20
+ * **Flow:**
21
+ * 1. Call this endpoint with `gas_sponsorship=false` to get an unsigned transaction,
22
+ * or `gas_sponsorship=true` to get EIP-712 typed data for gas-sponsored execution
23
+ * 2. Owner signs the transaction or typed data
24
+ * 3. Broadcast the transaction on the source chain (or submit to `/gas_sponsorship/prepare`)
25
+ * 4. Wait for Circle's attestation service to attest the burn
26
+ * 5. Call the mint endpoint (when available) to receive USDC on the destination chain
27
+ *
28
+ * **Supported chains:**
29
+ * - Ethereum (domain 0)
30
+ * - Arbitrum (domain 3)
31
+ * - Base (domain 6)
32
+ *
33
+ * **Note:** The USDC must already be deposited in the Earn Account. If approval is needed
34
+ * for the TokenMessenger contract, it will be included in the transaction automatically.
35
+ *
36
+ * **Gas estimate:** ~200,000 gas units (includes Safe execTransaction overhead)
37
+ */
38
+ export function cctpCCTPBurn(client, request, options) {
39
+ return new APIPromise($do(client, request, options));
40
+ }
41
+ async function $do(client, request, options) {
42
+ const parsed = safeParse(request, (value) => components.DepositForBurnRequest$outboundSchema.parse(value), "Input validation failed");
43
+ if (!parsed.ok) {
44
+ return [parsed, { status: "invalid" }];
45
+ }
46
+ const payload = parsed.value;
47
+ const body = encodeJSON("body", payload, { explode: true });
48
+ const path = pathToFunc("/v2/cctp/burn")();
49
+ const headers = new Headers(compactMap({
50
+ "Content-Type": "application/json",
51
+ Accept: "application/json",
52
+ }));
53
+ const secConfig = await extractSecurity(client._options.apiKeyAuth);
54
+ const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
55
+ const requestSecurity = resolveGlobalSecurity(securityInput);
56
+ const context = {
57
+ options: client._options,
58
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
59
+ operationID: "v2_cctp_burn",
60
+ oAuth2Scopes: null,
61
+ resolvedSecurity: requestSecurity,
62
+ securitySource: client._options.apiKeyAuth,
63
+ retryConfig: options?.retries
64
+ || client._options.retryConfig
65
+ || { strategy: "none" },
66
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
67
+ };
68
+ const requestRes = client._createRequest(context, {
69
+ security: requestSecurity,
70
+ method: "POST",
71
+ baseURL: options?.serverURL,
72
+ path: path,
73
+ headers: headers,
74
+ body: body,
75
+ userAgent: client._options.userAgent,
76
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
77
+ }, options);
78
+ if (!requestRes.ok) {
79
+ return [requestRes, { status: "invalid" }];
80
+ }
81
+ const req = requestRes.value;
82
+ const doResult = await client._do(req, {
83
+ context,
84
+ errorCodes: ["422", "4XX", "5XX"],
85
+ retryConfig: context.retryConfig,
86
+ retryCodes: context.retryCodes,
87
+ });
88
+ if (!doResult.ok) {
89
+ return [doResult, { status: "request-error", request: req }];
90
+ }
91
+ const response = doResult.value;
92
+ const responseFields = {
93
+ HttpMeta: { Response: response, Request: req },
94
+ };
95
+ const [result] = await M.match(M.json(200, components.DepositForBurnResponse$inboundSchema), M.jsonErr(422, errors.HTTPValidationError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
96
+ if (!result.ok) {
97
+ return [result, { status: "complete", request: req, response }];
98
+ }
99
+ return [result, { status: "complete", request: req, response }];
100
+ }
101
+ //# sourceMappingURL=cctpCCTPBurn.js.map