@dynamic-labs-sdk/aptos 1.17.1 → 1.19.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/addAptosExtension/addAptosExtension.d.ts +10 -1
- package/dist/addAptosExtension/addAptosExtension.d.ts.map +1 -1
- package/dist/{addAptosWalletStandardExtension-BeX9GJpF.cjs → addAptosWalletStandardExtension-CJmRqCMM.cjs} +33 -4
- package/dist/addAptosWalletStandardExtension-CJmRqCMM.cjs.map +1 -0
- package/dist/{addAptosWalletStandardExtension-jiIkABI0.esm.js → addAptosWalletStandardExtension-Drme8SEO.esm.js} +33 -4
- package/dist/addAptosWalletStandardExtension-Drme8SEO.esm.js.map +1 -0
- package/dist/getAptosClient/getAptosClient.d.ts +10 -4
- package/dist/getAptosClient/getAptosClient.d.ts.map +1 -1
- package/dist/index.cjs +67 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +67 -16
- package/dist/index.esm.js.map +1 -1
- package/dist/isAptosNetworkProvider/isAptosNetworkProvider.d.ts +16 -1
- package/dist/isAptosNetworkProvider/isAptosNetworkProvider.d.ts.map +1 -1
- package/dist/isAptosWalletAccount/isAptosWalletAccount.d.ts +15 -1
- package/dist/isAptosWalletAccount/isAptosWalletAccount.d.ts.map +1 -1
- package/dist/isAptosWalletProvider/isAptosWalletProvider.d.ts +16 -1
- package/dist/isAptosWalletProvider/isAptosWalletProvider.d.ts.map +1 -1
- package/dist/signAndSubmitTransaction/signAndSubmitTransaction.d.ts +16 -6
- package/dist/signAndSubmitTransaction/signAndSubmitTransaction.d.ts.map +1 -1
- package/dist/signTransaction/signTransaction.d.ts +18 -7
- package/dist/signTransaction/signTransaction.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/walletStandard.cjs +1 -1
- package/dist/walletStandard.esm.js +1 -1
- package/package.json +4 -4
- package/dist/addAptosWalletStandardExtension-BeX9GJpF.cjs.map +0 -1
- package/dist/addAptosWalletStandardExtension-jiIkABI0.esm.js.map +0 -1
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","names":["getDefaultClient","getDefaultClient","packageName","packageVersion"],"sources":["../src/addAptosExtension/addAptosExtension.ts","../src/getAptosClient/getAptosClient.ts","../src/isAptosNetworkProvider/isAptosNetworkProvider.ts","../src/signAndSubmitTransaction/signAndSubmitTransaction.ts","../src/signTransaction/signTransaction.ts","../src/exports/index.ts"],"sourcesContent":["import { getDefaultClient } from '@dynamic-labs-sdk/client/core';\n\nimport { addAptosWalletStandardExtension } from '../walletStandard/addAptosWalletStandardExtension';\n\n/**\n * Adds the Aptos extension to the Dynamic client.\n *\n * This is a convenience function that adds support for all of Aptos wallets that support the Aptos Wallet Standard,\n * like Petra, Backpack, OKX, Nightly, and more.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n
|
|
1
|
+
{"version":3,"file":"index.esm.js","names":["getDefaultClient","getDefaultClient","packageName","packageVersion"],"sources":["../src/addAptosExtension/addAptosExtension.ts","../src/getAptosClient/getAptosClient.ts","../src/isAptosNetworkProvider/isAptosNetworkProvider.ts","../src/signAndSubmitTransaction/signAndSubmitTransaction.ts","../src/signTransaction/signTransaction.ts","../src/exports/index.ts"],"sourcesContent":["import { getDefaultClient } from '@dynamic-labs-sdk/client/core';\n\nimport { addAptosWalletStandardExtension } from '../walletStandard/addAptosWalletStandardExtension';\n\n/**\n * Adds the Aptos extension to the Dynamic client.\n *\n * This is a convenience function that adds support for all of Aptos wallets that support the Aptos Wallet Standard,\n * like Petra, Backpack, OKX, Nightly, and more.\n *\n * @example\n * ```ts\n * const client = createDynamicClient({ environmentId: 'env-123' });\n * addAptosExtension(client);\n * ```\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns void\n * @see isAptosWalletAccount\n * @see isAptosNetworkProvider\n * @notInstrumented\n */\nexport const addAptosExtension = (client = getDefaultClient()): void => {\n addAptosWalletStandardExtension(client);\n};\n","import {\n getDefaultClient,\n getWalletProviderFromWalletAccount,\n} from '@dynamic-labs-sdk/client/core';\n\nimport type { AptosWalletAccount } from '../AptosWalletAccount.types';\nimport type { AptosClient } from '../AptosWalletProvider.types';\nimport { NotAptosProviderError } from '../errors/NotAptosProviderError';\nimport { isAptosWalletProvider } from '../isAptosWalletProvider';\n\ntype GetAptosClientParams = {\n walletAccount: AptosWalletAccount;\n};\n\n/**\n * Retrieves an Aptos client from a wallet account.\n *\n * @example\n * ```ts\n * const aptosClient = await getAptosClient({ walletAccount: aptosAccount });\n * ```\n *\n * @param params.walletAccount - The wallet account to get the Aptos client for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to an AptosClient instance.\n * @throws {NotAptosProviderError} If the wallet account's provider is not an APTOS provider.\n * @see signAndSubmitTransaction\n * @see isAptosWalletAccount\n * @notInstrumented\n */\nexport const getAptosClient = async (\n { walletAccount }: GetAptosClientParams,\n client = getDefaultClient()\n): Promise<AptosClient> => {\n const provider = getWalletProviderFromWalletAccount(\n {\n walletAccount,\n },\n client\n );\n\n if (!isAptosWalletProvider(provider)) {\n throw new NotAptosProviderError({ providerKey: provider.key });\n }\n\n return provider.getAptosClient({ walletAccount });\n};\n","import type { NetworkProvider } from '@dynamic-labs-sdk/client';\n\nimport type { AptosNetworkProvider } from '../AptosNetworkProvider.types';\n\n/**\n * Type guard function to check if a network provider is an Aptos network provider.\n *\n * @example\n * ```ts\n * if (isAptosNetworkProvider(networkProvider)) {\n * const aptosClient = networkProvider.getAptosClient();\n * }\n * ```\n *\n * @param networkProvider - The network provider to check.\n * @returns True if the network provider is an Aptos network provider, false otherwise.\n * @see isAptosWalletAccount\n * @see addAptosExtension\n * @notInstrumented\n */\nexport const isAptosNetworkProvider = (\n networkProvider: NetworkProvider\n): networkProvider is AptosNetworkProvider => networkProvider.chain === 'APTOS';\n","import { getDefaultClient } from '@dynamic-labs-sdk/client';\nimport { getWalletProviderFromWalletAccount } from '@dynamic-labs-sdk/client/core';\n\nimport type { AptosWalletAccount } from '../AptosWalletAccount.types';\nimport type { AptosTransactionPayload } from '../AptosWalletProvider.types';\nimport { NotAptosProviderError } from '../errors/NotAptosProviderError';\nimport { isAptosWalletProvider } from '../isAptosWalletProvider';\n\ntype SignAndSubmitTransactionParams = {\n transaction: AptosTransactionPayload;\n walletAccount: AptosWalletAccount;\n};\n\n/**\n * Signs and submits an Aptos transaction.\n *\n * @example\n * ```ts\n * const { hash } = await signAndSubmitTransaction({\n * walletAccount: aptosAccount,\n * transaction: { function: '0x1::coin::transfer', arguments: ['0x...', 1000] },\n * });\n * ```\n *\n * @param params.transaction - The transaction payload to sign and submit.\n * @param params.walletAccount - The wallet account to sign the transaction with.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns An object containing the transaction hash.\n * @throws {NotAptosProviderError} If the wallet account's provider is not an APTOS provider.\n * @see signTransaction\n * @see getAptosClient\n * @notInstrumented\n */\nexport const signAndSubmitTransaction = async (\n { transaction, walletAccount }: SignAndSubmitTransactionParams,\n client = getDefaultClient()\n): Promise<{ hash: string }> => {\n const provider = getWalletProviderFromWalletAccount(\n {\n walletAccount,\n },\n client\n );\n\n if (!isAptosWalletProvider(provider)) {\n throw new NotAptosProviderError({ providerKey: provider.key });\n }\n\n return provider.signAndSubmitTransaction({ transaction, walletAccount });\n};\n","import type { AnyRawTransaction } from '@aptos-labs/ts-sdk';\nimport { getDefaultClient } from '@dynamic-labs-sdk/client';\nimport { getWalletProviderFromWalletAccount } from '@dynamic-labs-sdk/client/core';\n\nimport type { AptosWalletAccount } from '../AptosWalletAccount.types';\nimport type { AptosSignTransactionOutput } from '../AptosWalletProvider.types';\nimport { NotAptosProviderError } from '../errors/NotAptosProviderError';\nimport { isAptosWalletProvider } from '../isAptosWalletProvider';\n\ntype SignTransactionParams = {\n asFeePayer?: boolean;\n transaction: AnyRawTransaction;\n walletAccount: AptosWalletAccount;\n};\n\n/**\n * Signs an Aptos transaction without submitting it.\n *\n * @example\n * ```ts\n * const { signature } = await signTransaction({\n * walletAccount: aptosAccount,\n * transaction: aptosTransaction,\n * });\n * ```\n *\n * @param params.transaction - The transaction to sign.\n * @param params.walletAccount - The wallet account to sign the transaction with.\n * @param [params.asFeePayer] - Whether to sign as the fee payer.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns An object containing the signature output.\n * @throws {NotAptosProviderError} If the wallet account's provider is not an APTOS provider.\n * @see signAndSubmitTransaction\n * @see getAptosClient\n * @notInstrumented\n */\nexport const signTransaction = async (\n { asFeePayer, transaction, walletAccount }: SignTransactionParams,\n client = getDefaultClient()\n): Promise<{ signature: AptosSignTransactionOutput }> => {\n const provider = getWalletProviderFromWalletAccount(\n {\n walletAccount,\n },\n client\n );\n\n if (!isAptosWalletProvider(provider)) {\n throw new NotAptosProviderError({ providerKey: provider.key });\n }\n\n return provider.signTransaction({ asFeePayer, transaction, walletAccount });\n};\n","import { assertPackageVersion } from '@dynamic-labs-sdk/assert-package-version';\n\nimport {\n name as packageName,\n version as packageVersion,\n} from '../../package.json';\nassertPackageVersion(packageName, packageVersion);\n\nexport { addAptosExtension } from '../addAptosExtension';\nexport type { AptosNetworkProvider } from '../AptosNetworkProvider.types';\nexport type { AptosWalletAccount } from '../AptosWalletAccount.types';\nexport type {\n AptosClient,\n AptosSignTransactionOutput,\n AptosTransaction,\n AptosTransactionPayload,\n} from '../AptosWalletProvider.types';\nexport { NotAptosProviderError } from '../errors/NotAptosProviderError';\nexport { getAptosClient } from '../getAptosClient';\nexport { isAptosNetworkProvider } from '../isAptosNetworkProvider';\nexport { isAptosWalletAccount } from '../isAptosWalletAccount';\nexport { isAptosWalletProvider } from '../isAptosWalletProvider';\nexport { signAndSubmitTransaction } from '../signAndSubmitTransaction';\nexport { signTransaction } from '../signTransaction';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAa,qBAAqB,SAAS,kBAAkB,KAAW;AACtE,iCAAgC,OAAO;;;;;;;;;;;;;;;;;;;;;ACOzC,MAAa,iBAAiB,OAC5B,EAAE,iBACF,SAAS,kBAAkB,KACF;CACzB,MAAM,WAAW,mCACf,EACE,eACD,EACD,OACD;AAED,KAAI,CAAC,sBAAsB,SAAS,CAClC,OAAM,IAAI,sBAAsB,EAAE,aAAa,SAAS,KAAK,CAAC;AAGhE,QAAO,SAAS,eAAe,EAAE,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;ACzBnD,MAAa,0BACX,oBAC4C,gBAAgB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;ACWxE,MAAa,2BAA2B,OACtC,EAAE,aAAa,iBACf,SAASA,oBAAkB,KACG;CAC9B,MAAM,WAAW,mCACf,EACE,eACD,EACD,OACD;AAED,KAAI,CAAC,sBAAsB,SAAS,CAClC,OAAM,IAAI,sBAAsB,EAAE,aAAa,SAAS,KAAK,CAAC;AAGhE,QAAO,SAAS,yBAAyB;EAAE;EAAa;EAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;ACZ1E,MAAa,kBAAkB,OAC7B,EAAE,YAAY,aAAa,iBAC3B,SAASC,oBAAkB,KAC4B;CACvD,MAAM,WAAW,mCACf,EACE,eACD,EACD,OACD;AAED,KAAI,CAAC,sBAAsB,SAAS,CAClC,OAAM,IAAI,sBAAsB,EAAE,aAAa,SAAS,KAAK,CAAC;AAGhE,QAAO,SAAS,gBAAgB;EAAE;EAAY;EAAa;EAAe,CAAC;;;;;AC7C7E,qBAAqBC,MAAaC,QAAe"}
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import type { NetworkProvider } from '@dynamic-labs-sdk/client';
|
|
2
2
|
import type { AptosNetworkProvider } from '../AptosNetworkProvider.types';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Type guard function to check if a network provider is an Aptos network provider.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* if (isAptosNetworkProvider(networkProvider)) {
|
|
9
|
+
* const aptosClient = networkProvider.getAptosClient();
|
|
10
|
+
* }
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @param networkProvider - The network provider to check.
|
|
14
|
+
* @returns True if the network provider is an Aptos network provider, false otherwise.
|
|
15
|
+
* @see isAptosWalletAccount
|
|
16
|
+
* @see addAptosExtension
|
|
17
|
+
* @notInstrumented
|
|
18
|
+
*/
|
|
4
19
|
export declare const isAptosNetworkProvider: (networkProvider: NetworkProvider) => networkProvider is AptosNetworkProvider;
|
|
5
20
|
//# sourceMappingURL=isAptosNetworkProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isAptosNetworkProvider.d.ts","sourceRoot":"","sources":["../../src/isAptosNetworkProvider/isAptosNetworkProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E
|
|
1
|
+
{"version":3,"file":"isAptosNetworkProvider.d.ts","sourceRoot":"","sources":["../../src/isAptosNetworkProvider/isAptosNetworkProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,oBAChB,eAAe,KAC/B,eAAe,IAAI,oBAAyD,CAAC"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import type { WalletAccount } from '@dynamic-labs-sdk/client';
|
|
2
2
|
import type { AptosWalletAccount } from '../AptosWalletAccount.types';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Type guard function to check if a wallet account is an Aptos wallet account.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* const accounts = getWalletAccounts();
|
|
9
|
+
* const aptosAccounts = accounts.filter(isAptosWalletAccount);
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @param walletAccount - The wallet account to check.
|
|
13
|
+
* @returns True if the wallet account is an Aptos wallet account, false otherwise.
|
|
14
|
+
* @see isAptosNetworkProvider
|
|
15
|
+
* @see addAptosExtension
|
|
16
|
+
* @notInstrumented
|
|
17
|
+
*/
|
|
4
18
|
export declare const isAptosWalletAccount: (walletAccount: WalletAccount) => walletAccount is AptosWalletAccount;
|
|
5
19
|
//# sourceMappingURL=isAptosWalletAccount.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isAptosWalletAccount.d.ts","sourceRoot":"","sources":["../../src/isAptosWalletAccount/isAptosWalletAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE
|
|
1
|
+
{"version":3,"file":"isAptosWalletAccount.d.ts","sourceRoot":"","sources":["../../src/isAptosWalletAccount/isAptosWalletAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,kBAChB,aAAa,KAC3B,aAAa,IAAI,kBAAqD,CAAC"}
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import type { WalletProvider } from '@dynamic-labs-sdk/client/core';
|
|
2
2
|
import type { AptosWalletProvider } from '../AptosWalletProvider.types';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Type guard function to check if a wallet provider is an Aptos wallet provider.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* if (isAptosWalletProvider(provider)) {
|
|
9
|
+
* const aptosClient = await provider.getAptosClient();
|
|
10
|
+
* }
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @param provider - The wallet provider to check.
|
|
14
|
+
* @returns True if the wallet provider is an Aptos wallet provider, false otherwise.
|
|
15
|
+
* @see isAptosWalletAccount
|
|
16
|
+
* @see addAptosExtension
|
|
17
|
+
* @notInstrumented
|
|
18
|
+
*/
|
|
4
19
|
export declare const isAptosWalletProvider: (provider: WalletProvider | AptosWalletProvider) => provider is AptosWalletProvider;
|
|
5
20
|
//# sourceMappingURL=isAptosWalletProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isAptosWalletProvider.d.ts","sourceRoot":"","sources":["../../src/isAptosWalletProvider/isAptosWalletProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE
|
|
1
|
+
{"version":3,"file":"isAptosWalletProvider.d.ts","sourceRoot":"","sources":["../../src/isAptosWalletProvider/isAptosWalletProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,qBAAqB,aACtB,cAAc,GAAG,mBAAmB,KAC7C,QAAQ,IAAI,mBAEd,CAAC"}
|
|
@@ -5,14 +5,24 @@ type SignAndSubmitTransactionParams = {
|
|
|
5
5
|
walletAccount: AptosWalletAccount;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
* Signs and submits an Aptos transaction
|
|
8
|
+
* Signs and submits an Aptos transaction.
|
|
9
9
|
*
|
|
10
|
-
* @
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const { hash } = await signAndSubmitTransaction({
|
|
13
|
+
* walletAccount: aptosAccount,
|
|
14
|
+
* transaction: { function: '0x1::coin::transfer', arguments: ['0x...', 1000] },
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
13
17
|
*
|
|
14
|
-
* @
|
|
15
|
-
|
|
18
|
+
* @param params.transaction - The transaction payload to sign and submit.
|
|
19
|
+
* @param params.walletAccount - The wallet account to sign the transaction with.
|
|
20
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
21
|
+
* @returns An object containing the transaction hash.
|
|
22
|
+
* @throws {NotAptosProviderError} If the wallet account's provider is not an APTOS provider.
|
|
23
|
+
* @see signTransaction
|
|
24
|
+
* @see getAptosClient
|
|
25
|
+
* @notInstrumented
|
|
16
26
|
*/
|
|
17
27
|
export declare const signAndSubmitTransaction: ({ transaction, walletAccount }: SignAndSubmitTransactionParams, client?: import("@dynamic-labs-sdk/client").DynamicClient) => Promise<{
|
|
18
28
|
hash: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signAndSubmitTransaction.d.ts","sourceRoot":"","sources":["../../src/signAndSubmitTransaction/signAndSubmitTransaction.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAI5E,KAAK,8BAA8B,GAAG;IACpC,WAAW,EAAE,uBAAuB,CAAC;IACrC,aAAa,EAAE,kBAAkB,CAAC;CACnC,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"signAndSubmitTransaction.d.ts","sourceRoot":"","sources":["../../src/signAndSubmitTransaction/signAndSubmitTransaction.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAI5E,KAAK,8BAA8B,GAAG;IACpC,WAAW,EAAE,uBAAuB,CAAC;IACrC,aAAa,EAAE,kBAAkB,CAAC;CACnC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,wBAAwB,mCACH,8BAA8B,gEAE7D,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAa1B,CAAC"}
|
|
@@ -7,14 +7,25 @@ type SignTransactionParams = {
|
|
|
7
7
|
walletAccount: AptosWalletAccount;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* Signs an Aptos transaction
|
|
11
|
-
*
|
|
12
|
-
* @
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* Signs an Aptos transaction without submitting it.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const { signature } = await signTransaction({
|
|
15
|
+
* walletAccount: aptosAccount,
|
|
16
|
+
* transaction: aptosTransaction,
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
15
19
|
*
|
|
16
|
-
* @
|
|
17
|
-
|
|
20
|
+
* @param params.transaction - The transaction to sign.
|
|
21
|
+
* @param params.walletAccount - The wallet account to sign the transaction with.
|
|
22
|
+
* @param [params.asFeePayer] - Whether to sign as the fee payer.
|
|
23
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
24
|
+
* @returns An object containing the signature output.
|
|
25
|
+
* @throws {NotAptosProviderError} If the wallet account's provider is not an APTOS provider.
|
|
26
|
+
* @see signAndSubmitTransaction
|
|
27
|
+
* @see getAptosClient
|
|
28
|
+
* @notInstrumented
|
|
18
29
|
*/
|
|
19
30
|
export declare const signTransaction: ({ asFeePayer, transaction, walletAccount }: SignTransactionParams, client?: import("@dynamic-labs-sdk/client").DynamicClient) => Promise<{
|
|
20
31
|
signature: AptosSignTransactionOutput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signTransaction.d.ts","sourceRoot":"","sources":["../../src/signTransaction/signTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAI5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAI/E,KAAK,qBAAqB,GAAG;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,aAAa,EAAE,kBAAkB,CAAC;CACnC,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"signTransaction.d.ts","sourceRoot":"","sources":["../../src/signTransaction/signTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAI5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAI/E,KAAK,qBAAqB,GAAG;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,aAAa,EAAE,kBAAkB,CAAC;CACnC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,eAAe,+CACkB,qBAAqB,gEAEhE,OAAO,CAAC;IAAE,SAAS,EAAE,0BAA0B,CAAA;CAAE,CAanD,CAAC"}
|