@getpara/user-management-client 1.8.0 → 1.10.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.
package/dist/cjs/client.js
CHANGED
|
@@ -636,38 +636,14 @@ class Client {
|
|
|
636
636
|
return __async(this, null, function* () {
|
|
637
637
|
var _f = _e, {
|
|
638
638
|
userId,
|
|
639
|
-
params
|
|
640
|
-
|
|
641
|
-
walletType,
|
|
642
|
-
address,
|
|
643
|
-
provider,
|
|
644
|
-
networks,
|
|
645
|
-
assets,
|
|
646
|
-
defaultNetwork,
|
|
647
|
-
defaultAsset,
|
|
648
|
-
fiat,
|
|
649
|
-
fiatQuantity,
|
|
650
|
-
testMode = false
|
|
651
|
-
}
|
|
652
|
-
} = _f, params = __objRest(_f, [
|
|
639
|
+
params
|
|
640
|
+
} = _f, walletParams = __objRest(_f, [
|
|
653
641
|
"userId",
|
|
654
642
|
"params"
|
|
655
643
|
]);
|
|
656
|
-
const [key, identifier] = (0, import_utils.extractWalletRef)(
|
|
644
|
+
const [key, identifier] = (0, import_utils.extractWalletRef)(walletParams);
|
|
657
645
|
const walletString = key === "walletId" ? `wallets/${identifier}` : `external-wallets/${identifier}`;
|
|
658
|
-
const res = yield this.baseRequest.post(`/users/${userId}/${walletString}/purchases`,
|
|
659
|
-
type,
|
|
660
|
-
provider,
|
|
661
|
-
walletType,
|
|
662
|
-
address,
|
|
663
|
-
networks,
|
|
664
|
-
assets,
|
|
665
|
-
defaultAsset,
|
|
666
|
-
defaultNetwork,
|
|
667
|
-
fiat,
|
|
668
|
-
fiatQuantity,
|
|
669
|
-
testMode
|
|
670
|
-
});
|
|
646
|
+
const res = yield this.baseRequest.post(`/users/${userId}/${walletString}/purchases`, params);
|
|
671
647
|
return res.data;
|
|
672
648
|
});
|
|
673
649
|
}
|
|
@@ -755,6 +731,7 @@ class Client {
|
|
|
755
731
|
return __async(this, arguments, function* (userId, {
|
|
756
732
|
tx,
|
|
757
733
|
signature,
|
|
734
|
+
sourceAddress,
|
|
758
735
|
network,
|
|
759
736
|
walletId,
|
|
760
737
|
walletType
|
|
@@ -762,6 +739,7 @@ class Client {
|
|
|
762
739
|
const res = yield this.baseRequest.post(`/users/${userId}/wallets/${walletId}/offramp-send`, {
|
|
763
740
|
tx,
|
|
764
741
|
signature,
|
|
742
|
+
sourceAddress,
|
|
765
743
|
network,
|
|
766
744
|
walletType
|
|
767
745
|
});
|
package/dist/cjs/types/wallet.js
CHANGED
|
@@ -55,6 +55,7 @@ var Network = /* @__PURE__ */ ((Network2) => {
|
|
|
55
55
|
Network2["COSMOS"] = "COSMOS";
|
|
56
56
|
Network2["CELO"] = "CELO";
|
|
57
57
|
Network2["NOBLE"] = "NOBLE";
|
|
58
|
+
Network2["SOLANA_DEVNET"] = "SOLANA_DEVNET";
|
|
58
59
|
return Network2;
|
|
59
60
|
})(Network || {});
|
|
60
61
|
const PREGEN_IDENTIFIER_TYPES = [
|
package/dist/esm/client.js
CHANGED
|
@@ -559,38 +559,14 @@ class Client {
|
|
|
559
559
|
return __async(this, null, function* () {
|
|
560
560
|
var _f = _e, {
|
|
561
561
|
userId,
|
|
562
|
-
params
|
|
563
|
-
|
|
564
|
-
walletType,
|
|
565
|
-
address,
|
|
566
|
-
provider,
|
|
567
|
-
networks,
|
|
568
|
-
assets,
|
|
569
|
-
defaultNetwork,
|
|
570
|
-
defaultAsset,
|
|
571
|
-
fiat,
|
|
572
|
-
fiatQuantity,
|
|
573
|
-
testMode = false
|
|
574
|
-
}
|
|
575
|
-
} = _f, params = __objRest(_f, [
|
|
562
|
+
params
|
|
563
|
+
} = _f, walletParams = __objRest(_f, [
|
|
576
564
|
"userId",
|
|
577
565
|
"params"
|
|
578
566
|
]);
|
|
579
|
-
const [key, identifier] = extractWalletRef(
|
|
567
|
+
const [key, identifier] = extractWalletRef(walletParams);
|
|
580
568
|
const walletString = key === "walletId" ? `wallets/${identifier}` : `external-wallets/${identifier}`;
|
|
581
|
-
const res = yield this.baseRequest.post(`/users/${userId}/${walletString}/purchases`,
|
|
582
|
-
type,
|
|
583
|
-
provider,
|
|
584
|
-
walletType,
|
|
585
|
-
address,
|
|
586
|
-
networks,
|
|
587
|
-
assets,
|
|
588
|
-
defaultAsset,
|
|
589
|
-
defaultNetwork,
|
|
590
|
-
fiat,
|
|
591
|
-
fiatQuantity,
|
|
592
|
-
testMode
|
|
593
|
-
});
|
|
569
|
+
const res = yield this.baseRequest.post(`/users/${userId}/${walletString}/purchases`, params);
|
|
594
570
|
return res.data;
|
|
595
571
|
});
|
|
596
572
|
}
|
|
@@ -678,6 +654,7 @@ class Client {
|
|
|
678
654
|
return __async(this, arguments, function* (userId, {
|
|
679
655
|
tx,
|
|
680
656
|
signature,
|
|
657
|
+
sourceAddress,
|
|
681
658
|
network,
|
|
682
659
|
walletId,
|
|
683
660
|
walletType
|
|
@@ -685,6 +662,7 @@ class Client {
|
|
|
685
662
|
const res = yield this.baseRequest.post(`/users/${userId}/wallets/${walletId}/offramp-send`, {
|
|
686
663
|
tx,
|
|
687
664
|
signature,
|
|
665
|
+
sourceAddress,
|
|
688
666
|
network,
|
|
689
667
|
walletType
|
|
690
668
|
});
|
package/dist/esm/types/wallet.js
CHANGED
|
@@ -29,6 +29,7 @@ var Network = /* @__PURE__ */ ((Network2) => {
|
|
|
29
29
|
Network2["COSMOS"] = "COSMOS";
|
|
30
30
|
Network2["CELO"] = "CELO";
|
|
31
31
|
Network2["NOBLE"] = "NOBLE";
|
|
32
|
+
Network2["SOLANA_DEVNET"] = "SOLANA_DEVNET";
|
|
32
33
|
return Network2;
|
|
33
34
|
})(Network || {});
|
|
34
35
|
const PREGEN_IDENTIFIER_TYPES = [
|
package/dist/types/client.d.ts
CHANGED
|
@@ -257,7 +257,7 @@ declare class Client {
|
|
|
257
257
|
getPendingTransaction(userId: string, pendingTransactionId: string): Promise<AxiosResponse<any, any>>;
|
|
258
258
|
acceptPendingTransaction(userId: string, pendingTransactionId: string): Promise<AxiosResponse<any, any>>;
|
|
259
259
|
getOnRampConfig(): Promise<OnRampConfig>;
|
|
260
|
-
createOnRampPurchase({ userId, params
|
|
260
|
+
createOnRampPurchase({ userId, params, ...walletParams }: {
|
|
261
261
|
userId: string;
|
|
262
262
|
params: OnRampPurchaseCreateParams;
|
|
263
263
|
} & WalletParams): Promise<OnRampPurchase>;
|
|
@@ -282,6 +282,7 @@ declare class Client {
|
|
|
282
282
|
}, any>>;
|
|
283
283
|
generateOffRampTx<ReturnType = {
|
|
284
284
|
tx: string;
|
|
285
|
+
message?: string;
|
|
285
286
|
asset: OnRampAsset;
|
|
286
287
|
network: Network;
|
|
287
288
|
}>(userId: string, { provider, chainId, contractAddress, testMode, walletId, walletType, destinationAddress, sourceAddress, assetQuantity, }: {
|
|
@@ -297,9 +298,10 @@ declare class Client {
|
|
|
297
298
|
}): Promise<ReturnType>;
|
|
298
299
|
sendOffRampTx<ReturnType = {
|
|
299
300
|
txHash: string;
|
|
300
|
-
}>(userId: string, { tx, signature, network, walletId, walletType, }: {
|
|
301
|
+
}>(userId: string, { tx, signature, sourceAddress, network, walletId, walletType, }: {
|
|
301
302
|
tx: string;
|
|
302
303
|
signature: string;
|
|
304
|
+
sourceAddress?: string;
|
|
303
305
|
network: Network;
|
|
304
306
|
walletId: string;
|
|
305
307
|
walletType: WalletType;
|
|
@@ -25,7 +25,8 @@ export declare enum Network {
|
|
|
25
25
|
SOLANA = "SOLANA",
|
|
26
26
|
COSMOS = "COSMOS",
|
|
27
27
|
CELO = "CELO",
|
|
28
|
-
NOBLE = "NOBLE"
|
|
28
|
+
NOBLE = "NOBLE",
|
|
29
|
+
SOLANA_DEVNET = "SOLANA_DEVNET"
|
|
29
30
|
}
|
|
30
31
|
export type WalletRef = 'walletId' | 'externalWalletAddress';
|
|
31
32
|
export type WalletParams = Partial<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/user-management-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"require": "./dist/cjs/index.js"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "617cf0aa1307a96ec5e91d39e306e8a0b3b86b82"
|
|
37
37
|
}
|