@dynamic-labs-wallet/svm 0.0.353 → 0.1.0-request-signing

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/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/svm",
3
- "version": "0.0.353",
3
+ "version": "0.1.0-request-signing",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "@dynamic-labs-wallet/browser": "0.0.353",
8
- "@solana/web3.js": "^1.98.2",
7
+ "@dynamic-labs-wallet/browser": "0.1.0-request-signing",
8
+ "@dynamic-labs-wallet/core": "0.1.0-request-signing",
9
+ "@solana/web3.js": "1.99.0",
9
10
  "bs58": "^6.0.0",
10
- "@dynamic-labs/sdk-api-core": "^0.0.984"
11
+ "@dynamic-labs/sdk-api-core": "0.193.0"
11
12
  },
12
13
  "publishConfig": {
13
14
  "access": "public"
@@ -1,20 +1,19 @@
1
- import { DynamicWalletClient, type DynamicWalletClientInternalOptions, type DynamicWalletClientProps, 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, type SignAndBroadcastResponse, type ExportApprovalQuorumRequest, type ConfidentialAccountState, type ConfidentialTransferOperation } from '@dynamic-labs-wallet/browser';
3
2
  export declare class DynamicSvmWalletClient extends DynamicWalletClient {
4
3
  readonly chainName = "SVM";
5
- accountAddress?: string;
6
- constructor({ environmentId, authToken, backupServiceAuthToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode, sdkVersion, forwardMPCClient, logger, }: DynamicWalletClientProps, internalOptions?: DynamicWalletClientInternalOptions);
4
+ readonly accountAddress?: string;
7
5
  /**
8
6
  * Creates a wallet account on the Solana chain
9
7
  *
10
8
  * @param thresholdSignatureScheme The threshold signature scheme to use
11
9
  * @returns The account address, public key hex, raw public key, and client key shares
12
10
  */
13
- createWalletAccount({ thresholdSignatureScheme, password, signedSessionId, traceContext, }: {
11
+ createWalletAccount({ thresholdSignatureScheme, password, signedSessionId, traceContext, businessAccountId, }: {
14
12
  thresholdSignatureScheme: ThresholdSignatureScheme;
15
13
  password?: string;
16
14
  signedSessionId: string;
17
15
  traceContext?: TraceContext;
16
+ businessAccountId?: string;
18
17
  }): Promise<{
19
18
  accountAddress: string;
20
19
  rawPublicKey: Uint8Array | string;
@@ -29,29 +28,52 @@ 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
- password?: string;
36
- signedSessionId: string;
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
- context?: SignMessageContext;
51
- onError?: (error: Error) => void;
52
- traceContext?: TraceContext;
53
- }): Promise<string>;
39
+ } & BaseSignParams): Promise<string>;
40
+ /**
41
+ * Signs a Solana transaction for Dynamic to broadcast.
42
+ *
43
+ * @param params.senderAddress - The wallet's address.
44
+ * @param params.transaction - The transaction message as hex, the same bytes `signTransaction` signs.
45
+ * @param params.chainId - The Solana network id (e.g. `101`). Dynamic checks it against the wallet's network.
46
+ * @param params.skipPreflight - Skip the network's pre-send dry run. Faster, but a doomed transaction still costs a fee.
47
+ * @param params.requestedCertainty - How sure to be before calling it confirmed: `fast`, `safe` or `final`, or `chain:` plus a chain-specific value. Defaults to `safe`.
48
+ * @param params.externalReference - Your own label, returned on every event. Not unique.
49
+ * @param params.idempotencyKey - Makes a retry safe: the same key replays the stored answer instead of sending twice. A new one is made when omitted.
50
+ * @param params.password - The wallet's backup password, if it has one.
51
+ * @param params.signedSessionId - The signed-in session, used to unlock the wallet's key share.
52
+ * @param params.mfaToken - Proof of the user's multi-factor check, when the wallet needs one.
53
+ * @param params.elevatedAccessToken - Proof of a recent re-login, when the wallet needs one.
54
+ * @param params.approvalQuorum - Approvers' consent for a governed wallet, sent on the retry after `intent_required`.
55
+ * @param params.onError - Called with the failure's message, never the raw error.
56
+ * @param params.traceContext - Ties this call's logs to the server's, across retries. Created when omitted.
57
+ * @returns The transaction record.
58
+ * @throws Error when `chainId` is missing.
59
+ */
60
+ signAndBroadcastTransaction({ senderAddress, transaction, chainId, skipPreflight, password, signedSessionId, mfaToken, elevatedAccessToken, approvalQuorum, requestedCertainty, externalReference, idempotencyKey, onError, traceContext, }: {
61
+ senderAddress: string;
62
+ transaction: string;
63
+ chainId: string;
64
+ skipPreflight?: boolean;
65
+ requestedCertainty?: string;
66
+ externalReference?: string;
67
+ idempotencyKey?: string;
68
+ } & Pick<BaseSignParams, 'password' | 'signedSessionId' | 'mfaToken' | 'elevatedAccessToken' | 'approvalQuorum' | 'onError' | 'traceContext'>): Promise<SignAndBroadcastResponse>;
54
69
  private prepareTransactionForSigning;
70
+ /**
71
+ * The Solana part of a signing context: which network, how it is sent, and the transaction in base58. Shared by sign and sign-and-broadcast so both describe it the same way.
72
+ *
73
+ * @param params.chainId - The Solana network id.
74
+ * @param params.base58SerializedTransaction - The transaction, base58-encoded.
75
+ */
76
+ private buildSvmTransactionContext;
55
77
  private buildSignParams;
56
78
  /**
57
79
  * Exports the private key for a given account address
@@ -60,11 +82,15 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
60
82
  * @param password The password for encrypted backup shares
61
83
  * @returns The private key
62
84
  */
63
- exportPrivateKey({ accountAddress, password, signedSessionId, mfaToken, elevatedAccessToken, }: RequestWithElevatedAccessToken<{
85
+ exportPrivateKey({ accountAddress, password, signedSessionId, mfaToken, elevatedAccessToken, approvalQuorum, proposalId, }: RequestWithElevatedAccessToken<{
64
86
  accountAddress: string;
65
87
  password?: string;
66
88
  signedSessionId: string;
67
89
  mfaToken?: string;
90
+ /** The initiator's signed export Intent, from `prepareExportIntent`. */
91
+ approvalQuorum?: ExportApprovalQuorumRequest;
92
+ /** The approved export proposal being redeemed, from the consent error the export call raised. */
93
+ proposalId?: string;
68
94
  }>): Promise<string>;
69
95
  /**
70
96
  * Exports the private key for a given account address
@@ -85,7 +111,9 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
85
111
  * @returns The hex string
86
112
  */
87
113
  decodePrivateKeyForSolana(privateKey: string): string;
88
- getPublicKeyFromPrivateKey(privateKey: string): string;
114
+ getPublicKeyFromPrivateKey(privateKey: string, opts?: {
115
+ isRawScalar?: boolean;
116
+ }): string;
89
117
  encodePublicKey(publicKey: Uint8Array): string;
90
118
  /**
91
119
  * Imports the private key for a given account address
@@ -96,7 +124,7 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
96
124
  * @param password The password for encrypted backup shares
97
125
  * @returns The account address, raw public key, and client key shares
98
126
  */
99
- importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password, onError, signedSessionId, publicAddressCheck, legacyWalletId, }: {
127
+ importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password, onError, signedSessionId, publicAddressCheck, legacyWalletId, isRawScalarImport, }: {
100
128
  privateKey: string;
101
129
  chainName: string;
102
130
  thresholdSignatureScheme: ThresholdSignatureScheme;
@@ -106,10 +134,92 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
106
134
  publicAddressCheck?: string;
107
135
  /** ID of the legacy embedded wallet being upgraded to v3 */
108
136
  legacyWalletId?: string;
137
+ /**
138
+ * When true, `privateKey` is a raw 32-byte ed25519 signing scalar (hex),
139
+ * e.g. one exported from an external MPC system (Fireblocks Embedded
140
+ * Wallets), rather than a bs58-encoded Solana secret key / seed. Routes the
141
+ * import through the non-exportable `Ed25519` protocol.
142
+ */
143
+ isRawScalarImport?: boolean;
109
144
  }): Promise<{
110
145
  accountAddress: string;
111
146
  rawPublicKey: Uint8Array | undefined;
112
147
  }>;
148
+ private readonly svmRpcCall;
149
+ private readonly svmAccountState;
150
+ private readonly confidentialBlockhash;
151
+ private readonly broadcastConfidentialTransactions;
152
+ private readonly waitForConfidentialConfirmation;
153
+ /**
154
+ * Generates a Token-2022 confidential-transfer seed inside the enclave and
155
+ * stores the sealed result in CKS. Returns the ElGamal public key.
156
+ */
157
+ createConfidentialSeed({ walletId, solanaAddress, derivationVersion, traceContext, }: {
158
+ walletId: string;
159
+ solanaAddress: string;
160
+ derivationVersion?: number;
161
+ traceContext?: TraceContext;
162
+ }): Promise<import("@dynamic-labs-wallet/browser").CreateConfidentialSeedResponse>;
163
+ /**
164
+ * Builds and signs a Token-2022 confidential-transfer transaction.
165
+ *
166
+ * The enclave is offline, so missing account states and the latest
167
+ * blockhash are fetched from `rpcUrl`. The enclave builds one unsigned v1
168
+ * transaction bound by a `transactionsTag`; `signConfidentialTransactions`
169
+ * provisions one MPC room for the operation and the client share joins it.
170
+ * Pass `broadcast: true` to submit the signed transaction to the cluster.
171
+ */
172
+ signConfidentialTransfer({ walletId, operation, solanaAddress, mint, tokenAccount, destinationTokenAccount, amount, decimals, accountState, destinationAccountState, auditorElgamalPubkey, feePayer, derivationVersion, chainId, lamportsPerByte, recentBlockhash, lastValidBlockHeight, rpcUrl, broadcast, broadcastOptions, password, signedSessionId, mfaToken, elevatedAccessToken, traceContext, }: {
173
+ walletId: string;
174
+ operation: ConfidentialTransferOperation;
175
+ solanaAddress: string;
176
+ mint: string;
177
+ tokenAccount: string;
178
+ destinationTokenAccount?: string;
179
+ amount?: string;
180
+ decimals?: number;
181
+ accountState?: ConfidentialAccountState;
182
+ destinationAccountState?: ConfidentialAccountState;
183
+ auditorElgamalPubkey?: string;
184
+ feePayer?: string;
185
+ derivationVersion?: number;
186
+ chainId?: string;
187
+ lamportsPerByte?: string;
188
+ /** Fetched from `rpcUrl` when omitted. */
189
+ recentBlockhash?: string;
190
+ lastValidBlockHeight?: string;
191
+ /** Solana JSON-RPC endpoint, required to fetch account state / blockhash or to broadcast. */
192
+ rpcUrl?: string;
193
+ broadcast?: boolean;
194
+ broadcastOptions?: {
195
+ skipPreflight?: boolean;
196
+ preflightCommitment?: string;
197
+ };
198
+ password?: string;
199
+ signedSessionId: string;
200
+ mfaToken?: string;
201
+ elevatedAccessToken?: string;
202
+ traceContext?: TraceContext;
203
+ }): Promise<{
204
+ serializedTransactions: string[];
205
+ signatures: string[];
206
+ transactionIds: string[] | undefined;
207
+ }>;
208
+ /**
209
+ * Returns the available and pending Token-2022 confidential balances for a
210
+ * token account. When `accountState` is omitted it is fetched from `rpcUrl`.
211
+ */
212
+ getConfidentialBalance({ walletId, solanaAddress, tokenAccount, mint, accountState, rpcUrl, derivationVersion, traceContext, }: {
213
+ walletId: string;
214
+ solanaAddress: string;
215
+ tokenAccount: string;
216
+ mint: string;
217
+ /** Fetched from `rpcUrl` when omitted. */
218
+ accountState?: ConfidentialAccountState;
219
+ rpcUrl?: string;
220
+ derivationVersion?: number;
221
+ traceContext?: TraceContext;
222
+ }): Promise<import("@dynamic-labs-wallet/browser").SvmConfidentialBalanceResponse>;
113
223
  getSvmWallets(): Promise<any>;
114
224
  }
115
225
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","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C;QAClB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,YAAY,CAAC,EAAE,YAAY,CAAC;KAC7B;;;;;IA6GD;;;OAGG;IACG,sBAAsB,CAAC,EAC3B,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,iBAAiB,EACjB,YAAY,GACb,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,YAAY,EAAE,MAAM,CAAC;QACrB,IAAI,EAAE,MAAM,CAAC;QACb,0CAA0C;QAC1C,YAAY,CAAC,EAAE,wBAAwB,CAAC;QACxC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,YAAY,CAAC,EAAE,YAAY,CAAC;KAC7B;IAcK,aAAa;CAKpB"}
@@ -0,0 +1,27 @@
1
+ import type { ConfidentialTransferOperation } from '@dynamic-labs-wallet/browser';
2
+ /** Message bytes an MPC signer signs: a v1 wire is message || 64B signature slots. */
3
+ export declare const confidentialSignedMessageBytes: (wire: Uint8Array, numRequiredSignatures: number) => Uint8Array;
4
+ /** Insert the wallet signature into the sole v1 signature slot (signer index 0). */
5
+ export declare const injectConfidentialSignature: (wire: Uint8Array, signature: Uint8Array) => Uint8Array;
6
+ type ConfidentialCheckParams = {
7
+ serializedTransactions: string[];
8
+ solanaAddress: string;
9
+ operation: ConfidentialTransferOperation;
10
+ mint: string;
11
+ tokenAccount: string;
12
+ destinationTokenAccount?: string;
13
+ amount?: string;
14
+ decimals?: number;
15
+ };
16
+ /**
17
+ * Structural check on the enclave-built confidential transaction before the
18
+ * client share joins the MPC room: must be one v1 message, the wallet must be
19
+ * fee payer and only signer, only expected programs and instruction kinds may
20
+ * appear, and the confidential instruction must match the requested
21
+ * operation, mint, token accounts and amounts. The enclave's
22
+ * `transactionsTag` binds the build; this only guards against a bad build
23
+ * reaching the ceremony.
24
+ */
25
+ export declare const checkConfidentialTransactions: (params: ConfidentialCheckParams) => void;
26
+ export {};
27
+ //# sourceMappingURL=confidentialCheck.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confidentialCheck.d.ts","sourceRoot":"","sources":["../../src/svm/confidentialCheck.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAiClF,sFAAsF;AACtF,eAAO,MAAM,8BAA8B,SAAU,UAAU,yBAAyB,MAAM,KAAG,UACjB,CAAC;AAEjF,oFAAoF;AACpF,eAAO,MAAM,2BAA2B,SAAU,UAAU,aAAa,UAAU,KAAG,UACM,CAAC;AAE7F,KAAK,uBAAuB,GAAG;IAC7B,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,6BAA6B,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAoEF;;;;;;;;GAQG;AACH,eAAO,MAAM,6BAA6B,WAAY,uBAAuB,KAAG,IA4B/E,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './client.js';
2
+ export { prepareSvmTransactionSigningOperation, resumeSvmTransactionSigningIntent } from './signingIntent.js';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/svm/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/svm/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,qCAAqC,EAAE,iCAAiC,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { PreparedSvmTransactionSigningIntent, SigningIntent } from '@dynamic-labs-wallet/core';
2
+ export declare const prepareSvmTransactionSigningOperation: ({ transaction, accountAddress, chainId, }: {
3
+ transaction: string;
4
+ accountAddress: string;
5
+ chainId: string | undefined;
6
+ }) => PreparedSvmTransactionSigningIntent;
7
+ /**
8
+ * Reconstructs the unsigned serialized message (hex) from an approved intent.
9
+ * The signed intent carries no blockhash, so the caller supplies one. Passing the
10
+ * blockhash of the original message is fine while it is still valid.
11
+ */
12
+ export declare const resumeSvmTransactionSigningIntent: ({ intent, lifetimeValue, }: {
13
+ intent: SigningIntent;
14
+ lifetimeValue: string | undefined;
15
+ }) => string;
16
+ //# sourceMappingURL=signingIntent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signingIntent.d.ts","sourceRoot":"","sources":["../../src/svm/signingIntent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mCAAmC,EACnC,aAAa,EAEd,MAAM,2BAA2B,CAAC;AA2FnC,eAAO,MAAM,qCAAqC,8CAI/C;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,KAAG,mCAWH,CAAC;AA0FF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,+BAG3C;IACD,MAAM,EAAE,aAAa,CAAC;IACtB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC,KAAG,MAMH,CAAC"}