@openfort/openfort-node 0.7.4 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +203 -189
- package/dist/index.d.ts +203 -189
- package/dist/index.js +34 -50
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -47
- package/dist/index.mjs.map +1 -1
- package/openapi-auth.json +6 -0
- package/openapi.json +224 -417
- package/package.json +1 -1
- package/examples/exchange/createSwap.ts +0 -50
- package/examples/exchange/quoteSwap.ts +0 -34
package/dist/index.js
CHANGED
|
@@ -96,6 +96,7 @@ __export(index_exports, {
|
|
|
96
96
|
EntityTypeTRANSACTIONINTENT: () => EntityTypeTRANSACTIONINTENT,
|
|
97
97
|
EntityTypeTRIGGER: () => EntityTypeTRIGGER,
|
|
98
98
|
EntityTypeUSER: () => EntityTypeUSER,
|
|
99
|
+
EntityTypeWALLET: () => EntityTypeWALLET,
|
|
99
100
|
ErrorTypeINVALIDREQUESTERROR: () => ErrorTypeINVALIDREQUESTERROR,
|
|
100
101
|
EvmClient: () => EvmClient,
|
|
101
102
|
ExportPrivateKeyResponseObject: () => ExportPrivateKeyResponseObject,
|
|
@@ -177,7 +178,6 @@ __export(index_exports, {
|
|
|
177
178
|
TimeIntervalType: () => TimeIntervalType,
|
|
178
179
|
TimeoutError: () => TimeoutError,
|
|
179
180
|
TokenType: () => TokenType,
|
|
180
|
-
TradeType: () => TradeType,
|
|
181
181
|
TransactionAbstractionType: () => TransactionAbstractionType,
|
|
182
182
|
TransactionIntentResponseExpandable: () => TransactionIntentResponseExpandable,
|
|
183
183
|
TransactionStatus: () => TransactionStatus,
|
|
@@ -216,7 +216,6 @@ __export(index_exports, {
|
|
|
216
216
|
createPolicyWithdrawal: () => createPolicyWithdrawal,
|
|
217
217
|
createSession: () => createSession,
|
|
218
218
|
createSubscription: () => createSubscription,
|
|
219
|
-
createSwap: () => createSwap,
|
|
220
219
|
createTransactionIntent: () => createTransactionIntent,
|
|
221
220
|
createTrigger: () => createTrigger,
|
|
222
221
|
decryptExportedPrivateKey: () => decryptExportedPrivateKey,
|
|
@@ -283,11 +282,13 @@ __export(index_exports, {
|
|
|
283
282
|
getTransactionIntents: () => getTransactionIntents,
|
|
284
283
|
getTrigger: () => getTrigger,
|
|
285
284
|
getTriggers: () => getTriggers,
|
|
285
|
+
getUserWallet: () => getUserWallet,
|
|
286
286
|
getVerificationPayload: () => getVerificationPayload,
|
|
287
287
|
getWebhookLogsByProjectId: () => getWebhookLogsByProjectId,
|
|
288
288
|
grantOAuth: () => grantOAuth,
|
|
289
289
|
handleChainRpcRequest: () => handleChainRpcRequest,
|
|
290
290
|
handleRpcRequest: () => handleRpcRequest,
|
|
291
|
+
handleSolanaRpcRequest: () => handleSolanaRpcRequest,
|
|
291
292
|
importPrivateKey: () => importPrivateKey,
|
|
292
293
|
initOAuth: () => initOAuth,
|
|
293
294
|
initSIWE: () => initSIWE,
|
|
@@ -311,7 +312,6 @@ __export(index_exports, {
|
|
|
311
312
|
poolOAuth: () => poolOAuth,
|
|
312
313
|
pregenerateUserV2: () => pregenerateUserV2,
|
|
313
314
|
query: () => query,
|
|
314
|
-
quoteSwap: () => quoteSwap,
|
|
315
315
|
readContract: () => readContract,
|
|
316
316
|
refresh: () => refresh,
|
|
317
317
|
registerGuest: () => registerGuest,
|
|
@@ -719,7 +719,7 @@ function requiresWalletAuth(requestMethod, requestPath) {
|
|
|
719
719
|
}
|
|
720
720
|
|
|
721
721
|
// src/version.ts
|
|
722
|
-
var VERSION = "0.7.
|
|
722
|
+
var VERSION = "0.7.6";
|
|
723
723
|
var PACKAGE = "@openfort/openfort-node";
|
|
724
724
|
|
|
725
725
|
// src/openapi-client/openfortApiClient.ts
|
|
@@ -2416,30 +2416,6 @@ var deleteEvent = (id, options) => {
|
|
|
2416
2416
|
);
|
|
2417
2417
|
};
|
|
2418
2418
|
|
|
2419
|
-
// src/openapi-client/generated/exchange/exchange.ts
|
|
2420
|
-
var createSwap = (createExchangeRequest, options) => {
|
|
2421
|
-
return openfortApiClient(
|
|
2422
|
-
{
|
|
2423
|
-
url: `/v1/exchange`,
|
|
2424
|
-
method: "POST",
|
|
2425
|
-
headers: { "Content-Type": "application/json" },
|
|
2426
|
-
data: createExchangeRequest
|
|
2427
|
-
},
|
|
2428
|
-
options
|
|
2429
|
-
);
|
|
2430
|
-
};
|
|
2431
|
-
var quoteSwap = (createExchangeRequest, options) => {
|
|
2432
|
-
return openfortApiClient(
|
|
2433
|
-
{
|
|
2434
|
-
url: `/v1/exchange/quote`,
|
|
2435
|
-
method: "POST",
|
|
2436
|
-
headers: { "Content-Type": "application/json" },
|
|
2437
|
-
data: createExchangeRequest
|
|
2438
|
-
},
|
|
2439
|
-
options
|
|
2440
|
-
);
|
|
2441
|
-
};
|
|
2442
|
-
|
|
2443
2419
|
// src/openapi-client/generated/forwarder-contract/forwarder-contract.ts
|
|
2444
2420
|
var createForwarderContract = (createForwarderContractRequest, options) => {
|
|
2445
2421
|
return openfortApiClient(
|
|
@@ -2730,10 +2706,6 @@ var OnrampProvider = {
|
|
|
2730
2706
|
var EntityTypeFORWARDERCONTRACT = {
|
|
2731
2707
|
forwarderContract: "forwarderContract"
|
|
2732
2708
|
};
|
|
2733
|
-
var TradeType = {
|
|
2734
|
-
EXACT_INPUT: "EXACT_INPUT",
|
|
2735
|
-
EXACT_OUTPUT: "EXACT_OUTPUT"
|
|
2736
|
-
};
|
|
2737
2709
|
var APITopicBALANCECONTRACT = {
|
|
2738
2710
|
balancecontract: "balance.contract"
|
|
2739
2711
|
};
|
|
@@ -2776,6 +2748,9 @@ var AuthProviderResponseV2 = {
|
|
|
2776
2748
|
oidc: "oidc",
|
|
2777
2749
|
siwe: "siwe"
|
|
2778
2750
|
};
|
|
2751
|
+
var EntityTypeWALLET = {
|
|
2752
|
+
wallet: "wallet"
|
|
2753
|
+
};
|
|
2779
2754
|
var PregenerateAccountResponseCustody = {
|
|
2780
2755
|
Developer: "Developer",
|
|
2781
2756
|
User: "User"
|
|
@@ -2943,7 +2918,8 @@ var ApiKeyType = {
|
|
|
2943
2918
|
pk: "pk",
|
|
2944
2919
|
sk: "sk",
|
|
2945
2920
|
pk_shield: "pk_shield",
|
|
2946
|
-
sk_shield: "sk_shield"
|
|
2921
|
+
sk_shield: "sk_shield",
|
|
2922
|
+
pk_wallet: "pk_wallet"
|
|
2947
2923
|
};
|
|
2948
2924
|
var AuthProviderResponse = {
|
|
2949
2925
|
email: "email",
|
|
@@ -3531,6 +3507,19 @@ var getVerificationPayload = (params, options) => {
|
|
|
3531
3507
|
);
|
|
3532
3508
|
};
|
|
3533
3509
|
|
|
3510
|
+
// src/openapi-client/generated/solana-rpc/solana-rpc.ts
|
|
3511
|
+
var handleSolanaRpcRequest = (cluster, jsonRpcRequest, options) => {
|
|
3512
|
+
return openfortApiClient(
|
|
3513
|
+
{
|
|
3514
|
+
url: `/rpc/solana/${cluster}`,
|
|
3515
|
+
method: "POST",
|
|
3516
|
+
headers: { "Content-Type": "application/json" },
|
|
3517
|
+
data: jsonRpcRequest
|
|
3518
|
+
},
|
|
3519
|
+
options
|
|
3520
|
+
);
|
|
3521
|
+
};
|
|
3522
|
+
|
|
3534
3523
|
// src/openapi-client/generated/subscriptions/subscriptions.ts
|
|
3535
3524
|
var getSubscriptions = (options) => {
|
|
3536
3525
|
return openfortApiClient(
|
|
@@ -3712,6 +3701,15 @@ var deleteUser = (id, options) => {
|
|
|
3712
3701
|
options
|
|
3713
3702
|
);
|
|
3714
3703
|
};
|
|
3704
|
+
var getUserWallet = (id, options) => {
|
|
3705
|
+
return openfortApiClient(
|
|
3706
|
+
{
|
|
3707
|
+
url: `/v2/users/${id}/wallet`,
|
|
3708
|
+
method: "GET"
|
|
3709
|
+
},
|
|
3710
|
+
options
|
|
3711
|
+
);
|
|
3712
|
+
};
|
|
3715
3713
|
var pregenerateUserV2 = (pregenerateUserRequestV2, options) => {
|
|
3716
3714
|
return openfortApiClient(
|
|
3717
3715
|
{
|
|
@@ -4730,20 +4728,6 @@ var Openfort = class {
|
|
|
4730
4728
|
};
|
|
4731
4729
|
}
|
|
4732
4730
|
// ============================================
|
|
4733
|
-
// Exchange API
|
|
4734
|
-
// ============================================
|
|
4735
|
-
/**
|
|
4736
|
-
* Exchange endpoints
|
|
4737
|
-
*/
|
|
4738
|
-
get exchange() {
|
|
4739
|
-
return {
|
|
4740
|
-
/** Create swap */
|
|
4741
|
-
createSwap,
|
|
4742
|
-
/** Get swap quote */
|
|
4743
|
-
quoteSwap
|
|
4744
|
-
};
|
|
4745
|
-
}
|
|
4746
|
-
// ============================================
|
|
4747
4731
|
// Auth API
|
|
4748
4732
|
// ============================================
|
|
4749
4733
|
/**
|
|
@@ -5062,6 +5046,7 @@ var index_default = Openfort;
|
|
|
5062
5046
|
EntityTypeTRANSACTIONINTENT,
|
|
5063
5047
|
EntityTypeTRIGGER,
|
|
5064
5048
|
EntityTypeUSER,
|
|
5049
|
+
EntityTypeWALLET,
|
|
5065
5050
|
ErrorTypeINVALIDREQUESTERROR,
|
|
5066
5051
|
EvmClient,
|
|
5067
5052
|
ExportPrivateKeyResponseObject,
|
|
@@ -5143,7 +5128,6 @@ var index_default = Openfort;
|
|
|
5143
5128
|
TimeIntervalType,
|
|
5144
5129
|
TimeoutError,
|
|
5145
5130
|
TokenType,
|
|
5146
|
-
TradeType,
|
|
5147
5131
|
TransactionAbstractionType,
|
|
5148
5132
|
TransactionIntentResponseExpandable,
|
|
5149
5133
|
TransactionStatus,
|
|
@@ -5182,7 +5166,6 @@ var index_default = Openfort;
|
|
|
5182
5166
|
createPolicyWithdrawal,
|
|
5183
5167
|
createSession,
|
|
5184
5168
|
createSubscription,
|
|
5185
|
-
createSwap,
|
|
5186
5169
|
createTransactionIntent,
|
|
5187
5170
|
createTrigger,
|
|
5188
5171
|
decryptExportedPrivateKey,
|
|
@@ -5248,11 +5231,13 @@ var index_default = Openfort;
|
|
|
5248
5231
|
getTransactionIntents,
|
|
5249
5232
|
getTrigger,
|
|
5250
5233
|
getTriggers,
|
|
5234
|
+
getUserWallet,
|
|
5251
5235
|
getVerificationPayload,
|
|
5252
5236
|
getWebhookLogsByProjectId,
|
|
5253
5237
|
grantOAuth,
|
|
5254
5238
|
handleChainRpcRequest,
|
|
5255
5239
|
handleRpcRequest,
|
|
5240
|
+
handleSolanaRpcRequest,
|
|
5256
5241
|
importPrivateKey,
|
|
5257
5242
|
initOAuth,
|
|
5258
5243
|
initSIWE,
|
|
@@ -5276,7 +5261,6 @@ var index_default = Openfort;
|
|
|
5276
5261
|
poolOAuth,
|
|
5277
5262
|
pregenerateUserV2,
|
|
5278
5263
|
query,
|
|
5279
|
-
quoteSwap,
|
|
5280
5264
|
readContract,
|
|
5281
5265
|
refresh,
|
|
5282
5266
|
registerGuest,
|