@funkit/core 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,3 @@
1
- import { MeshOrderSide } from './types';
2
- /**
3
- * @param authToken The authentication token to send the asset from.
4
- * @param type The type of the integration to send the asset from.
5
- * @return https://docs.meshconnect.com/reference/post_api-v1-balance-get
6
- */
7
- export declare function meshGetHoldings(authToken: string, type: string, apiKey?: string): Promise<any>;
8
1
  /**
9
2
  * @param authToken The authentication token to send the asset from.
10
3
  * @param type The type of the integration to send the asset from.
@@ -49,39 +42,3 @@ export declare function meshPreviewTransfer(fromAuthToken: string, fromType: str
49
42
  * @returns https://docs.meshconnect.com/reference/post_api-v1-transfers-managed-execute
50
43
  */
51
44
  export declare function meshExecuteTransfer(fromAuthToken: string, fromType: string, previewId: string, mfaCode?: string | null, apiKey?: string): Promise<any>;
52
- /**
53
- * @param side {buy, sell}
54
- * @param authToken The authentication token to use for the preview.
55
- * @param type The type of the integration to use for the preview.
56
- * @param symbol Symbol to trade. For example, AAPL or ETH
57
- * @param paymentSymbol Symbol to use for payment, defaults to USD.
58
- * @param amount Amount of purchase.
59
- * @param price Price of the unit, used for Limit and StopLoss orders.
60
- * @param isCryptocurrency Some Stock and Crypto symbols can intersect, so the type of the asset needs to be specified explicitly.
61
- * @param paymentIsCryptoCurrency Indicates whether the PaymentSymbol is fiat or cryptocurrency
62
- * @param amountIsInPaymentSymbol This value indicates if the order should be executed in payment/quote currency amount (e.g. purchase ETH for $10). This can be performed only if the current institution supports such orders (SupportsPlacingSellOrdersInPaymentSymbolAmount and SupportsPlacingBuyOrdersInPaymentSymbolAmount fields in get supported order features for institution) and AmountInPaymentSymbol value is passed.
63
- * @param extendedHours Specifies if the extended trading hours should be used.
64
- * @param orderType {market, limit, stopLoss}
65
- * @param timeInForce {goodTillCancel, immediateOrCancel, fillOrKill, goodForDay, postOnly, unknown}
66
- * @param mfaCode MFA Code to create an order (requested by Kraken if MFA is enabled in user settings)
67
- * @returns https://docs.meshconnect.com/reference/post_api-v1-transactions-preview-side
68
- */
69
- export declare function meshPreviewOrder(side: MeshOrderSide, authToken: string, type: string, symbol: string, paymentSymbol: string, amount: string, isCryptocurrency: string, paymentIsCryptoCurrency: string, orderType: string, timeInForce: string, price?: string, amountIsInPaymentSymbol?: string | null, extendedHours?: boolean, mfaCode?: string | null, apiKey?: string): Promise<any>;
70
- /**
71
- * @param side {buy, sell}
72
- * @param authToken The authentication token to use for the preview.
73
- * @param type The type of the integration to use for the preview.
74
- * @param symbol Symbol to trade. For example, AAPL or ETH
75
- * @param paymentSymbol Symbol to use for payment, defaults to USD.
76
- * @param amount Amount of purchase.
77
- * @param price Price of the unit, used for Limit and StopLoss orders.
78
- * @param isCryptocurrency Some Stock and Crypto symbols can intersect, so the type of the asset needs to be specified explicitly.
79
- * @param paymentIsCryptoCurrency Indicates whether the PaymentSymbol is fiat or cryptocurrency
80
- * @param amountIsInPaymentSymbol This value indicates if the order should be executed in payment/quote currency amount (e.g. purchase ETH for $10). This can be performed only if the current institution supports such orders (SupportsPlacingSellOrdersInPaymentSymbolAmount and SupportsPlacingBuyOrdersInPaymentSymbolAmount fields in get supported order features for institution) and AmountInPaymentSymbol value is passed.
81
- * @param extendedHours Specifies if the extended trading hours should be used.
82
- * @param orderType {market, limit, stopLoss}
83
- * @param timeInForce {goodTillCancel, immediateOrCancel, fillOrKill, goodForDay, postOnly, unknown}
84
- * @param mfaCode MFA Code to create an order (requested by Kraken if MFA is enabled in user settings)
85
- * @returns https://docs.meshconnect.com/reference/post_api-v1-transactions-side
86
- */
87
- export declare function meshExecuteOrder(side: MeshOrderSide, authToken: string, type: string, symbol: string, paymentSymbol: string, amount: string, isCryptocurrency: string, paymentIsCryptoCurrency: string, orderType: string, timeInForce: string, price?: string, amountIsInPaymentSymbol?: string | null, extendedHours?: boolean, mfaCode?: string | null, apiKey?: string): Promise<any>;
@@ -1,18 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.meshExecuteOrder = exports.meshPreviewOrder = exports.meshExecuteTransfer = exports.meshPreviewTransfer = exports.meshGetLinkToken = exports.meshGetTransferIntegrations = exports.meshGetCryptocurrencyHoldings = exports.meshGetHoldings = void 0;
3
+ exports.meshExecuteTransfer = exports.meshPreviewTransfer = exports.meshGetLinkToken = exports.meshGetTransferIntegrations = exports.meshGetCryptocurrencyHoldings = void 0;
4
4
  const constants_1 = require("../common/constants");
5
5
  const ApiUtils_1 = require("../utils/ApiUtils");
6
- /**
7
- * @param authToken The authentication token to send the asset from.
8
- * @param type The type of the integration to send the asset from.
9
- * @return https://docs.meshconnect.com/reference/post_api-v1-balance-get
10
- */
11
- async function meshGetHoldings(authToken, type, apiKey) {
12
- const res = await (0, ApiUtils_1.sendPostRequest)(constants_1.API_URL, 'mesh/balance/get', { authToken, type }, apiKey);
13
- return res;
14
- }
15
- exports.meshGetHoldings = meshGetHoldings;
16
6
  /**
17
7
  * @param authToken The authentication token to send the asset from.
18
8
  * @param type The type of the integration to send the asset from.
@@ -96,7 +86,6 @@ async function meshPreviewTransfer(fromAuthToken, fromType, toAuthToken, toType,
96
86
  body = { ...body, fiatCurrency };
97
87
  }
98
88
  const res = await (0, ApiUtils_1.sendPostRequest)(constants_1.API_URL, 'mesh/transfers/managed/preview', body, apiKey, { maxAttempts: 1 });
99
- console.log('Preview transfer res', res);
100
89
  return res;
101
90
  }
102
91
  exports.meshPreviewTransfer = meshPreviewTransfer;
@@ -114,100 +103,7 @@ async function meshExecuteTransfer(fromAuthToken, fromType, previewId, mfaCode,
114
103
  body = { ...body, mfaCode };
115
104
  }
116
105
  const res = await (0, ApiUtils_1.sendPostRequest)(constants_1.API_URL, 'mesh/transfers/managed/execute', body, apiKey);
117
- console.log(res);
118
106
  return res;
119
107
  }
120
108
  exports.meshExecuteTransfer = meshExecuteTransfer;
121
- /**
122
- * @param side {buy, sell}
123
- * @param authToken The authentication token to use for the preview.
124
- * @param type The type of the integration to use for the preview.
125
- * @param symbol Symbol to trade. For example, AAPL or ETH
126
- * @param paymentSymbol Symbol to use for payment, defaults to USD.
127
- * @param amount Amount of purchase.
128
- * @param price Price of the unit, used for Limit and StopLoss orders.
129
- * @param isCryptocurrency Some Stock and Crypto symbols can intersect, so the type of the asset needs to be specified explicitly.
130
- * @param paymentIsCryptoCurrency Indicates whether the PaymentSymbol is fiat or cryptocurrency
131
- * @param amountIsInPaymentSymbol This value indicates if the order should be executed in payment/quote currency amount (e.g. purchase ETH for $10). This can be performed only if the current institution supports such orders (SupportsPlacingSellOrdersInPaymentSymbolAmount and SupportsPlacingBuyOrdersInPaymentSymbolAmount fields in get supported order features for institution) and AmountInPaymentSymbol value is passed.
132
- * @param extendedHours Specifies if the extended trading hours should be used.
133
- * @param orderType {market, limit, stopLoss}
134
- * @param timeInForce {goodTillCancel, immediateOrCancel, fillOrKill, goodForDay, postOnly, unknown}
135
- * @param mfaCode MFA Code to create an order (requested by Kraken if MFA is enabled in user settings)
136
- * @returns https://docs.meshconnect.com/reference/post_api-v1-transactions-preview-side
137
- */
138
- async function meshPreviewOrder(side, authToken, type, symbol, paymentSymbol, amount, isCryptocurrency, paymentIsCryptoCurrency, orderType, timeInForce, price, amountIsInPaymentSymbol, extendedHours, mfaCode, apiKey) {
139
- let body = {
140
- side,
141
- authToken,
142
- type,
143
- symbol,
144
- paymentSymbol,
145
- amount,
146
- isCryptocurrency,
147
- paymentIsCryptoCurrency,
148
- orderType,
149
- timeInForce,
150
- };
151
- if (price) {
152
- body = { ...body, price };
153
- }
154
- if (amountIsInPaymentSymbol) {
155
- body = { ...body, amountIsInPaymentSymbol };
156
- }
157
- if (extendedHours) {
158
- body = { ...body, extendedHours };
159
- }
160
- if (mfaCode) {
161
- body = { ...body, mfaCode };
162
- }
163
- const res = await (0, ApiUtils_1.sendPostRequest)(constants_1.API_URL, 'mesh/transactions/preview', body, apiKey);
164
- return res;
165
- }
166
- exports.meshPreviewOrder = meshPreviewOrder;
167
- /**
168
- * @param side {buy, sell}
169
- * @param authToken The authentication token to use for the preview.
170
- * @param type The type of the integration to use for the preview.
171
- * @param symbol Symbol to trade. For example, AAPL or ETH
172
- * @param paymentSymbol Symbol to use for payment, defaults to USD.
173
- * @param amount Amount of purchase.
174
- * @param price Price of the unit, used for Limit and StopLoss orders.
175
- * @param isCryptocurrency Some Stock and Crypto symbols can intersect, so the type of the asset needs to be specified explicitly.
176
- * @param paymentIsCryptoCurrency Indicates whether the PaymentSymbol is fiat or cryptocurrency
177
- * @param amountIsInPaymentSymbol This value indicates if the order should be executed in payment/quote currency amount (e.g. purchase ETH for $10). This can be performed only if the current institution supports such orders (SupportsPlacingSellOrdersInPaymentSymbolAmount and SupportsPlacingBuyOrdersInPaymentSymbolAmount fields in get supported order features for institution) and AmountInPaymentSymbol value is passed.
178
- * @param extendedHours Specifies if the extended trading hours should be used.
179
- * @param orderType {market, limit, stopLoss}
180
- * @param timeInForce {goodTillCancel, immediateOrCancel, fillOrKill, goodForDay, postOnly, unknown}
181
- * @param mfaCode MFA Code to create an order (requested by Kraken if MFA is enabled in user settings)
182
- * @returns https://docs.meshconnect.com/reference/post_api-v1-transactions-side
183
- */
184
- async function meshExecuteOrder(side, authToken, type, symbol, paymentSymbol, amount, isCryptocurrency, paymentIsCryptoCurrency, orderType, timeInForce, price, amountIsInPaymentSymbol, extendedHours, mfaCode, apiKey) {
185
- let body = {
186
- side,
187
- authToken,
188
- type,
189
- symbol,
190
- paymentSymbol,
191
- amount,
192
- isCryptocurrency,
193
- paymentIsCryptoCurrency,
194
- orderType,
195
- timeInForce,
196
- };
197
- if (price) {
198
- body = { ...body, price };
199
- }
200
- if (amountIsInPaymentSymbol) {
201
- body = { ...body, amountIsInPaymentSymbol };
202
- }
203
- if (extendedHours) {
204
- body = { ...body, extendedHours };
205
- }
206
- if (mfaCode) {
207
- body = { ...body, mfaCode };
208
- }
209
- const res = await (0, ApiUtils_1.sendPostRequest)(constants_1.API_URL, 'mesh/transactions', body, apiKey);
210
- return res;
211
- }
212
- exports.meshExecuteOrder = meshExecuteOrder;
213
109
  //# sourceMappingURL=MeshApis.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MeshApis.js","sourceRoot":"","sources":["../../../src/apis/MeshApis.ts"],"names":[],"mappings":";;;AAAA,mDAA6C;AAC7C,gDAAmE;AAGnE;;;;GAIG;AACI,KAAK,UAAU,eAAe,CACnC,SAAiB,EACjB,IAAY,EACZ,MAAe;IAEf,MAAM,GAAG,GAAG,MAAM,IAAA,0BAAe,EAC/B,mBAAO,EACP,kBAAkB,EAClB,EAAE,SAAS,EAAE,IAAI,EAAE,EACnB,MAAM,CACP,CAAA;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAZD,0CAYC;AAED;;;;GAIG;AACI,KAAK,UAAU,6BAA6B,CACjD,SAAiB,EACjB,IAAY,EACZ,MAAe;IAEf,MAAM,GAAG,GAAG,MAAM,IAAA,0BAAe,EAC/B,mBAAO,EACP,mBAAmB,EACnB,EAAE,SAAS,EAAE,IAAI,EAAE,EACnB,MAAM,CACP,CAAA;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAZD,sEAYC;AAED;;GAEG;AACI,KAAK,UAAU,2BAA2B,CAC/C,MAAe;IAEf,MAAM,GAAG,GAAG,MAAM,IAAA,yBAAc,EAC9B,mBAAO,EACP,qCAAqC,EACrC,MAAM,CACP,CAAA;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AATD,kEASC;AAED;;;;;;;;;GASG;AACI,KAAK,UAAU,gBAAgB,CACpC,MAAc,EACd,aAA6B,EAC7B,wBAAkC,EAClC,eAA4B,EAC5B,MAAe;IAEf,IAAI,IAAI,GAAQ,EAAE,MAAM,EAAE,CAAA;IAC1B,IAAI,aAAa,EAAE,CAAC;QAClB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,aAAa,EAAE,CAAA;IACnC,CAAC;IACD,IAAI,wBAAwB,EAAE,CAAC;QAC7B,IAAI,GAAG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AAE,CAAC;QACjB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,YAAY,EAAE,CAAA;IAClC,CAAC;IACD,IAAI,YAAY,EAAE,CAAC;QACjB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,YAAY,EAAE,CAAA;IAClC,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,IAAA,0BAAe,EAC/B,mBAAO,EACP,gCAAgC,EAChC,IAAI,EACJ,MAAM,EACN,EAAE,WAAW,EAAE,CAAC,EAAE,CACnB,CAAA;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AA9CD,kDA8CC;AACD;;;;;;;GAOG;AACI,KAAK,UAAU,mBAAmB,CACvC,aAAqB,EACrB,QAAgB,EAChB,SAAiB,EACjB,OAAuB,EACvB,MAAe;IAEf,IAAI,IAAI,GAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAA;IACtD,IAAI,OAAO,EAAE,CAAC;QACZ,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,CAAA;IAC7B,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,IAAA,0BAAe,EAC/B,mBAAO,EACP,gCAAgC,EAChC,IAAI,EACJ,MAAM,CACP,CAAA;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAlBD,kDAkBC"}
@@ -0,0 +1,6 @@
1
+ export declare function sendSupportMessage({ title, description, userEmail, apiKey, }: {
2
+ title: string;
3
+ description: string;
4
+ userEmail: string;
5
+ apiKey?: string;
6
+ }): Promise<boolean>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendSupportMessage = void 0;
4
+ const constants_1 = require("../common/constants");
5
+ const ApiUtils_1 = require("../utils/ApiUtils");
6
+ async function sendSupportMessage({ title, description, userEmail, apiKey, }) {
7
+ try {
8
+ await (0, ApiUtils_1.sendPostRequest)(constants_1.API_URL, `support/send-message`, { title, description, userEmail }, apiKey, { maxAttempts: 1 });
9
+ return true;
10
+ }
11
+ catch (err) {
12
+ return false;
13
+ }
14
+ }
15
+ exports.sendSupportMessage = sendSupportMessage;
16
+ //# sourceMappingURL=SupportApis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SupportApis.js","sourceRoot":"","sources":["../../../src/apis/SupportApis.ts"],"names":[],"mappings":";;;AAAA,mDAA6C;AAC7C,gDAAmD;AAE5C,KAAK,UAAU,kBAAkB,CAAC,EACvC,KAAK,EACL,WAAW,EACX,SAAS,EACT,MAAM,GAMP;IACC,IAAI,CAAC;QACH,MAAM,IAAA,0BAAe,EACnB,mBAAO,EACP,sBAAsB,EACtB,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,EACjC,MAAM,EACN,EAAE,WAAW,EAAE,CAAC,EAAE,CACnB,CAAA;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC;AAvBD,gDAuBC"}
@@ -8,6 +8,7 @@ export * from './NFTApis';
8
8
  export * from './OnOffRampApis';
9
9
  export * from './OperationApis';
10
10
  export * from './PaymasterApis';
11
+ export * from './SupportApis';
11
12
  export * from './TurnkeyApis';
12
13
  export * from './types';
13
14
  export * from './UserApis';
@@ -24,6 +24,7 @@ __exportStar(require("./NFTApis"), exports);
24
24
  __exportStar(require("./OnOffRampApis"), exports);
25
25
  __exportStar(require("./OperationApis"), exports);
26
26
  __exportStar(require("./PaymasterApis"), exports);
27
+ __exportStar(require("./SupportApis"), exports);
27
28
  __exportStar(require("./TurnkeyApis"), exports);
28
29
  __exportStar(require("./types"), exports);
29
30
  __exportStar(require("./UserApis"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/apis/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,iDAA8B;AAC9B,iDAA8B;AAC9B,8CAA2B;AAC3B,6CAA0B;AAC1B,6CAA0B;AAC1B,4CAAyB;AACzB,kDAA+B;AAC/B,kDAA+B;AAC/B,kDAA+B;AAC/B,gDAA6B;AAC7B,0CAAuB;AACvB,6CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/apis/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,iDAA8B;AAC9B,iDAA8B;AAC9B,8CAA2B;AAC3B,6CAA0B;AAC1B,6CAA0B;AAC1B,4CAAyB;AACzB,kDAA+B;AAC/B,kDAA+B;AAC/B,kDAA+B;AAC/B,gDAA6B;AAC7B,gDAA6B;AAC7B,0CAAuB;AACvB,6CAA0B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/core",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Funkit core SDK provides feature-rich and extensible smart wallets built on account abstraction",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",