@dynamic-labs-wallet/node-svm 0.0.0-pr384.1 → 0.0.0-pr506.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.
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/client/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,SAAS,EAET,WAAW,EACX,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AAEzB,wBAAsB,UAAU,CAAC,EAC/B,OAAO,EACP,MAAuB,GACxB,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,mBAIA;AAED,wBAAsB,uBAAuB,CAAC,EAC5C,mBAAmB,EACnB,MAAM,EACN,EAAE,EACF,MAAwC,GACzC,EAAE;IACD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;;;GAwBA;AAED,eAAO,MAAM,yBAAyB,iDAInC;IACD,WAAW,EAAE,WAAW,GAAG,oBAAoB,CAAC;IAChD,SAAS,EAAE,UAAU,CAAC;IACtB,eAAe,EAAE,SAAS,CAAC;CAC5B,KAAG,oBAAoB,GAAG,WAG1B,CAAC;AAEF,wBAAsB,eAAe,CAAC,EACpC,iBAAiB,EACjB,MAAwC,GACzC,EAAE;IACD,iBAAiB,EAAE,UAAU,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,mBAMA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/client/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,SAAS,EAET,WAAW,EACX,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AAGzB,wBAAsB,UAAU,CAAC,EAC/B,OAAO,EACP,MAAuB,GACxB,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,mBAIA;AAED,wBAAsB,uBAAuB,CAAC,EAC5C,mBAAmB,EACnB,MAAM,EACN,EAAE,EACF,MAAwC,GACzC,EAAE;IACD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;;;GAwBA;AAED,eAAO,MAAM,yBAAyB,iDAInC;IACD,WAAW,EAAE,WAAW,GAAG,oBAAoB,CAAC;IAChD,SAAS,EAAE,UAAU,CAAC;IACtB,eAAe,EAAE,SAAS,CAAC;CAC5B,KAAG,oBAAoB,GAAG,WAG1B,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,eAAe,EACf,aAAa,GACd,EAAE;IACD,WAAW,EAAE,WAAW,GAAG,oBAAoB,CAAC;IAChD,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,oBAAoB,GAAG,WAAW,CAQrC;AAED,wBAAsB,eAAe,CAAC,EACpC,iBAAiB,EACjB,MAAwC,GACzC,EAAE;IACD,iBAAiB,EAAE,UAAU,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,mBAMA"}
@@ -0,0 +1,79 @@
1
+ import type { DelegatedWalletClient, ServerKeyShare } from '@dynamic-labs-wallet/node';
2
+ import type { Transaction } from '@solana/web3.js';
3
+ import { VersionedTransaction } from '@solana/web3.js';
4
+ export type DelegatedSvmClientConfig = {
5
+ environmentId: string;
6
+ baseApiUrl?: string;
7
+ baseMPCRelayApiUrl?: string;
8
+ apiKey: string;
9
+ debug?: boolean;
10
+ };
11
+ export type DelegatedSvmWalletClient = DelegatedWalletClient & {
12
+ readonly chainName: 'SVM';
13
+ };
14
+ /**
15
+ * Creates a delegated SVM wallet client for functional operations
16
+ */
17
+ export declare const createDelegatedSvmWalletClient: ({ environmentId, baseApiUrl, baseMPCRelayApiUrl, apiKey, debug, }: DelegatedSvmClientConfig) => DelegatedSvmWalletClient;
18
+ /**
19
+ * Signs a message using delegated signing for SVM
20
+ */
21
+ export declare const delegatedSignMessage: (client: DelegatedSvmWalletClient, { walletId, walletApiKey, keyShare, message, isFormatted, }: {
22
+ walletId: string;
23
+ walletApiKey: string;
24
+ keyShare: ServerKeyShare;
25
+ message: string;
26
+ isFormatted?: boolean;
27
+ }) => Promise<string>;
28
+ /**
29
+ * Signs a transaction using delegated signing for SVM
30
+ *
31
+ * @param client - The delegated SVM wallet client
32
+ * @param options - Signing options
33
+ * @param options.walletId - The wallet ID
34
+ * @param options.walletApiKey - The wallet API key
35
+ * @param options.keyShare - The server key share
36
+ * @param options.transaction - The transaction to sign (VersionedTransaction or Transaction)
37
+ * @param options.signerAddress - Optional. The address that should sign the transaction.
38
+ * If not provided, defaults to the first signer (VersionedTransaction)
39
+ * or fee payer (Transaction). Use this for gasless transactions where
40
+ * a separate fee payer pays the fees.
41
+ *
42
+ * @returns The partially signed transaction with the signature attached for the specified signer
43
+ *
44
+ * @example
45
+ * // Standard transaction where sender is also fee payer
46
+ * const signedTx = await delegatedSignTransaction(client, {
47
+ * walletId,
48
+ * walletApiKey,
49
+ * keyShare,
50
+ * transaction,
51
+ * });
52
+ *
53
+ * @example
54
+ * // Gasless transaction with separate fee payer
55
+ * const transaction = new Transaction();
56
+ * transaction.feePayer = feePayerPublicKey; // Set the actual fee payer
57
+ * transaction.add(instruction); // Instruction that requires sender signature
58
+ *
59
+ * const signedTx = await delegatedSignTransaction(client, {
60
+ * walletId,
61
+ * walletApiKey,
62
+ * keyShare,
63
+ * transaction,
64
+ * signerAddress: senderAddress, // Explicitly specify who signs
65
+ * });
66
+ *
67
+ */
68
+ export declare const delegatedSignTransaction: (client: DelegatedSvmWalletClient, { walletId, walletApiKey, keyShare, transaction, signerAddress, }: {
69
+ walletId: string;
70
+ walletApiKey: string;
71
+ keyShare: any;
72
+ transaction: VersionedTransaction | Transaction;
73
+ signerAddress?: string;
74
+ }) => Promise<VersionedTransaction | Transaction>;
75
+ /**
76
+ * Revoke delegation - delegates to the node package
77
+ */
78
+ export declare const revokeDelegation: (client: DelegatedSvmWalletClient, params: any) => Promise<void>;
79
+ //# sourceMappingURL=delegatedClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delegatedClient.d.ts","sourceRoot":"","sources":["../../packages/src/delegatedClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,cAAc,EACf,MAAM,2BAA2B,CAAC;AAMnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAa,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAKlE,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,qBAAqB,GAAG;IAC7D,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,8BAA8B,sEAMxC,wBAAwB,KAAG,wBAe7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,WACvB,wBAAwB,+DAO7B;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,KACA,OAAO,CAAC,MAAM,CAwBhB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,wBAAwB,WAC3B,wBAAwB,qEAO7B;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,GAAG,CAAC;IACd,WAAW,EAAE,oBAAoB,GAAG,WAAW,CAAC;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,KACA,OAAO,CAAC,oBAAoB,GAAG,WAAW,CAqE5C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,WACnB,wBAAwB,UACxB,GAAG,kBAGZ,CAAC"}
package/src/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './client/index.js';
2
+ export * from './delegatedClient.js';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Logger } from '@dynamic-labs/logger';
2
+ export declare const logger: Logger;
3
+ declare const logError: ({ message, error, context, }: {
4
+ message: string;
5
+ error: Error;
6
+ context: Record<string, unknown>;
7
+ }) => void;
8
+ export { Logger } from '@dynamic-labs/logger';
9
+ export { logError };
10
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/services/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAI9C,eAAO,MAAM,MAAM,QAAwC,CAAC;AAE5D,QAAA,MAAM,QAAQ,iCAIX;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,KAAG,IAQH,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,CAAC"}