@wormhole-labs/cctp-executor-route 0.4.0 → 0.5.0

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 (148) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/aptos/executor.d.ts +1 -1
  3. package/dist/cjs/aptos/executor.d.ts.map +1 -1
  4. package/dist/cjs/aptos/executor.js +1 -1
  5. package/dist/cjs/aptos/executor.js.map +1 -1
  6. package/dist/cjs/consts.d.ts +21 -1
  7. package/dist/cjs/consts.d.ts.map +1 -1
  8. package/dist/cjs/consts.js +188 -5
  9. package/dist/cjs/consts.js.map +1 -1
  10. package/dist/cjs/evm/executor.d.ts +1 -1
  11. package/dist/cjs/evm/executor.d.ts.map +1 -1
  12. package/dist/cjs/evm/executor.js +1 -1
  13. package/dist/cjs/evm/executor.js.map +1 -1
  14. package/dist/cjs/evm/executorV2.d.ts +25 -0
  15. package/dist/cjs/evm/executorV2.d.ts.map +1 -0
  16. package/dist/cjs/evm/executorV2.js +100 -0
  17. package/dist/cjs/evm/executorV2.js.map +1 -0
  18. package/dist/cjs/evm/index.d.ts +1 -0
  19. package/dist/cjs/evm/index.d.ts.map +1 -1
  20. package/dist/cjs/evm/index.js +3 -0
  21. package/dist/cjs/evm/index.js.map +1 -1
  22. package/dist/cjs/index.d.ts +1 -91
  23. package/dist/cjs/index.d.ts.map +1 -1
  24. package/dist/cjs/index.js +15 -334
  25. package/dist/cjs/index.js.map +1 -1
  26. package/dist/cjs/layouts/circle.d.ts +161 -0
  27. package/dist/cjs/layouts/circle.d.ts.map +1 -0
  28. package/dist/cjs/layouts/circle.js +48 -0
  29. package/dist/cjs/layouts/circle.js.map +1 -0
  30. package/dist/cjs/layouts/index.d.ts +1 -1
  31. package/dist/cjs/layouts/index.d.ts.map +1 -1
  32. package/dist/cjs/layouts/index.js +1 -1
  33. package/dist/cjs/layouts/index.js.map +1 -1
  34. package/dist/cjs/routes/cctpV1.d.ts +93 -0
  35. package/dist/cjs/routes/cctpV1.d.ts.map +1 -0
  36. package/dist/cjs/routes/cctpV1.js +180 -0
  37. package/dist/cjs/routes/cctpV1.js.map +1 -0
  38. package/dist/cjs/routes/cctpV2Base.d.ts +58 -0
  39. package/dist/cjs/routes/cctpV2Base.d.ts.map +1 -0
  40. package/dist/cjs/routes/cctpV2Base.js +179 -0
  41. package/dist/cjs/routes/cctpV2Base.js.map +1 -0
  42. package/dist/cjs/routes/cctpV2Fast.d.ts +42 -0
  43. package/dist/cjs/routes/cctpV2Fast.d.ts.map +1 -0
  44. package/dist/cjs/routes/cctpV2Fast.js +127 -0
  45. package/dist/cjs/routes/cctpV2Fast.js.map +1 -0
  46. package/dist/cjs/routes/cctpV2Standard.d.ts +42 -0
  47. package/dist/cjs/routes/cctpV2Standard.d.ts.map +1 -0
  48. package/dist/cjs/routes/cctpV2Standard.js +116 -0
  49. package/dist/cjs/routes/cctpV2Standard.js.map +1 -0
  50. package/dist/cjs/routes/helpers.d.ts +12 -0
  51. package/dist/cjs/routes/helpers.d.ts.map +1 -0
  52. package/dist/cjs/routes/helpers.js +181 -0
  53. package/dist/cjs/routes/helpers.js.map +1 -0
  54. package/dist/cjs/routes/index.d.ts +5 -0
  55. package/dist/cjs/routes/index.d.ts.map +1 -0
  56. package/dist/cjs/routes/index.js +21 -0
  57. package/dist/cjs/routes/index.js.map +1 -0
  58. package/dist/cjs/sui/executor.d.ts +1 -1
  59. package/dist/cjs/sui/executor.d.ts.map +1 -1
  60. package/dist/cjs/svm/executor.d.ts +1 -1
  61. package/dist/cjs/svm/executor.d.ts.map +1 -1
  62. package/dist/cjs/svm/executor.js +1 -1
  63. package/dist/cjs/svm/executor.js.map +1 -1
  64. package/dist/cjs/types.d.ts +8 -1
  65. package/dist/cjs/types.d.ts.map +1 -1
  66. package/dist/cjs/utils.d.ts +23 -2
  67. package/dist/cjs/utils.d.ts.map +1 -1
  68. package/dist/cjs/utils.js +119 -7
  69. package/dist/cjs/utils.js.map +1 -1
  70. package/dist/esm/aptos/executor.d.ts +1 -1
  71. package/dist/esm/aptos/executor.d.ts.map +1 -1
  72. package/dist/esm/aptos/executor.js +2 -2
  73. package/dist/esm/aptos/executor.js.map +1 -1
  74. package/dist/esm/consts.d.ts +21 -1
  75. package/dist/esm/consts.d.ts.map +1 -1
  76. package/dist/esm/consts.js +181 -4
  77. package/dist/esm/consts.js.map +1 -1
  78. package/dist/esm/evm/executor.d.ts +1 -1
  79. package/dist/esm/evm/executor.d.ts.map +1 -1
  80. package/dist/esm/evm/executor.js +2 -2
  81. package/dist/esm/evm/executor.js.map +1 -1
  82. package/dist/esm/evm/executorV2.d.ts +25 -0
  83. package/dist/esm/evm/executorV2.d.ts.map +1 -0
  84. package/dist/esm/evm/executorV2.js +96 -0
  85. package/dist/esm/evm/executorV2.js.map +1 -0
  86. package/dist/esm/evm/index.d.ts +1 -0
  87. package/dist/esm/evm/index.d.ts.map +1 -1
  88. package/dist/esm/evm/index.js +3 -0
  89. package/dist/esm/evm/index.js.map +1 -1
  90. package/dist/esm/index.d.ts +1 -91
  91. package/dist/esm/index.d.ts.map +1 -1
  92. package/dist/esm/index.js +1 -331
  93. package/dist/esm/index.js.map +1 -1
  94. package/dist/esm/layouts/circle.d.ts +161 -0
  95. package/dist/esm/layouts/circle.d.ts.map +1 -0
  96. package/dist/esm/layouts/circle.js +43 -0
  97. package/dist/esm/layouts/circle.js.map +1 -0
  98. package/dist/esm/layouts/index.d.ts +1 -1
  99. package/dist/esm/layouts/index.d.ts.map +1 -1
  100. package/dist/esm/layouts/index.js +1 -1
  101. package/dist/esm/layouts/index.js.map +1 -1
  102. package/dist/esm/routes/cctpV1.d.ts +93 -0
  103. package/dist/esm/routes/cctpV1.d.ts.map +1 -0
  104. package/dist/esm/routes/cctpV1.js +175 -0
  105. package/dist/esm/routes/cctpV1.js.map +1 -0
  106. package/dist/esm/routes/cctpV2Base.d.ts +58 -0
  107. package/dist/esm/routes/cctpV2Base.d.ts.map +1 -0
  108. package/dist/esm/routes/cctpV2Base.js +175 -0
  109. package/dist/esm/routes/cctpV2Base.js.map +1 -0
  110. package/dist/esm/routes/cctpV2Fast.d.ts +42 -0
  111. package/dist/esm/routes/cctpV2Fast.d.ts.map +1 -0
  112. package/dist/esm/routes/cctpV2Fast.js +122 -0
  113. package/dist/esm/routes/cctpV2Fast.js.map +1 -0
  114. package/dist/esm/routes/cctpV2Standard.d.ts +42 -0
  115. package/dist/esm/routes/cctpV2Standard.d.ts.map +1 -0
  116. package/dist/esm/routes/cctpV2Standard.js +111 -0
  117. package/dist/esm/routes/cctpV2Standard.js.map +1 -0
  118. package/dist/esm/routes/helpers.d.ts +12 -0
  119. package/dist/esm/routes/helpers.d.ts.map +1 -0
  120. package/dist/esm/routes/helpers.js +177 -0
  121. package/dist/esm/routes/helpers.js.map +1 -0
  122. package/dist/esm/routes/index.d.ts +5 -0
  123. package/dist/esm/routes/index.d.ts.map +1 -0
  124. package/dist/esm/routes/index.js +5 -0
  125. package/dist/esm/routes/index.js.map +1 -0
  126. package/dist/esm/sui/executor.d.ts +1 -1
  127. package/dist/esm/sui/executor.d.ts.map +1 -1
  128. package/dist/esm/svm/executor.d.ts +1 -1
  129. package/dist/esm/svm/executor.d.ts.map +1 -1
  130. package/dist/esm/svm/executor.js +2 -2
  131. package/dist/esm/svm/executor.js.map +1 -1
  132. package/dist/esm/types.d.ts +8 -1
  133. package/dist/esm/types.d.ts.map +1 -1
  134. package/dist/esm/utils.d.ts +23 -2
  135. package/dist/esm/utils.d.ts.map +1 -1
  136. package/dist/esm/utils.js +115 -8
  137. package/dist/esm/utils.js.map +1 -1
  138. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  139. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  140. package/package.json +8 -8
  141. package/dist/cjs/layouts/requestForExecution.d.ts +0 -18
  142. package/dist/cjs/layouts/requestForExecution.d.ts.map +0 -1
  143. package/dist/cjs/layouts/requestForExecution.js +0 -15
  144. package/dist/cjs/layouts/requestForExecution.js.map +0 -1
  145. package/dist/esm/layouts/requestForExecution.d.ts +0 -18
  146. package/dist/esm/layouts/requestForExecution.d.ts.map +0 -1
  147. package/dist/esm/layouts/requestForExecution.js +0 -12
  148. package/dist/esm/layouts/requestForExecution.js.map +0 -1
@@ -0,0 +1,161 @@
1
+ import { LayoutToType } from "@wormhole-foundation/sdk-base";
2
+ declare const circleBurnMessageV2Layout: readonly [{
3
+ readonly binary: "uint";
4
+ readonly size: 4;
5
+ readonly custom: 1;
6
+ readonly omit: false;
7
+ readonly name: "version";
8
+ }, {
9
+ readonly binary: "bytes";
10
+ readonly size: 32;
11
+ readonly custom: {
12
+ to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
13
+ from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
14
+ };
15
+ readonly name: "burnToken";
16
+ }, {
17
+ readonly binary: "bytes";
18
+ readonly size: 32;
19
+ readonly custom: {
20
+ to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
21
+ from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
22
+ };
23
+ readonly name: "mintRecipient";
24
+ }, {
25
+ readonly binary: "uint";
26
+ readonly size: 32;
27
+ readonly name: "amount";
28
+ }, {
29
+ readonly binary: "bytes";
30
+ readonly size: 32;
31
+ readonly custom: {
32
+ to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
33
+ from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
34
+ };
35
+ readonly name: "messageSender";
36
+ }, {
37
+ readonly binary: "uint";
38
+ readonly size: 32;
39
+ readonly name: "maxFee";
40
+ }, {
41
+ readonly binary: "uint";
42
+ readonly size: 32;
43
+ readonly name: "feeExecuted";
44
+ }, {
45
+ readonly binary: "uint";
46
+ readonly size: 32;
47
+ readonly name: "expirationBlock";
48
+ }, {
49
+ readonly name: "hookData";
50
+ readonly binary: "bytes";
51
+ }];
52
+ export type CircleBurnMessageV2 = LayoutToType<typeof circleBurnMessageV2Layout>;
53
+ export declare const circleMessageV2Layout: readonly [{
54
+ readonly binary: "uint";
55
+ readonly size: 4;
56
+ readonly custom: 1;
57
+ readonly omit: false;
58
+ readonly name: "version";
59
+ }, {
60
+ readonly binary: "uint";
61
+ readonly size: 4;
62
+ readonly name: "sourceDomain";
63
+ }, {
64
+ readonly binary: "uint";
65
+ readonly size: 4;
66
+ readonly name: "destinationDomain";
67
+ }, {
68
+ readonly binary: "bytes";
69
+ readonly size: 32;
70
+ readonly name: "nonce";
71
+ }, {
72
+ readonly binary: "bytes";
73
+ readonly size: 32;
74
+ readonly custom: {
75
+ to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
76
+ from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
77
+ };
78
+ readonly name: "sender";
79
+ }, {
80
+ readonly binary: "bytes";
81
+ readonly size: 32;
82
+ readonly custom: {
83
+ to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
84
+ from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
85
+ };
86
+ readonly name: "recipient";
87
+ }, {
88
+ readonly binary: "bytes";
89
+ readonly size: 32;
90
+ readonly custom: {
91
+ to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
92
+ from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
93
+ };
94
+ readonly name: "destinationCaller";
95
+ }, {
96
+ readonly binary: "uint";
97
+ readonly size: 4;
98
+ readonly name: "minFinalityThreshold";
99
+ }, {
100
+ readonly binary: "uint";
101
+ readonly size: 4;
102
+ readonly name: "finalityThresholdExecuted";
103
+ }, {
104
+ readonly name: "messageBody";
105
+ readonly binary: "bytes";
106
+ readonly layout: readonly [{
107
+ readonly binary: "uint";
108
+ readonly size: 4;
109
+ readonly custom: 1;
110
+ readonly omit: false;
111
+ readonly name: "version";
112
+ }, {
113
+ readonly binary: "bytes";
114
+ readonly size: 32;
115
+ readonly custom: {
116
+ to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
117
+ from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
118
+ };
119
+ readonly name: "burnToken";
120
+ }, {
121
+ readonly binary: "bytes";
122
+ readonly size: 32;
123
+ readonly custom: {
124
+ to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
125
+ from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
126
+ };
127
+ readonly name: "mintRecipient";
128
+ }, {
129
+ readonly binary: "uint";
130
+ readonly size: 32;
131
+ readonly name: "amount";
132
+ }, {
133
+ readonly binary: "bytes";
134
+ readonly size: 32;
135
+ readonly custom: {
136
+ to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
137
+ from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
138
+ };
139
+ readonly name: "messageSender";
140
+ }, {
141
+ readonly binary: "uint";
142
+ readonly size: 32;
143
+ readonly name: "maxFee";
144
+ }, {
145
+ readonly binary: "uint";
146
+ readonly size: 32;
147
+ readonly name: "feeExecuted";
148
+ }, {
149
+ readonly binary: "uint";
150
+ readonly size: 32;
151
+ readonly name: "expirationBlock";
152
+ }, {
153
+ readonly name: "hookData";
154
+ readonly binary: "bytes";
155
+ }];
156
+ }];
157
+ export type CircleV2Message = LayoutToType<typeof circleMessageV2Layout>;
158
+ export declare const deserializeCircleV2Message: (msg: Uint8Array) => CircleV2Message;
159
+ export declare const serializeCircleV2Message: (msg: CircleV2Message) => Uint8Array;
160
+ export {};
161
+ //# sourceMappingURL=circle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circle.d.ts","sourceRoot":"","sources":["../../../src/layouts/circle.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAGb,MAAM,+BAA+B,CAAC;AAsBvC,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUJ,CAAC;AAE5B,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAC5C,OAAO,yBAAyB,CACjC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWP,CAAC;AAE5B,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEzE,eAAO,MAAM,0BAA0B,QAAS,UAAU,KAAG,eACd,CAAC;AAEhD,eAAO,MAAM,wBAAwB,QAAS,eAAe,KAAG,UACnB,CAAC"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.serializeCircleV2Message = exports.deserializeCircleV2Message = exports.circleMessageV2Layout = void 0;
4
+ const sdk_base_1 = require("@wormhole-foundation/sdk-base");
5
+ const sdk_definitions_1 = require("@wormhole-foundation/sdk-definitions");
6
+ const { amountItem, circleDomainItem, universalAddressItem } = sdk_definitions_1.layoutItems;
7
+ const messageVersionItem = {
8
+ binary: "uint",
9
+ size: 4,
10
+ custom: 1,
11
+ omit: false,
12
+ };
13
+ const circleV2NonceItem = {
14
+ binary: "bytes",
15
+ size: 32,
16
+ };
17
+ const finalityThresholdItem = {
18
+ binary: "uint",
19
+ size: 4,
20
+ };
21
+ const circleBurnMessageV2Layout = [
22
+ { name: "version", ...messageVersionItem },
23
+ { name: "burnToken", ...universalAddressItem },
24
+ { name: "mintRecipient", ...universalAddressItem },
25
+ { name: "amount", ...amountItem },
26
+ { name: "messageSender", ...universalAddressItem },
27
+ { name: "maxFee", ...amountItem },
28
+ { name: "feeExecuted", ...amountItem },
29
+ { name: "expirationBlock", ...amountItem },
30
+ { name: "hookData", binary: "bytes" },
31
+ ];
32
+ exports.circleMessageV2Layout = [
33
+ { name: "version", ...messageVersionItem },
34
+ { name: "sourceDomain", ...circleDomainItem },
35
+ { name: "destinationDomain", ...circleDomainItem },
36
+ { name: "nonce", ...circleV2NonceItem },
37
+ { name: "sender", ...universalAddressItem },
38
+ { name: "recipient", ...universalAddressItem },
39
+ { name: "destinationCaller", ...universalAddressItem },
40
+ { name: "minFinalityThreshold", ...finalityThresholdItem },
41
+ { name: "finalityThresholdExecuted", ...finalityThresholdItem },
42
+ { name: "messageBody", binary: "bytes", layout: circleBurnMessageV2Layout },
43
+ ];
44
+ const deserializeCircleV2Message = (msg) => (0, sdk_base_1.deserializeLayout)(exports.circleMessageV2Layout, msg);
45
+ exports.deserializeCircleV2Message = deserializeCircleV2Message;
46
+ const serializeCircleV2Message = (msg) => (0, sdk_base_1.serializeLayout)(exports.circleMessageV2Layout, msg);
47
+ exports.serializeCircleV2Message = serializeCircleV2Message;
48
+ //# sourceMappingURL=circle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circle.js","sourceRoot":"","sources":["../../../src/layouts/circle.ts"],"names":[],"mappings":";;;AAAA,4DAKuC;AACvC,0EAAmE;AAEnE,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,GAAG,6BAAW,CAAC;AAE3E,MAAM,kBAAkB,GAAG;IACzB,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,KAAK;CACH,CAAC;AAEX,MAAM,iBAAiB,GAAG;IACxB,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,EAAE;CACiB,CAAC;AAE5B,MAAM,qBAAqB,GAAG;IAC5B,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,CAAC;CACkB,CAAC;AAE5B,MAAM,yBAAyB,GAAG;IAChC,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,kBAAkB,EAAE;IAC1C,EAAE,IAAI,E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8BACS;AAEzC,MAAM,wBAAwB,GAAG,CAAC,GAAoB,EAAc,EAAE,CAC3E,IAAA,0BAAe,EAAC,6BAAqB,EAAE,GAAG,CAAC,CAAC;AADjC,QAAA,wBAAwB,4BACS"}
@@ -1,4 +1,4 @@
1
+ export * from "./circle.js";
1
2
  export * from "./relayInstruction.js";
2
- export * from "./requestForExecution.js";
3
3
  export * from "./signedQuote.js";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./circle.js"), exports);
17
18
  __exportStar(require("./relayInstruction.js"), exports);
18
- __exportStar(require("./requestForExecution.js"), exports);
19
19
  __exportStar(require("./signedQuote.js"), exports);
20
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,2DAAyC;AACzC,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,wDAAsC;AACtC,mDAAiC"}
@@ -0,0 +1,93 @@
1
+ import type { Chain, Network } from "@wormhole-foundation/sdk-base";
2
+ import { amount } from "@wormhole-foundation/sdk-base";
3
+ import { EmptyPlatformMap, type ChainAddress, type ChainContext, type Signer, type TokenId } from "@wormhole-foundation/sdk-definitions";
4
+ import { routes } from "@wormhole-foundation/sdk-connect";
5
+ import { CCTPExecutor } from "../types";
6
+ export declare namespace CCTPExecutorRoute {
7
+ type Options = {
8
+ nativeGas?: number;
9
+ };
10
+ type NormalizedParams = {
11
+ amount: amount.Amount;
12
+ };
13
+ interface ValidatedParams extends routes.ValidatedTransferParams<Options> {
14
+ normalizedParams: NormalizedParams;
15
+ }
16
+ type Config = {
17
+ referrerFeeDbps: bigint;
18
+ referrerFeeThreshold?: bigint;
19
+ };
20
+ }
21
+ type Op = CCTPExecutorRoute.Options;
22
+ type Vp = CCTPExecutorRoute.ValidatedParams;
23
+ type Tp = routes.TransferParams<Op>;
24
+ type Vr = routes.ValidationResult<Op>;
25
+ export type QuoteDetails = {
26
+ signedQuote: Uint8Array;
27
+ relayInstructions: Uint8Array;
28
+ estimatedCost: bigint;
29
+ referrer: ChainAddress;
30
+ referrerFee: bigint;
31
+ remainingAmount: bigint;
32
+ referrerFeeDbps: bigint;
33
+ expiryTime: Date;
34
+ gasDropOff: bigint;
35
+ };
36
+ type Q = routes.Quote<Op, Vp, QuoteDetails>;
37
+ type QR = routes.QuoteResult<Op, Vp>;
38
+ type AT = {
39
+ id: string;
40
+ attestation: {};
41
+ };
42
+ type R = routes.Receipt<AT>;
43
+ export declare function cctpExecutorRoute(config?: CCTPExecutorRoute.Config): {
44
+ new <N extends Network>(wh: import("@wormhole-foundation/sdk-connect").Wormhole<N>): {
45
+ readonly staticConfig: any;
46
+ getDefaultOptions(): Op;
47
+ validate(request: routes.RouteTransferRequest<N>, params: Tp): Promise<Vr>;
48
+ quote(request: routes.RouteTransferRequest<N>, params: Vp): Promise<QR>;
49
+ initiate(request: routes.RouteTransferRequest<N>, signer: Signer, quote: Q, to: ChainAddress): Promise<R>;
50
+ track(receipt: R, timeout?: number): AsyncGenerator<import("@wormhole-foundation/sdk-connect").SourceInitiatedTransferReceipt<"Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").FailedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").SourceFinalizedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").AttestedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").CompletedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia">, R, unknown>;
51
+ wh: import("@wormhole-foundation/sdk-connect").Wormhole<N>;
52
+ transferUrl(txid: string): string;
53
+ };
54
+ config: CCTPExecutorRoute.Config;
55
+ NATIVE_GAS_DROPOFF_SUPPORTED: boolean;
56
+ meta: {
57
+ name: string;
58
+ provider: string;
59
+ };
60
+ supportedNetworks(): Network[];
61
+ supportedChains(network: Network): Chain[];
62
+ supportedDestinationTokens<N extends Network>(sourceToken: TokenId, fromChain: ChainContext<N>, toChain: ChainContext<N>): Promise<TokenId[]>;
63
+ IS_AUTOMATIC: boolean;
64
+ };
65
+ export declare class CCTPExecutorRoute<N extends Network> extends routes.AutomaticRoute<N, Op, Vp, R> implements routes.StaticRouteMethods<typeof CCTPExecutorRoute> {
66
+ static NATIVE_GAS_DROPOFF_SUPPORTED: boolean;
67
+ readonly staticConfig: any;
68
+ static config: CCTPExecutorRoute.Config;
69
+ static meta: {
70
+ name: string;
71
+ provider: string;
72
+ };
73
+ static supportedNetworks(): Network[];
74
+ static supportedChains(network: Network): Chain[];
75
+ static supportedDestinationTokens<N extends Network>(sourceToken: TokenId, fromChain: ChainContext<N>, toChain: ChainContext<N>): Promise<TokenId[]>;
76
+ getDefaultOptions(): Op;
77
+ validate(request: routes.RouteTransferRequest<N>, params: Tp): Promise<Vr>;
78
+ quote(request: routes.RouteTransferRequest<N>, params: Vp): Promise<QR>;
79
+ initiate(request: routes.RouteTransferRequest<N>, signer: Signer, quote: Q, to: ChainAddress): Promise<R>;
80
+ track(receipt: R, timeout?: number): AsyncGenerator<import("@wormhole-foundation/sdk-connect").SourceInitiatedTransferReceipt<"Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").FailedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").SourceFinalizedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").AttestedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").CompletedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia">, R, unknown>;
81
+ }
82
+ declare module "@wormhole-foundation/sdk-definitions" {
83
+ namespace WormholeRegistry {
84
+ interface ProtocolToInterfaceMapping<N, C> {
85
+ CCTPExecutor: CCTPExecutor<N, C>;
86
+ }
87
+ interface ProtocolToPlatformMapping {
88
+ CCTPExecutor: EmptyPlatformMap<"CCTPExecutor">;
89
+ }
90
+ }
91
+ }
92
+ export {};
93
+ //# sourceMappingURL=cctpV1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cctpV1.d.ts","sourceRoot":"","sources":["../../../src/routes/cctpV1.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAY,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,gBAAgB,EAEhB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,KAAK,OAAO,EACb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAML,MAAM,EAEP,MAAM,kCAAkC,CAAC;AAM1C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,yBAAiB,iBAAiB,CAAC;IACjC,KAAY,OAAO,GAAG;QAEpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF,KAAY,gBAAgB,GAAG;QAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;KACvB,CAAC;IAEF,UAAiB,eACf,SAAQ,MAAM,CAAC,uBAAuB,CAAC,OAAO,CAAC;QAC/C,gBAAgB,EAAE,gBAAgB,CAAC;KACpC;IAED,KAAY,MAAM,GAAG;QAGnB,eAAe,EAAE,MAAM,CAAC;QAIxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC/B,CAAC;CACH;AAED,KAAK,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC;AACpC,KAAK,EAAE,GAAG,iBAAiB,CAAC,eAAe,CAAC;AAE5C,KAAK,EAAE,GAAG,MAAM,CAAC,cA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;QAChC,UAAU,0BAA0B,CAAC,CAAC,EAAE,CAAC;YACvC,YAAY,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SAClC;QACD,UAAU,yBAAyB;YACjC,YAAY,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;SAChD;KACF;CACF"}
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CCTPExecutorRoute = void 0;
4
+ exports.cctpExecutorRoute = cctpExecutorRoute;
5
+ const sdk_base_1 = require("@wormhole-foundation/sdk-base");
6
+ const sdk_definitions_1 = require("@wormhole-foundation/sdk-definitions");
7
+ const sdk_connect_1 = require("@wormhole-foundation/sdk-connect");
8
+ const utils_1 = require("../utils");
9
+ const consts_1 = require("../consts");
10
+ const helpers_1 = require("./helpers");
11
+ // Use this function to create a new CCTPExecutorRoute with custom config
12
+ function cctpExecutorRoute(config = { referrerFeeDbps: 0n }) {
13
+ if (config.referrerFeeDbps < 0 || config.referrerFeeDbps > 65535n) {
14
+ throw new Error("Referrer fee must be between 0 and 65535");
15
+ }
16
+ class CCTPExecutorRouteImpl extends CCTPExecutorRoute {
17
+ static config = config;
18
+ }
19
+ return CCTPExecutorRouteImpl;
20
+ }
21
+ // CCTPv1
22
+ class CCTPExecutorRoute extends sdk_connect_1.routes.AutomaticRoute {
23
+ static NATIVE_GAS_DROPOFF_SUPPORTED = true;
24
+ // @ts-ignore
25
+ // Since we set the config on the static class, access it with this param
26
+ // the CCTPExecutorRoute.config will always be empty
27
+ staticConfig = this.constructor.config;
28
+ static config = { referrerFeeDbps: 0n };
29
+ static meta = {
30
+ name: "CCTPExecutorRoute",
31
+ provider: "Circle",
32
+ };
33
+ static supportedNetworks() {
34
+ return ["Mainnet", "Testnet"];
35
+ }
36
+ static supportedChains(network) {
37
+ return [...Object.keys(consts_1.circleV1Domains[network] ?? {})];
38
+ }
39
+ static async supportedDestinationTokens(sourceToken, fromChain, toChain) {
40
+ if (!(0, consts_1.isCircleV1Chain)(fromChain.network, fromChain.chain) ||
41
+ !(0, consts_1.isCircleV1Chain)(toChain.network, toChain.chain)) {
42
+ return [];
43
+ }
44
+ return (0, utils_1.getUsdcDestinationAddress)(sourceToken, fromChain, toChain);
45
+ }
46
+ getDefaultOptions() {
47
+ return {
48
+ nativeGas: 0,
49
+ };
50
+ }
51
+ async validate(request, params) {
52
+ const { fromChain, toChain } = request;
53
+ if (!(0, consts_1.isCircleV1Chain)(fromChain.network, fromChain.chain) ||
54
+ !(0, consts_1.isCircleV1Chain)(toChain.network, toChain.chain)) {
55
+ return {
56
+ valid: false,
57
+ error: new Error("Unsupported source or destination chain"),
58
+ params,
59
+ };
60
+ }
61
+ if (params.options?.nativeGas &&
62
+ (params.options.nativeGas < 0 || params.options.nativeGas > 1)) {
63
+ return {
64
+ valid: false,
65
+ error: new Error("Invalid native gas percentage"),
66
+ params,
67
+ };
68
+ }
69
+ const validatedParams = {
70
+ normalizedParams: {
71
+ amount: request.parseAmount(params.amount),
72
+ },
73
+ options: params.options ?? this.getDefaultOptions(),
74
+ ...params,
75
+ };
76
+ return { valid: true, params: validatedParams };
77
+ }
78
+ async quote(request, params) {
79
+ const { fromChain, toChain } = request;
80
+ try {
81
+ const quoteDetails = await (0, helpers_1.fetchExecutorQuote)(request, params, this.staticConfig, "ERC1");
82
+ const { remainingAmount, estimatedCost, gasDropOff, expiryTime } = quoteDetails;
83
+ // https://developers.circle.com/stablecoins/docs/required-block-confirmations
84
+ const eta = fromChain.chain === "Polygon"
85
+ ? 2_000 * 200
86
+ : sdk_base_1.finality.estimateFinalityTime(fromChain.chain) + 1_000; // buffer for the relayer
87
+ const [srcNativeDecimals, dstNativeDecimals] = await Promise.all([
88
+ fromChain.getDecimals("native"),
89
+ toChain.getDecimals("native"),
90
+ ]);
91
+ return {
92
+ success: true,
93
+ params,
94
+ sourceToken: {
95
+ token: request.source.id,
96
+ amount: params.normalizedParams.amount,
97
+ },
98
+ destinationToken: {
99
+ token: request.destination.id,
100
+ amount: sdk_base_1.amount.fromBaseUnits(remainingAmount, request.destination.decimals),
101
+ },
102
+ relayFee: {
103
+ token: (0, sdk_definitions_1.nativeTokenId)(fromChain.chain),
104
+ amount: sdk_base_1.amount.fromBaseUnits(estimatedCost, srcNativeDecimals),
105
+ },
106
+ destinationNativeGas: sdk_base_1.amount.fromBaseUnits(gasDropOff, dstNativeDecimals),
107
+ eta,
108
+ expires: expiryTime,
109
+ details: quoteDetails,
110
+ };
111
+ }
112
+ catch (e) {
113
+ return {
114
+ success: false,
115
+ error: new Error(e instanceof Error ? e.message : `${e}`),
116
+ };
117
+ }
118
+ }
119
+ async initiate(request, signer, quote, to) {
120
+ if (!quote.details) {
121
+ throw new Error("Missing quote details");
122
+ }
123
+ return await (0, helpers_1.initiateTransfer)(request, signer, to, {
124
+ protocol: "CCTPExecutor",
125
+ details: quote.details,
126
+ });
127
+ }
128
+ async *track(receipt, timeout) {
129
+ if ((0, sdk_connect_1.isCompleted)(receipt) || (0, sdk_connect_1.isFailed)(receipt))
130
+ return receipt;
131
+ let leftover = timeout ? timeout : 60 * 60 * 1000;
132
+ while (leftover > 0) {
133
+ const start = Date.now();
134
+ if ((0, sdk_connect_1.isSourceInitiated)(receipt) ||
135
+ (0, sdk_connect_1.isSourceFinalized)(receipt) ||
136
+ (0, sdk_connect_1.isAttested)(receipt)) {
137
+ try {
138
+ const [txStatus] = await (0, utils_1.fetchStatus)(this.wh.network, receipt.originTxs.at(-1).txid, receipt.from);
139
+ if (!txStatus) {
140
+ throw new Error("No transaction status found");
141
+ }
142
+ const relayStatus = txStatus?.status;
143
+ if (relayStatus === utils_1.RelayStatus.Failed || // this could happen if simulation fails
144
+ relayStatus === utils_1.RelayStatus.Underpaid || // only happens if you don't pay at least the costEstimate
145
+ relayStatus === utils_1.RelayStatus.Unsupported || // capabilities check didn't pass
146
+ relayStatus === utils_1.RelayStatus.Aborted // An unrecoverable error indicating the attempt should stop (bad data, pre-flight checks failed, or chain-specific conditions)
147
+ ) {
148
+ receipt = {
149
+ ...receipt,
150
+ state: sdk_connect_1.TransferState.Failed,
151
+ error: new sdk_connect_1.routes.RelayFailedError(`Relay failed with status: ${relayStatus}`),
152
+ };
153
+ }
154
+ if (relayStatus === utils_1.RelayStatus.Submitted) {
155
+ receipt = {
156
+ ...receipt,
157
+ state: sdk_connect_1.TransferState.DestinationFinalized,
158
+ attestation: { id: txStatus.id, attestation: {} },
159
+ };
160
+ }
161
+ // Important to yield before checking for completion
162
+ // so the caller can update the receipt state
163
+ yield receipt;
164
+ if ((0, sdk_connect_1.isCompleted)(receipt) || (0, sdk_connect_1.isFailed)(receipt)) {
165
+ return receipt;
166
+ }
167
+ }
168
+ catch (error) {
169
+ console.error(`Error fetching transaction status: ${error.message || error}`);
170
+ }
171
+ }
172
+ // Sleep so we don't spam the endpoint
173
+ await new Promise((resolve) => setTimeout(resolve, 3000));
174
+ leftover -= Date.now() - start;
175
+ }
176
+ return receipt;
177
+ }
178
+ }
179
+ exports.CCTPExecutorRoute = CCTPExecutorRoute;
180
+ //# sourceMappingURL=cctpV1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cctpV1.js","sourceRoot":"","sources":["../../../src/routes/cctpV1.ts"],"names":[],"mappings":";;;AAkFA,8CAWC;AA5FD,4DAAiE;AACjE,0EAO8C;AAC9C,kEAQ0C;AAC1C,oCAIkB;AAElB,sCAA6D;AAC7D,uCAAiE;AAuDjE,yEAAyE;AACzE,SAAgB,iBAAiB,CAC/B,SAAmC,EAAE,eAAe,EAAE,EAAE,EAAE;IAE1D,IAAI,MAAM,CAAC,eAAe,GAAG,CAAC,IAAI,MAAM,CAAC,eAAe,GAAG,MAAM,EAAE,CAAC;QAClE,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IACD,MAAM,qBAAyC,SAAQ,iBAAoB;QACzE,MAAM,CAAU,MAAM,GAAG,MAAM,CAAC;;IAGlC,OAAO,qBAAqB,CAAC;A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