@phantom/server-sdk 0.2.2 → 0.2.4
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/index.d.ts +2 -3
- package/dist/index.js +14 -10
- package/dist/index.mjs +14 -10
- package/package.json +5 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { NetworkId, PhantomClient, Organization, GetWalletsResult, CreateWalletResult
|
|
1
|
+
import { AddressType, NetworkId, PhantomClient, Organization, GetWalletsResult, CreateWalletResult } from '@phantom/client';
|
|
2
2
|
export { CreateWalletResult, DerivationPath, GetWalletsResult, NetworkConfig, PhantomClient, SignedTransaction, Transaction, Wallet, deriveSubmissionConfig, generateKeyPair, getDerivationPathForNetwork, getNetworkConfig, getNetworkDescription, getNetworkIdsByChain, getSupportedNetworkIds, supportsTransactionSubmission } from '@phantom/client';
|
|
3
3
|
import { ParsedSignatureResult, ParsedTransactionResult } from '@phantom/parsers';
|
|
4
4
|
export { ParsedMessage, ParsedSignatureResult, ParsedTransaction, ParsedTransactionResult, parseMessage, parseSignMessageResponse, parseTransaction, parseTransactionResponse } from '@phantom/parsers';
|
|
5
5
|
export { NetworkId } from '@phantom/constants';
|
|
6
6
|
export { ApiKeyStamper } from '@phantom/api-key-stamper';
|
|
7
|
-
import { DerivationInfoAddressFormatEnum } from '@phantom/openapi-wallet-service';
|
|
8
7
|
|
|
9
8
|
interface WalletAddress {
|
|
10
|
-
addressType:
|
|
9
|
+
addressType: AddressType;
|
|
11
10
|
address: string;
|
|
12
11
|
}
|
|
13
12
|
|
package/dist/index.js
CHANGED
|
@@ -113,16 +113,20 @@ var ServerSDK = class {
|
|
|
113
113
|
})
|
|
114
114
|
);
|
|
115
115
|
const base64urlPublicKey = (0, import_base64url.base64urlEncode)(import_bs58.default.decode(keyPair.publicKey));
|
|
116
|
-
return tempClient.createOrganization(name, [
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
116
|
+
return tempClient.createOrganization(name, [
|
|
117
|
+
{
|
|
118
|
+
username: `user-${Date.now()}`,
|
|
119
|
+
role: "ADMIN",
|
|
120
|
+
authenticators: [
|
|
121
|
+
{
|
|
122
|
+
authenticatorName: `auth-${Date.now()}`,
|
|
123
|
+
authenticatorKind: "keypair",
|
|
124
|
+
publicKey: base64urlPublicKey,
|
|
125
|
+
algorithm: "Ed25519"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
]);
|
|
126
130
|
}
|
|
127
131
|
getWallets(limit, offset) {
|
|
128
132
|
return this.client.getWallets(limit, offset);
|
package/dist/index.mjs
CHANGED
|
@@ -86,16 +86,20 @@ var ServerSDK = class {
|
|
|
86
86
|
})
|
|
87
87
|
);
|
|
88
88
|
const base64urlPublicKey = base64urlEncode(bs58.decode(keyPair.publicKey));
|
|
89
|
-
return tempClient.createOrganization(name, [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
89
|
+
return tempClient.createOrganization(name, [
|
|
90
|
+
{
|
|
91
|
+
username: `user-${Date.now()}`,
|
|
92
|
+
role: "ADMIN",
|
|
93
|
+
authenticators: [
|
|
94
|
+
{
|
|
95
|
+
authenticatorName: `auth-${Date.now()}`,
|
|
96
|
+
authenticatorKind: "keypair",
|
|
97
|
+
publicKey: base64urlPublicKey,
|
|
98
|
+
algorithm: "Ed25519"
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
]);
|
|
99
103
|
}
|
|
100
104
|
getWallets(limit, offset) {
|
|
101
105
|
return this.client.getWallets(limit, offset);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phantom/server-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Server SDK for Phantom Wallet",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -37,12 +37,11 @@
|
|
|
37
37
|
"typescript": "^5.0.4"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@phantom/api-key-stamper": "^0.1.
|
|
40
|
+
"@phantom/api-key-stamper": "^0.1.5",
|
|
41
41
|
"@phantom/base64url": "^0.1.0",
|
|
42
|
-
"@phantom/client": "^0.1.
|
|
43
|
-
"@phantom/constants": "^0.0.
|
|
44
|
-
"@phantom/
|
|
45
|
-
"@phantom/parsers": "^0.0.6",
|
|
42
|
+
"@phantom/client": "^0.1.8",
|
|
43
|
+
"@phantom/constants": "^0.0.3",
|
|
44
|
+
"@phantom/parsers": "^0.0.7",
|
|
46
45
|
"bs58": "^6.0.0"
|
|
47
46
|
},
|
|
48
47
|
"files": [
|