@x402/aptos 2.3.0 → 2.5.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/package.json +16 -16
- package/dist/cjs/signer-DfwN1I5I.d.ts +0 -59
package/package.json
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x402/aptos",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"main": "./dist/cjs/index.js",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"types": "./dist/cjs/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"start": "tsx --env-file=.env index.ts",
|
|
9
|
-
"build": "tsup",
|
|
10
|
-
"test": "vitest run",
|
|
11
|
-
"test:integration": "vitest run --config vitest.integration.config.ts",
|
|
12
|
-
"test:watch": "vitest",
|
|
13
|
-
"watch": "tsc --watch",
|
|
14
|
-
"format": "prettier -c .prettierrc --write \"**/*.{ts,js,cjs,json,md}\"",
|
|
15
|
-
"format:check": "prettier -c .prettierrc --check \"**/*.{ts,js,cjs,json,md}\"",
|
|
16
|
-
"lint": "eslint . --ext .ts --fix",
|
|
17
|
-
"lint:check": "eslint . --ext .ts"
|
|
18
|
-
},
|
|
19
7
|
"keywords": [
|
|
20
8
|
"x402",
|
|
21
9
|
"payment",
|
|
@@ -44,8 +32,8 @@
|
|
|
44
32
|
"vitest": "^3.0.5"
|
|
45
33
|
},
|
|
46
34
|
"dependencies": {
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
35
|
+
"@aptos-labs/ts-sdk": "^5.2.1",
|
|
36
|
+
"@x402/core": "2.5.0"
|
|
49
37
|
},
|
|
50
38
|
"exports": {
|
|
51
39
|
".": {
|
|
@@ -91,5 +79,17 @@
|
|
|
91
79
|
},
|
|
92
80
|
"files": [
|
|
93
81
|
"dist"
|
|
94
|
-
]
|
|
82
|
+
],
|
|
83
|
+
"scripts": {
|
|
84
|
+
"start": "tsx --env-file=.env index.ts",
|
|
85
|
+
"build": "tsup",
|
|
86
|
+
"test": "vitest run",
|
|
87
|
+
"test:integration": "vitest run --config vitest.integration.config.ts",
|
|
88
|
+
"test:watch": "vitest",
|
|
89
|
+
"watch": "tsc --watch",
|
|
90
|
+
"format": "prettier -c .prettierrc --write \"**/*.{ts,js,cjs,json,md}\"",
|
|
91
|
+
"format:check": "prettier -c .prettierrc --check \"**/*.{ts,js,cjs,json,md}\"",
|
|
92
|
+
"lint": "eslint . --ext .ts --fix",
|
|
93
|
+
"lint:check": "eslint . --ext .ts"
|
|
94
|
+
}
|
|
95
95
|
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Account, SimpleTransaction, AccountAuthenticator, PendingTransactionResponse } from '@aptos-labs/ts-sdk';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Client-side signer for creating and signing Aptos transactions
|
|
5
|
-
*/
|
|
6
|
-
type ClientAptosSigner = Account;
|
|
7
|
-
/**
|
|
8
|
-
* Configuration for client operations
|
|
9
|
-
*/
|
|
10
|
-
type ClientAptosConfig = {
|
|
11
|
-
/**
|
|
12
|
-
* Optional custom RPC URL for the client to use
|
|
13
|
-
*/
|
|
14
|
-
rpcUrl?: string;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Minimal facilitator signer interface for Aptos operations
|
|
18
|
-
*/
|
|
19
|
-
type FacilitatorAptosSigner = {
|
|
20
|
-
/**
|
|
21
|
-
* Get all addresses this facilitator can use for signing
|
|
22
|
-
*/
|
|
23
|
-
getAddresses(): readonly string[];
|
|
24
|
-
/**
|
|
25
|
-
* Sign a transaction as the fee payer and submit it
|
|
26
|
-
*/
|
|
27
|
-
signAndSubmitAsFeePayer(transaction: SimpleTransaction, senderAuthenticator: AccountAuthenticator, network: string): Promise<PendingTransactionResponse>;
|
|
28
|
-
/**
|
|
29
|
-
* Submit a fully-signed transaction (non-sponsored)
|
|
30
|
-
*/
|
|
31
|
-
submitTransaction(transaction: SimpleTransaction, senderAuthenticator: AccountAuthenticator, network: string): Promise<PendingTransactionResponse>;
|
|
32
|
-
/**
|
|
33
|
-
* Simulate a transaction to verify it would succeed
|
|
34
|
-
*/
|
|
35
|
-
simulateTransaction(transaction: SimpleTransaction, network: string): Promise<void>;
|
|
36
|
-
/**
|
|
37
|
-
* Wait for transaction confirmation
|
|
38
|
-
*/
|
|
39
|
-
waitForTransaction(txHash: string, network: string): Promise<void>;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Creates a client signer from a private key
|
|
43
|
-
*
|
|
44
|
-
* @param privateKey - The private key as a hex string or AIP-80 format
|
|
45
|
-
* @returns An Aptos Account instance
|
|
46
|
-
*/
|
|
47
|
-
declare function createClientSigner(privateKey: string): Promise<ClientAptosSigner>;
|
|
48
|
-
/**
|
|
49
|
-
* Create a facilitator signer from an Aptos Account
|
|
50
|
-
*
|
|
51
|
-
* @param account - The Aptos Account that will act as fee payer
|
|
52
|
-
* @param rpcConfig - Optional RPC configuration
|
|
53
|
-
* @returns FacilitatorAptosSigner instance
|
|
54
|
-
*/
|
|
55
|
-
declare function toFacilitatorAptosSigner(account: Account, rpcConfig?: {
|
|
56
|
-
defaultRpcUrl?: string;
|
|
57
|
-
} | Record<string, string>): FacilitatorAptosSigner;
|
|
58
|
-
|
|
59
|
-
export { type ClientAptosSigner as C, type FacilitatorAptosSigner as F, type ClientAptosConfig as a, createClientSigner as c, toFacilitatorAptosSigner as t };
|