@dynamic-labs-wallet/svm 1.1.11 → 1.1.13
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/index.cjs +8 -5
- package/index.esm.js +8 -5
- package/package.json +2 -2
- package/src/svm/client.d.ts +5 -19
- package/src/svm/client.d.ts.map +1 -1
package/index.cjs
CHANGED
|
@@ -98,7 +98,7 @@ class DynamicSvmWalletClient extends browser.DynamicWalletClient {
|
|
|
98
98
|
* @param message The message to sign (Uint8Array)
|
|
99
99
|
* @param accountAddress Solana address (base58 encoded)
|
|
100
100
|
* @param password The password for encrypted backup shares
|
|
101
|
-
*/ async signMessage({ message, accountAddress, password = undefined, signedSessionId, mfaToken, elevatedAccessToken, onError, traceContext }) {
|
|
101
|
+
*/ async signMessage({ message, accountAddress, password = undefined, signedSessionId, mfaToken, elevatedAccessToken, approvalQuorum, onError, traceContext }) {
|
|
102
102
|
await this.verifyPassword({
|
|
103
103
|
accountAddress,
|
|
104
104
|
password,
|
|
@@ -119,6 +119,7 @@ class DynamicSvmWalletClient extends browser.DynamicWalletClient {
|
|
|
119
119
|
context: {
|
|
120
120
|
svmMessage: message
|
|
121
121
|
},
|
|
122
|
+
approvalQuorum,
|
|
122
123
|
onError,
|
|
123
124
|
traceContext
|
|
124
125
|
});
|
|
@@ -131,7 +132,7 @@ class DynamicSvmWalletClient extends browser.DynamicWalletClient {
|
|
|
131
132
|
});
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
|
-
async signTransaction({ senderAddress, transaction, password = undefined, signedSessionId, mfaToken, elevatedAccessToken, chainId, context, onError, traceContext }) {
|
|
135
|
+
async signTransaction({ senderAddress, transaction, password = undefined, signedSessionId, mfaToken, elevatedAccessToken, chainId, context, approvalQuorum, onError, traceContext }) {
|
|
135
136
|
await this.verifyPassword({
|
|
136
137
|
accountAddress: senderAddress,
|
|
137
138
|
password,
|
|
@@ -148,7 +149,8 @@ class DynamicSvmWalletClient extends browser.DynamicWalletClient {
|
|
|
148
149
|
elevatedAccessToken,
|
|
149
150
|
chainId,
|
|
150
151
|
base58SerializedTransaction,
|
|
151
|
-
context
|
|
152
|
+
context,
|
|
153
|
+
approvalQuorum
|
|
152
154
|
});
|
|
153
155
|
const signatureEd25519 = await this.sign(_extends({}, signParams, {
|
|
154
156
|
onError,
|
|
@@ -173,7 +175,7 @@ class DynamicSvmWalletClient extends browser.DynamicWalletClient {
|
|
|
173
175
|
const serializedTransaction = versionedTransaction.serialize();
|
|
174
176
|
return bs58.encode(serializedTransaction);
|
|
175
177
|
}
|
|
176
|
-
buildSignParams({ transaction, senderAddress, password, signedSessionId, mfaToken, elevatedAccessToken, chainId, base58SerializedTransaction, context }) {
|
|
178
|
+
buildSignParams({ transaction, senderAddress, password, signedSessionId, mfaToken, elevatedAccessToken, chainId, base58SerializedTransaction, context, approvalQuorum }) {
|
|
177
179
|
const signParams = {
|
|
178
180
|
message: transaction,
|
|
179
181
|
accountAddress: senderAddress,
|
|
@@ -181,7 +183,8 @@ class DynamicSvmWalletClient extends browser.DynamicWalletClient {
|
|
|
181
183
|
password,
|
|
182
184
|
signedSessionId,
|
|
183
185
|
mfaToken,
|
|
184
|
-
elevatedAccessToken
|
|
186
|
+
elevatedAccessToken,
|
|
187
|
+
approvalQuorum
|
|
185
188
|
};
|
|
186
189
|
if (chainId !== undefined) {
|
|
187
190
|
signParams.context = _extends({}, context, {
|
package/index.esm.js
CHANGED
|
@@ -96,7 +96,7 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
96
96
|
* @param message The message to sign (Uint8Array)
|
|
97
97
|
* @param accountAddress Solana address (base58 encoded)
|
|
98
98
|
* @param password The password for encrypted backup shares
|
|
99
|
-
*/ async signMessage({ message, accountAddress, password = undefined, signedSessionId, mfaToken, elevatedAccessToken, onError, traceContext }) {
|
|
99
|
+
*/ async signMessage({ message, accountAddress, password = undefined, signedSessionId, mfaToken, elevatedAccessToken, approvalQuorum, onError, traceContext }) {
|
|
100
100
|
await this.verifyPassword({
|
|
101
101
|
accountAddress,
|
|
102
102
|
password,
|
|
@@ -117,6 +117,7 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
117
117
|
context: {
|
|
118
118
|
svmMessage: message
|
|
119
119
|
},
|
|
120
|
+
approvalQuorum,
|
|
120
121
|
onError,
|
|
121
122
|
traceContext
|
|
122
123
|
});
|
|
@@ -129,7 +130,7 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
129
130
|
});
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
|
-
async signTransaction({ senderAddress, transaction, password = undefined, signedSessionId, mfaToken, elevatedAccessToken, chainId, context, onError, traceContext }) {
|
|
133
|
+
async signTransaction({ senderAddress, transaction, password = undefined, signedSessionId, mfaToken, elevatedAccessToken, chainId, context, approvalQuorum, onError, traceContext }) {
|
|
133
134
|
await this.verifyPassword({
|
|
134
135
|
accountAddress: senderAddress,
|
|
135
136
|
password,
|
|
@@ -146,7 +147,8 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
146
147
|
elevatedAccessToken,
|
|
147
148
|
chainId,
|
|
148
149
|
base58SerializedTransaction,
|
|
149
|
-
context
|
|
150
|
+
context,
|
|
151
|
+
approvalQuorum
|
|
150
152
|
});
|
|
151
153
|
const signatureEd25519 = await this.sign(_extends({}, signParams, {
|
|
152
154
|
onError,
|
|
@@ -171,7 +173,7 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
171
173
|
const serializedTransaction = versionedTransaction.serialize();
|
|
172
174
|
return bs58.encode(serializedTransaction);
|
|
173
175
|
}
|
|
174
|
-
buildSignParams({ transaction, senderAddress, password, signedSessionId, mfaToken, elevatedAccessToken, chainId, base58SerializedTransaction, context }) {
|
|
176
|
+
buildSignParams({ transaction, senderAddress, password, signedSessionId, mfaToken, elevatedAccessToken, chainId, base58SerializedTransaction, context, approvalQuorum }) {
|
|
175
177
|
const signParams = {
|
|
176
178
|
message: transaction,
|
|
177
179
|
accountAddress: senderAddress,
|
|
@@ -179,7 +181,8 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
179
181
|
password,
|
|
180
182
|
signedSessionId,
|
|
181
183
|
mfaToken,
|
|
182
|
-
elevatedAccessToken
|
|
184
|
+
elevatedAccessToken,
|
|
185
|
+
approvalQuorum
|
|
183
186
|
};
|
|
184
187
|
if (chainId !== undefined) {
|
|
185
188
|
signParams.context = _extends({}, context, {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/svm",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@dynamic-labs-wallet/browser": "1.1.
|
|
7
|
+
"@dynamic-labs-wallet/browser": "1.1.13",
|
|
8
8
|
"@solana/web3.js": "^1.98.2",
|
|
9
9
|
"bs58": "^6.0.0",
|
|
10
10
|
"@dynamic-labs/sdk-api-core": "^0.16.0"
|
package/src/svm/client.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { DynamicWalletClient, type Ed25519KeygenResult, type ThresholdSignatureScheme, type TraceContext, type RequestWithElevatedAccessToken } from '@dynamic-labs-wallet/browser';
|
|
2
|
-
import type { SignMessageContext } from '@dynamic-labs/sdk-api-core';
|
|
1
|
+
import { DynamicWalletClient, type Ed25519KeygenResult, type ThresholdSignatureScheme, type TraceContext, type RequestWithElevatedAccessToken, type BaseSignParams } from '@dynamic-labs-wallet/browser';
|
|
3
2
|
export declare class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
4
3
|
readonly chainName = "SVM";
|
|
5
4
|
accountAddress?: string;
|
|
@@ -29,28 +28,15 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
29
28
|
* @param accountAddress Solana address (base58 encoded)
|
|
30
29
|
* @param password The password for encrypted backup shares
|
|
31
30
|
*/
|
|
32
|
-
signMessage({ message, accountAddress, password, signedSessionId, mfaToken, elevatedAccessToken, onError, traceContext, }: {
|
|
31
|
+
signMessage({ message, accountAddress, password, signedSessionId, mfaToken, elevatedAccessToken, approvalQuorum, onError, traceContext, }: {
|
|
33
32
|
message: string;
|
|
34
33
|
accountAddress: string;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
mfaToken?: string;
|
|
38
|
-
elevatedAccessToken?: string;
|
|
39
|
-
onError?: (error: Error) => void;
|
|
40
|
-
traceContext?: TraceContext;
|
|
41
|
-
}): Promise<string>;
|
|
42
|
-
signTransaction({ senderAddress, transaction, password, signedSessionId, mfaToken, elevatedAccessToken, chainId, context, onError, traceContext, }: {
|
|
34
|
+
} & BaseSignParams): Promise<string>;
|
|
35
|
+
signTransaction({ senderAddress, transaction, password, signedSessionId, mfaToken, elevatedAccessToken, chainId, context, approvalQuorum, onError, traceContext, }: {
|
|
43
36
|
senderAddress: string;
|
|
44
37
|
transaction: string;
|
|
45
|
-
password?: string;
|
|
46
|
-
signedSessionId: string;
|
|
47
|
-
mfaToken?: string;
|
|
48
|
-
elevatedAccessToken?: string;
|
|
49
38
|
chainId?: string;
|
|
50
|
-
|
|
51
|
-
onError?: (error: Error) => void;
|
|
52
|
-
traceContext?: TraceContext;
|
|
53
|
-
}): Promise<string>;
|
|
39
|
+
} & BaseSignParams): Promise<string>;
|
|
54
40
|
private prepareTransactionForSigning;
|
|
55
41
|
private buildSignParams;
|
|
56
42
|
/**
|
package/src/svm/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/svm/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAUnB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,8BAA8B,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/svm/client.ts"],"names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