@moonpay/platform-protocol 0.3.0 → 1.0.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 (175) hide show
  1. package/README.md +45 -0
  2. package/dist/{index.cjs → api/errors.cjs} +7 -51
  3. package/dist/api/errors.cjs.map +1 -0
  4. package/dist/api/errors.d.cts +46 -0
  5. package/dist/api/errors.d.ts +46 -0
  6. package/dist/api/errors.js +27 -0
  7. package/dist/api/errors.js.map +1 -0
  8. package/dist/api/identity.cjs +19 -0
  9. package/dist/api/identity.cjs.map +1 -0
  10. package/dist/api/identity.d.cts +156 -0
  11. package/dist/api/identity.d.ts +156 -0
  12. package/dist/api/identity.js +1 -0
  13. package/dist/api/identity.js.map +1 -0
  14. package/dist/api/index.cjs +19 -0
  15. package/dist/api/index.cjs.map +1 -0
  16. package/dist/api/index.d.cts +466 -0
  17. package/dist/api/index.d.ts +466 -0
  18. package/dist/api/index.js +1 -0
  19. package/dist/api/index.js.map +1 -0
  20. package/dist/frames/add-card.cjs +19 -0
  21. package/dist/frames/add-card.cjs.map +1 -0
  22. package/dist/frames/add-card.d.cts +24 -0
  23. package/dist/frames/add-card.d.ts +24 -0
  24. package/dist/frames/add-card.js +1 -0
  25. package/dist/frames/add-card.js.map +1 -0
  26. package/dist/frames/apple-pay.cjs +19 -0
  27. package/dist/frames/apple-pay.cjs.map +1 -0
  28. package/dist/frames/apple-pay.d.cts +22 -0
  29. package/dist/frames/apple-pay.d.ts +22 -0
  30. package/dist/frames/apple-pay.js +1 -0
  31. package/dist/frames/apple-pay.js.map +1 -0
  32. package/dist/frames/auth.cjs +19 -0
  33. package/dist/frames/auth.cjs.map +1 -0
  34. package/dist/frames/auth.d.cts +15 -0
  35. package/dist/frames/auth.d.ts +15 -0
  36. package/dist/frames/auth.js +1 -0
  37. package/dist/frames/auth.js.map +1 -0
  38. package/dist/frames/buy-button.cjs +19 -0
  39. package/dist/frames/buy-button.cjs.map +1 -0
  40. package/dist/frames/buy-button.d.cts +21 -0
  41. package/dist/frames/buy-button.d.ts +21 -0
  42. package/dist/frames/buy-button.js +1 -0
  43. package/dist/frames/buy-button.js.map +1 -0
  44. package/dist/frames/buy.cjs +19 -0
  45. package/dist/frames/buy.cjs.map +1 -0
  46. package/dist/frames/buy.d.cts +22 -0
  47. package/dist/frames/buy.d.ts +22 -0
  48. package/dist/frames/buy.js +1 -0
  49. package/dist/frames/buy.js.map +1 -0
  50. package/dist/frames/challenge.cjs +19 -0
  51. package/dist/frames/challenge.cjs.map +1 -0
  52. package/dist/frames/challenge.d.cts +30 -0
  53. package/dist/frames/challenge.d.ts +30 -0
  54. package/dist/frames/challenge.js +1 -0
  55. package/dist/frames/challenge.js.map +1 -0
  56. package/dist/frames/connect.cjs +19 -0
  57. package/dist/frames/connect.cjs.map +1 -0
  58. package/dist/frames/connect.d.cts +9 -0
  59. package/dist/frames/connect.d.ts +9 -0
  60. package/dist/frames/connect.js +1 -0
  61. package/dist/frames/connect.js.map +1 -0
  62. package/dist/frames/google-pay.cjs +19 -0
  63. package/dist/frames/google-pay.cjs.map +1 -0
  64. package/dist/frames/google-pay.d.cts +22 -0
  65. package/dist/frames/google-pay.d.ts +22 -0
  66. package/dist/frames/google-pay.js +1 -0
  67. package/dist/frames/google-pay.js.map +1 -0
  68. package/dist/frames/reset.cjs +19 -0
  69. package/dist/frames/reset.cjs.map +1 -0
  70. package/dist/frames/reset.d.cts +12 -0
  71. package/dist/frames/reset.d.ts +12 -0
  72. package/dist/frames/reset.js +1 -0
  73. package/dist/frames/reset.js.map +1 -0
  74. package/dist/frames/widget.cjs +19 -0
  75. package/dist/frames/widget.cjs.map +1 -0
  76. package/dist/frames/widget.d.cts +19 -0
  77. package/dist/frames/widget.d.ts +19 -0
  78. package/dist/frames/widget.js +1 -0
  79. package/dist/frames/widget.js.map +1 -0
  80. package/dist/models/challenge.cjs +19 -0
  81. package/dist/models/challenge.cjs.map +1 -0
  82. package/dist/models/challenge.d.cts +12 -0
  83. package/dist/models/challenge.d.ts +12 -0
  84. package/dist/models/challenge.js +1 -0
  85. package/dist/models/challenge.js.map +1 -0
  86. package/dist/models/connection.cjs +46 -0
  87. package/dist/models/connection.cjs.map +1 -0
  88. package/dist/models/connection.d.cts +142 -0
  89. package/dist/models/connection.d.ts +142 -0
  90. package/dist/models/connection.js +20 -0
  91. package/dist/models/connection.js.map +1 -0
  92. package/dist/models/transaction.cjs +19 -0
  93. package/dist/models/transaction.cjs.map +1 -0
  94. package/dist/models/transaction.d.cts +15 -0
  95. package/dist/models/transaction.d.ts +15 -0
  96. package/dist/models/transaction.js +1 -0
  97. package/dist/models/transaction.js.map +1 -0
  98. package/dist/protocol.cjs +34 -0
  99. package/dist/protocol.cjs.map +1 -0
  100. package/dist/protocol.d.cts +30 -0
  101. package/dist/protocol.d.ts +30 -0
  102. package/dist/protocol.js +8 -0
  103. package/dist/protocol.js.map +1 -0
  104. package/dist/result.cjs +40 -0
  105. package/dist/result.cjs.map +1 -0
  106. package/dist/result.d.cts +30 -0
  107. package/dist/result.d.ts +30 -0
  108. package/dist/result.js +14 -0
  109. package/dist/result.js.map +1 -0
  110. package/dist/sdks/add-card.cjs +19 -0
  111. package/dist/sdks/add-card.cjs.map +1 -0
  112. package/dist/sdks/add-card.d.cts +20 -0
  113. package/dist/sdks/add-card.d.ts +20 -0
  114. package/dist/sdks/add-card.js +1 -0
  115. package/dist/sdks/add-card.js.map +1 -0
  116. package/dist/sdks/apple-pay.cjs +19 -0
  117. package/dist/sdks/apple-pay.cjs.map +1 -0
  118. package/dist/sdks/apple-pay.d.cts +36 -0
  119. package/dist/sdks/apple-pay.d.ts +36 -0
  120. package/dist/sdks/apple-pay.js +1 -0
  121. package/dist/sdks/apple-pay.js.map +1 -0
  122. package/dist/sdks/auth.cjs +19 -0
  123. package/dist/sdks/auth.cjs.map +1 -0
  124. package/dist/sdks/auth.d.cts +18 -0
  125. package/dist/sdks/auth.d.ts +18 -0
  126. package/dist/sdks/auth.js +1 -0
  127. package/dist/sdks/auth.js.map +1 -0
  128. package/dist/sdks/buy-button.cjs +19 -0
  129. package/dist/sdks/buy-button.cjs.map +1 -0
  130. package/dist/sdks/buy-button.d.cts +21 -0
  131. package/dist/sdks/buy-button.d.ts +21 -0
  132. package/dist/sdks/buy-button.js +1 -0
  133. package/dist/sdks/buy-button.js.map +1 -0
  134. package/dist/sdks/buy.cjs +19 -0
  135. package/dist/sdks/buy.cjs.map +1 -0
  136. package/dist/sdks/buy.d.cts +23 -0
  137. package/dist/sdks/buy.d.ts +23 -0
  138. package/dist/sdks/buy.js +1 -0
  139. package/dist/sdks/buy.js.map +1 -0
  140. package/dist/sdks/challenge.cjs +19 -0
  141. package/dist/sdks/challenge.cjs.map +1 -0
  142. package/dist/sdks/challenge.d.cts +22 -0
  143. package/dist/sdks/challenge.d.ts +22 -0
  144. package/dist/sdks/challenge.js +1 -0
  145. package/dist/sdks/challenge.js.map +1 -0
  146. package/dist/sdks/connect.cjs +19 -0
  147. package/dist/sdks/connect.cjs.map +1 -0
  148. package/dist/sdks/connect.d.cts +20 -0
  149. package/dist/sdks/connect.d.ts +20 -0
  150. package/dist/sdks/connect.js +1 -0
  151. package/dist/sdks/connect.js.map +1 -0
  152. package/dist/sdks/google-pay.cjs +19 -0
  153. package/dist/sdks/google-pay.cjs.map +1 -0
  154. package/dist/sdks/google-pay.d.cts +36 -0
  155. package/dist/sdks/google-pay.d.ts +36 -0
  156. package/dist/sdks/google-pay.js +1 -0
  157. package/dist/sdks/google-pay.js.map +1 -0
  158. package/dist/sdks/reset.cjs +19 -0
  159. package/dist/sdks/reset.cjs.map +1 -0
  160. package/dist/sdks/reset.d.cts +5 -0
  161. package/dist/sdks/reset.d.ts +5 -0
  162. package/dist/sdks/reset.js +1 -0
  163. package/dist/sdks/reset.js.map +1 -0
  164. package/dist/sdks/widget.cjs +19 -0
  165. package/dist/sdks/widget.cjs.map +1 -0
  166. package/dist/sdks/widget.d.cts +26 -0
  167. package/dist/sdks/widget.d.ts +26 -0
  168. package/dist/sdks/widget.js +1 -0
  169. package/dist/sdks/widget.js.map +1 -0
  170. package/package.json +278 -11
  171. package/dist/index.cjs.map +0 -1
  172. package/dist/index.d.cts +0 -1289
  173. package/dist/index.d.ts +0 -1289
  174. package/dist/index.js +0 -63
  175. package/dist/index.js.map +0 -1
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/sdks/add-card.ts
17
+ var add_card_exports = {};
18
+ module.exports = __toCommonJS(add_card_exports);
19
+ //# sourceMappingURL=add-card.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/sdks/add-card.ts"],"sourcesContent":["import type * as AddCardFrame from '../frames/add-card.js';\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'complete'; payload: { card: AddCardFrame.CardResponse } }\n | { kind: 'error'; payload: AddCardFrame.MessageMap['error'] };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,20 @@
1
+ import { CardResponse, MessageMap } from '../frames/add-card.cjs';
2
+ import '../protocol.cjs';
3
+
4
+ type Event = {
5
+ kind: 'ready';
6
+ } | {
7
+ kind: 'complete';
8
+ payload: {
9
+ card: CardResponse;
10
+ };
11
+ } | {
12
+ kind: 'error';
13
+ payload: MessageMap['error'];
14
+ };
15
+ interface SetupError {
16
+ kind: 'configurationError' | 'genericError';
17
+ message: string;
18
+ }
19
+
20
+ export type { Event, SetupError };
@@ -0,0 +1,20 @@
1
+ import { CardResponse, MessageMap } from '../frames/add-card.js';
2
+ import '../protocol.js';
3
+
4
+ type Event = {
5
+ kind: 'ready';
6
+ } | {
7
+ kind: 'complete';
8
+ payload: {
9
+ card: CardResponse;
10
+ };
11
+ } | {
12
+ kind: 'error';
13
+ payload: MessageMap['error'];
14
+ };
15
+ interface SetupError {
16
+ kind: 'configurationError' | 'genericError';
17
+ message: string;
18
+ }
19
+
20
+ export type { Event, SetupError };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=add-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/sdks/apple-pay.ts
17
+ var apple_pay_exports = {};
18
+ module.exports = __toCommonJS(apple_pay_exports);
19
+ //# sourceMappingURL=apple-pay.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/sdks/apple-pay.ts"],"sourcesContent":["import type * as ApplePayFrame from '../frames/apple-pay.js';\nimport type { FrameTransaction } from '../models/transaction.js';\n\nexport type EventError = {\n kind:\n | 'configurationError'\n | 'invalidQuote'\n | 'quoteExpired'\n | 'oneTapApplePaySecondFactorRequired'\n | 'genericError';\n message: string;\n};\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'complete'; payload: { transaction: FrameTransaction } }\n | { kind: 'challenge'; payload: ApplePayFrame.InboundMessageMap['challenge'] }\n | { kind: 'quoteExpired'; payload: { setQuote: (signature: string) => void } }\n | { kind: 'error'; payload: EventError }\n | { kind: 'unsupported' };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,36 @@
1
+ import { InboundMessageMap } from '../frames/apple-pay.cjs';
2
+ import { FrameTransaction } from '../models/transaction.cjs';
3
+ import '../models/challenge.cjs';
4
+ import '../protocol.cjs';
5
+
6
+ type EventError = {
7
+ kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'oneTapApplePaySecondFactorRequired' | 'genericError';
8
+ message: string;
9
+ };
10
+ type Event = {
11
+ kind: 'ready';
12
+ } | {
13
+ kind: 'complete';
14
+ payload: {
15
+ transaction: FrameTransaction;
16
+ };
17
+ } | {
18
+ kind: 'challenge';
19
+ payload: InboundMessageMap['challenge'];
20
+ } | {
21
+ kind: 'quoteExpired';
22
+ payload: {
23
+ setQuote: (signature: string) => void;
24
+ };
25
+ } | {
26
+ kind: 'error';
27
+ payload: EventError;
28
+ } | {
29
+ kind: 'unsupported';
30
+ };
31
+ interface SetupError {
32
+ kind: 'configurationError' | 'genericError';
33
+ message: string;
34
+ }
35
+
36
+ export type { Event, EventError, SetupError };
@@ -0,0 +1,36 @@
1
+ import { InboundMessageMap } from '../frames/apple-pay.js';
2
+ import { FrameTransaction } from '../models/transaction.js';
3
+ import '../models/challenge.js';
4
+ import '../protocol.js';
5
+
6
+ type EventError = {
7
+ kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'oneTapApplePaySecondFactorRequired' | 'genericError';
8
+ message: string;
9
+ };
10
+ type Event = {
11
+ kind: 'ready';
12
+ } | {
13
+ kind: 'complete';
14
+ payload: {
15
+ transaction: FrameTransaction;
16
+ };
17
+ } | {
18
+ kind: 'challenge';
19
+ payload: InboundMessageMap['challenge'];
20
+ } | {
21
+ kind: 'quoteExpired';
22
+ payload: {
23
+ setQuote: (signature: string) => void;
24
+ };
25
+ } | {
26
+ kind: 'error';
27
+ payload: EventError;
28
+ } | {
29
+ kind: 'unsupported';
30
+ };
31
+ interface SetupError {
32
+ kind: 'configurationError' | 'genericError';
33
+ message: string;
34
+ }
35
+
36
+ export type { Event, EventError, SetupError };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=apple-pay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/sdks/auth.ts
17
+ var auth_exports = {};
18
+ module.exports = __toCommonJS(auth_exports);
19
+ //# sourceMappingURL=auth.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/sdks/auth.ts"],"sourcesContent":["import type * as AuthFrame from '../frames/auth.js';\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'error'; payload: AuthFrame.MessageMap['error'] }\n | { kind: 'complete'; payload: AuthFrame.MessageMap['complete'] };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,18 @@
1
+ import { MessageMap } from '../frames/auth.cjs';
2
+ import '../models/connection.cjs';
3
+
4
+ type Event = {
5
+ kind: 'ready';
6
+ } | {
7
+ kind: 'error';
8
+ payload: MessageMap['error'];
9
+ } | {
10
+ kind: 'complete';
11
+ payload: MessageMap['complete'];
12
+ };
13
+ interface SetupError {
14
+ kind: 'configurationError' | 'genericError';
15
+ message: string;
16
+ }
17
+
18
+ export type { Event, SetupError };
@@ -0,0 +1,18 @@
1
+ import { MessageMap } from '../frames/auth.js';
2
+ import '../models/connection.js';
3
+
4
+ type Event = {
5
+ kind: 'ready';
6
+ } | {
7
+ kind: 'error';
8
+ payload: MessageMap['error'];
9
+ } | {
10
+ kind: 'complete';
11
+ payload: MessageMap['complete'];
12
+ };
13
+ interface SetupError {
14
+ kind: 'configurationError' | 'genericError';
15
+ message: string;
16
+ }
17
+
18
+ export type { Event, SetupError };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/sdks/buy-button.ts
17
+ var buy_button_exports = {};
18
+ module.exports = __toCommonJS(buy_button_exports);
19
+ //# sourceMappingURL=buy-button.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/sdks/buy-button.ts"],"sourcesContent":["import type * as BuyButtonFrame from '../frames/buy-button.js';\n\nexport type Event =\n | { kind: 'complete'; payload: BuyButtonFrame.MessageMap['complete'] }\n | { kind: 'challenge'; payload: BuyButtonFrame.MessageMap['challenge'] }\n | { kind: 'error'; payload: BuyButtonFrame.MessageMap['error'] };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,21 @@
1
+ import { MessageMap } from '../frames/buy-button.cjs';
2
+ import '../models/challenge.cjs';
3
+ import '../models/transaction.cjs';
4
+ import '../protocol.cjs';
5
+
6
+ type Event = {
7
+ kind: 'complete';
8
+ payload: MessageMap['complete'];
9
+ } | {
10
+ kind: 'challenge';
11
+ payload: MessageMap['challenge'];
12
+ } | {
13
+ kind: 'error';
14
+ payload: MessageMap['error'];
15
+ };
16
+ interface SetupError {
17
+ kind: 'configurationError' | 'genericError';
18
+ message: string;
19
+ }
20
+
21
+ export type { Event, SetupError };
@@ -0,0 +1,21 @@
1
+ import { MessageMap } from '../frames/buy-button.js';
2
+ import '../models/challenge.js';
3
+ import '../models/transaction.js';
4
+ import '../protocol.js';
5
+
6
+ type Event = {
7
+ kind: 'complete';
8
+ payload: MessageMap['complete'];
9
+ } | {
10
+ kind: 'challenge';
11
+ payload: MessageMap['challenge'];
12
+ } | {
13
+ kind: 'error';
14
+ payload: MessageMap['error'];
15
+ };
16
+ interface SetupError {
17
+ kind: 'configurationError' | 'genericError';
18
+ message: string;
19
+ }
20
+
21
+ export type { Event, SetupError };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=buy-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/sdks/buy.ts
17
+ var buy_exports = {};
18
+ module.exports = __toCommonJS(buy_exports);
19
+ //# sourceMappingURL=buy.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/sdks/buy.ts"],"sourcesContent":["import type * as BuyFrame from '../frames/buy.js';\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'complete'; payload: BuyFrame.MessageMap['complete'] }\n | { kind: 'challenge'; payload: BuyFrame.MessageMap['challenge'] }\n | { kind: 'error'; payload: BuyFrame.MessageMap['error'] };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,23 @@
1
+ import { MessageMap } from '../frames/buy.cjs';
2
+ import '../models/challenge.cjs';
3
+ import '../models/transaction.cjs';
4
+ import '../protocol.cjs';
5
+
6
+ type Event = {
7
+ kind: 'ready';
8
+ } | {
9
+ kind: 'complete';
10
+ payload: MessageMap['complete'];
11
+ } | {
12
+ kind: 'challenge';
13
+ payload: MessageMap['challenge'];
14
+ } | {
15
+ kind: 'error';
16
+ payload: MessageMap['error'];
17
+ };
18
+ interface SetupError {
19
+ kind: 'configurationError' | 'genericError';
20
+ message: string;
21
+ }
22
+
23
+ export type { Event, SetupError };
@@ -0,0 +1,23 @@
1
+ import { MessageMap } from '../frames/buy.js';
2
+ import '../models/challenge.js';
3
+ import '../models/transaction.js';
4
+ import '../protocol.js';
5
+
6
+ type Event = {
7
+ kind: 'ready';
8
+ } | {
9
+ kind: 'complete';
10
+ payload: MessageMap['complete'];
11
+ } | {
12
+ kind: 'challenge';
13
+ payload: MessageMap['challenge'];
14
+ } | {
15
+ kind: 'error';
16
+ payload: MessageMap['error'];
17
+ };
18
+ interface SetupError {
19
+ kind: 'configurationError' | 'genericError';
20
+ message: string;
21
+ }
22
+
23
+ export type { Event, SetupError };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=buy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/sdks/challenge.ts
17
+ var challenge_exports = {};
18
+ module.exports = __toCommonJS(challenge_exports);
19
+ //# sourceMappingURL=challenge.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/sdks/challenge.ts"],"sourcesContent":["import type * as ChallengeFrame from '../frames/challenge.js';\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'complete'; payload: ChallengeFrame.CompleteResult }\n | { kind: 'cancelled'; payload: ChallengeFrame.Cancellation }\n | { kind: 'error'; payload: ChallengeFrame.MessageMap['error'] };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,22 @@
1
+ import { CompleteResult, Cancellation, MessageMap } from '../frames/challenge.cjs';
2
+ import '../models/transaction.cjs';
3
+ import '../protocol.cjs';
4
+
5
+ type Event = {
6
+ kind: 'ready';
7
+ } | {
8
+ kind: 'complete';
9
+ payload: CompleteResult;
10
+ } | {
11
+ kind: 'cancelled';
12
+ payload: Cancellation;
13
+ } | {
14
+ kind: 'error';
15
+ payload: MessageMap['error'];
16
+ };
17
+ interface SetupError {
18
+ kind: 'configurationError' | 'genericError';
19
+ message: string;
20
+ }
21
+
22
+ export type { Event, SetupError };
@@ -0,0 +1,22 @@
1
+ import { CompleteResult, Cancellation, MessageMap } from '../frames/challenge.js';
2
+ import '../models/transaction.js';
3
+ import '../protocol.js';
4
+
5
+ type Event = {
6
+ kind: 'ready';
7
+ } | {
8
+ kind: 'complete';
9
+ payload: CompleteResult;
10
+ } | {
11
+ kind: 'cancelled';
12
+ payload: Cancellation;
13
+ } | {
14
+ kind: 'error';
15
+ payload: MessageMap['error'];
16
+ };
17
+ interface SetupError {
18
+ kind: 'configurationError' | 'genericError';
19
+ message: string;
20
+ }
21
+
22
+ export type { Event, SetupError };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=challenge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/sdks/connect.ts
17
+ var connect_exports = {};
18
+ module.exports = __toCommonJS(connect_exports);
19
+ //# sourceMappingURL=connect.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/sdks/connect.ts"],"sourcesContent":["import type * as ConnectFrame from '../frames/connect.js';\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'error'; payload: ConnectFrame.MessageMap['error'] }\n | { kind: 'complete'; payload: ConnectFrame.MessageMap['complete'] };\n\nexport interface ConnectError {\n message: string;\n}\n\nexport interface GetConnectionError {\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,20 @@
1
+ import { MessageMap } from '../frames/connect.cjs';
2
+ import '../models/connection.cjs';
3
+
4
+ type Event = {
5
+ kind: 'ready';
6
+ } | {
7
+ kind: 'error';
8
+ payload: MessageMap['error'];
9
+ } | {
10
+ kind: 'complete';
11
+ payload: MessageMap['complete'];
12
+ };
13
+ interface ConnectError {
14
+ message: string;
15
+ }
16
+ interface GetConnectionError {
17
+ message: string;
18
+ }
19
+
20
+ export type { ConnectError, Event, GetConnectionError };
@@ -0,0 +1,20 @@
1
+ import { MessageMap } from '../frames/connect.js';
2
+ import '../models/connection.js';
3
+
4
+ type Event = {
5
+ kind: 'ready';
6
+ } | {
7
+ kind: 'error';
8
+ payload: MessageMap['error'];
9
+ } | {
10
+ kind: 'complete';
11
+ payload: MessageMap['complete'];
12
+ };
13
+ interface ConnectError {
14
+ message: string;
15
+ }
16
+ interface GetConnectionError {
17
+ message: string;
18
+ }
19
+
20
+ export type { ConnectError, Event, GetConnectionError };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=connect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/sdks/google-pay.ts
17
+ var google_pay_exports = {};
18
+ module.exports = __toCommonJS(google_pay_exports);
19
+ //# sourceMappingURL=google-pay.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/sdks/google-pay.ts"],"sourcesContent":["import type * as GooglePayFrame from '../frames/google-pay.js';\nimport type { FrameTransaction } from '../models/transaction.js';\n\nexport type EventError = {\n kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'genericError';\n message: string;\n};\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'complete'; payload: { transaction: FrameTransaction } }\n | { kind: 'challenge'; payload: GooglePayFrame.InboundMessageMap['challenge'] }\n | { kind: 'quoteExpired'; payload: { setQuote: (signature: string) => void } }\n | { kind: 'error'; payload: EventError }\n | { kind: 'unsupported' };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,36 @@
1
+ import { InboundMessageMap } from '../frames/google-pay.cjs';
2
+ import { FrameTransaction } from '../models/transaction.cjs';
3
+ import '../models/challenge.cjs';
4
+ import '../protocol.cjs';
5
+
6
+ type EventError = {
7
+ kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'genericError';
8
+ message: string;
9
+ };
10
+ type Event = {
11
+ kind: 'ready';
12
+ } | {
13
+ kind: 'complete';
14
+ payload: {
15
+ transaction: FrameTransaction;
16
+ };
17
+ } | {
18
+ kind: 'challenge';
19
+ payload: InboundMessageMap['challenge'];
20
+ } | {
21
+ kind: 'quoteExpired';
22
+ payload: {
23
+ setQuote: (signature: string) => void;
24
+ };
25
+ } | {
26
+ kind: 'error';
27
+ payload: EventError;
28
+ } | {
29
+ kind: 'unsupported';
30
+ };
31
+ interface SetupError {
32
+ kind: 'configurationError' | 'genericError';
33
+ message: string;
34
+ }
35
+
36
+ export type { Event, EventError, SetupError };