@smoothsend/sdk 2.3.5 → 2.3.7
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/LICENSE +22 -22
- package/README.md +349 -349
- package/dist/adapters/evm.d.ts +39 -0
- package/dist/adapters/evm.d.ts.map +1 -0
- package/dist/aptos/index.cjs +2 -2
- package/dist/aptos/index.d.ts +3 -3
- package/dist/aptos/index.js +3 -3
- package/dist/avax/SmoothSendAvaxSubmitter.d.ts +2 -2
- package/dist/avax/SmoothSendAvaxSubmitter.d.ts.map +1 -1
- package/dist/avax/index.cjs +52 -14
- package/dist/avax/index.cjs.map +1 -1
- package/dist/avax/index.d.ts +3 -3
- package/dist/avax/index.d.ts.map +1 -1
- package/dist/avax/index.js +53 -15
- package/dist/avax/index.js.map +1 -1
- package/dist/avax/publicAaDefaults.d.ts +26 -0
- package/dist/avax/publicAaDefaults.d.ts.map +1 -1
- package/dist/avax/useSmoothSendAvax.d.ts +2 -0
- package/dist/avax/useSmoothSendAvax.d.ts.map +1 -1
- package/dist/chunks/{shared-CNF22ESH.js → shared-BQ9u3lrN.js} +2 -2
- package/dist/chunks/{shared-CNF22ESH.js.map → shared-BQ9u3lrN.js.map} +1 -1
- package/dist/chunks/{shared-Cgb7mhwI.d.ts → shared-BcSSEWv8.d.ts} +5 -2
- package/dist/chunks/{shared-x1-VC-Li.cjs → shared-BlhOY1v3.cjs} +2 -2
- package/dist/chunks/{shared-x1-VC-Li.cjs.map → shared-BlhOY1v3.cjs.map} +1 -1
- package/dist/chunks/{shared-CaQMAGQR.js → shared-CWbQR_je.js} +4 -4
- package/dist/chunks/{shared-CaQMAGQR.js.map → shared-CWbQR_je.js.map} +1 -1
- package/dist/chunks/{shared-Cn4duBJT.d.ts → shared-DMOh_aLU.d.ts} +1 -1
- package/dist/chunks/{shared-DEurKmpI.cjs → shared-EuyoZgP8.cjs} +4 -4
- package/dist/chunks/{shared-DEurKmpI.cjs.map → shared-EuyoZgP8.cjs.map} +1 -1
- package/dist/chunks/{shared-RVkwmkG7.d.ts → shared-W7k9S_GY.d.ts} +1 -1
- package/dist/chunks/{shared-CPpb2n9T.d.ts → shared-vFCAUg0m.d.ts} +1 -1
- package/dist/config/chains.d.ts +7 -0
- package/dist/config/chains.d.ts.map +1 -0
- package/dist/index.cjs +52 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.esm.js +3 -1846
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +52 -14
- package/dist/index.js.map +1 -1
- package/dist/services/chainConfigService.d.ts +49 -0
- package/dist/services/chainConfigService.d.ts.map +1 -0
- package/dist/stellar/index.cjs +2 -2
- package/dist/stellar/index.d.ts +3 -3
- package/dist/stellar/index.js +2 -2
- package/dist/version.d.ts +1 -1
- package/package.json +120 -120
- package/dist/aptos-privy/index.cjs +0 -40
- package/dist/aptos-privy/index.cjs.map +0 -1
- package/dist/aptos-privy/index.js +0 -34
- package/dist/aptos-privy/index.js.map +0 -1
- package/dist/aptos-privy/normalizePrivyAptosWallet.d.ts +0 -4
- package/dist/aptos-privy/normalizePrivyAptosWallet.d.ts.map +0 -1
- package/dist/aptos-privy/privyAptosSigner.d.ts +0 -32
- package/dist/aptos-privy/privyAptosSigner.d.ts.map +0 -1
- package/dist/aptos-privy/useSmoothSendAptosPrivy.d.ts +0 -13
- package/dist/aptos-privy/useSmoothSendAptosPrivy.d.ts.map +0 -1
- package/dist/aptos-privy-entry.d.ts +0 -9
- package/dist/aptos-privy-entry.d.ts.map +0 -1
- package/dist/chunks/SmoothSendSDK-C_ofuBkk.cjs +0 -1519
- package/dist/chunks/SmoothSendSDK-C_ofuBkk.cjs.map +0 -1
- package/dist/chunks/SmoothSendSDK-CaV_PCIG.js +0 -1511
- package/dist/chunks/SmoothSendSDK-CaV_PCIG.js.map +0 -1
- package/dist/chunks/SmoothSendSDK.d-9GBgZONY.d.ts +0 -262
- package/dist/chunks/TrueGaslessClient-DThO4Tpb.cjs +0 -1237
- package/dist/chunks/TrueGaslessClient-DThO4Tpb.cjs.map +0 -1
- package/dist/chunks/TrueGaslessClient-l2uFvNAa.js +0 -1228
- package/dist/chunks/TrueGaslessClient-l2uFvNAa.js.map +0 -1
- package/dist/chunks/shared-2xx2VLH3.js +0 -453
- package/dist/chunks/shared-2xx2VLH3.js.map +0 -1
- package/dist/chunks/shared-B8UdyBTN.d.ts +0 -143
- package/dist/chunks/shared-BJv1JV1H.cjs +0 -702
- package/dist/chunks/shared-BJv1JV1H.cjs.map +0 -1
- package/dist/chunks/shared-BXvqbQ6f.d.ts +0 -262
- package/dist/chunks/shared-Bh4xtpHv.js +0 -740
- package/dist/chunks/shared-Bh4xtpHv.js.map +0 -1
- package/dist/chunks/shared-BlIQttCf.d.ts +0 -1279
- package/dist/chunks/shared-BoRfHN1w.js +0 -1511
- package/dist/chunks/shared-BoRfHN1w.js.map +0 -1
- package/dist/chunks/shared-CzR0rIwZ.cjs +0 -635
- package/dist/chunks/shared-CzR0rIwZ.cjs.map +0 -1
- package/dist/chunks/shared-DQbEIiTE.cjs +0 -746
- package/dist/chunks/shared-DQbEIiTE.cjs.map +0 -1
- package/dist/chunks/shared-DzwYUjQn.cjs +0 -457
- package/dist/chunks/shared-DzwYUjQn.cjs.map +0 -1
- package/dist/chunks/shared-KUvoQkzf.d.ts +0 -471
- package/dist/chunks/shared-XH1iLZjy.js +0 -629
- package/dist/chunks/shared-XH1iLZjy.js.map +0 -1
- package/dist/chunks/shared-kovW7ATj.js +0 -694
- package/dist/chunks/shared-kovW7ATj.js.map +0 -1
- package/dist/chunks/shared-viO0MYao.d.ts +0 -459
- package/dist/chunks/useSmoothSendAvax-BHeW_6x8.cjs +0 -1865
- package/dist/chunks/useSmoothSendAvax-BHeW_6x8.cjs.map +0 -1
- package/dist/chunks/useSmoothSendAvax-ZuHw1aYi.js +0 -1848
- package/dist/chunks/useSmoothSendAvax-ZuHw1aYi.js.map +0 -1
- package/dist/chunks/version-CNF22ESH.js +0 -557
- package/dist/chunks/version-CNF22ESH.js.map +0 -1
- package/dist/chunks/version-x1-VC-Li.cjs +0 -568
- package/dist/chunks/version-x1-VC-Li.cjs.map +0 -1
- package/dist/chunks/version.d-Cn4duBJT.d.ts +0 -1279
package/package.json
CHANGED
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@smoothsend/sdk",
|
|
3
|
-
"version": "2.3.
|
|
4
|
-
"description": "Multi-chain gasless transaction SDK
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.cjs",
|
|
7
|
-
"module": "dist/index.js",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"import": "./dist/index.js",
|
|
12
|
-
"require": "./dist/index.cjs",
|
|
13
|
-
"types": "./dist/index.d.ts"
|
|
14
|
-
},
|
|
15
|
-
"./avax": {
|
|
16
|
-
"import": "./dist/avax/index.js",
|
|
17
|
-
"require": "./dist/avax/index.cjs",
|
|
18
|
-
"types": "./dist/avax/index.d.ts"
|
|
19
|
-
},
|
|
20
|
-
"./aptos": {
|
|
21
|
-
"import": "./dist/aptos/index.js",
|
|
22
|
-
"require": "./dist/aptos/index.cjs",
|
|
23
|
-
"types": "./dist/aptos/index.d.ts"
|
|
24
|
-
},
|
|
25
|
-
"./stellar": {
|
|
26
|
-
"import": "./dist/stellar/index.js",
|
|
27
|
-
"require": "./dist/stellar/index.cjs",
|
|
28
|
-
"types": "./dist/stellar/index.d.ts"
|
|
29
|
-
},
|
|
30
|
-
"./package.json": "./package.json"
|
|
31
|
-
},
|
|
32
|
-
"files": [
|
|
33
|
-
"dist",
|
|
34
|
-
"README.md"
|
|
35
|
-
],
|
|
36
|
-
"scripts": {
|
|
37
|
-
"build": "rollup -c",
|
|
38
|
-
"dev": "rollup -c -w",
|
|
39
|
-
"test": "jest",
|
|
40
|
-
"lint": "eslint src --ext .ts",
|
|
41
|
-
"lint:fix": "eslint src --ext .ts --fix",
|
|
42
|
-
"typecheck": "tsc --noEmit",
|
|
43
|
-
"prepublishOnly": "npm run build",
|
|
44
|
-
"example:authentication": "ts-node examples/authentication.ts",
|
|
45
|
-
"example:health-status": "ts-node examples/health-and-status.ts",
|
|
46
|
-
"example:usage-tracking": "ts-node examples/usage-tracking.ts",
|
|
47
|
-
"example:token-sender": "cd examples/token-sender && npm run dev",
|
|
48
|
-
"example:nft-marketplace": "cd examples/nft-marketplace && npm run dev",
|
|
49
|
-
"example:avax-smoke": "tsx examples/avax/01-gateway-smoke.ts",
|
|
50
|
-
"example:avax-backend-sponsored": "tsx examples/avax/02-backend-sponsored-submit.ts",
|
|
51
|
-
"example:avax-backend-erc20": "tsx examples/avax/03-backend-user-pays-erc20.ts",
|
|
52
|
-
"example:avax-low-level": "tsx examples/avax/04-low-level-steps.ts"
|
|
53
|
-
},
|
|
54
|
-
"keywords": [
|
|
55
|
-
"aptos",
|
|
56
|
-
"stellar",
|
|
57
|
-
"gasless",
|
|
58
|
-
"transactions",
|
|
59
|
-
"gas-free",
|
|
60
|
-
"sponsored-transactions",
|
|
61
|
-
"c-address",
|
|
62
|
-
"smart-account",
|
|
63
|
-
"soroban",
|
|
64
|
-
"wallet-adapter",
|
|
65
|
-
"move",
|
|
66
|
-
"xlm",
|
|
67
|
-
"usdc",
|
|
68
|
-
"blockchain",
|
|
69
|
-
"dapp",
|
|
70
|
-
"web3",
|
|
71
|
-
"relayer",
|
|
72
|
-
"smoothsend"
|
|
73
|
-
],
|
|
74
|
-
"author": "SmoothSend Team",
|
|
75
|
-
"license": "MIT",
|
|
76
|
-
"repository": {
|
|
77
|
-
"type": "git",
|
|
78
|
-
"url": "https://github.com/smoothsend-sdk.git"
|
|
79
|
-
},
|
|
80
|
-
"bugs": {
|
|
81
|
-
"url": "https://github.com/smoothsend-sdk/issues"
|
|
82
|
-
},
|
|
83
|
-
"homepage": "https://smoothsend.xyz",
|
|
84
|
-
"peerDependencies": {
|
|
85
|
-
"@aptos-labs/ts-sdk": ">=6.0.0",
|
|
86
|
-
"@aptos-labs/wallet-adapter-core": ">=3.0.0",
|
|
87
|
-
"@aptos-labs/wallet-adapter-react": ">=3.0.0",
|
|
88
|
-
"react": ">=17.0.0",
|
|
89
|
-
"viem": ">=2.21.0"
|
|
90
|
-
},
|
|
91
|
-
"dependencies": {
|
|
92
|
-
"axios": "^1.6.0"
|
|
93
|
-
},
|
|
94
|
-
"devDependencies": {
|
|
95
|
-
"@aptos-labs/ts-sdk": "^6.3.1",
|
|
96
|
-
"@aptos-labs/wallet-adapter-react": "^3.0.0",
|
|
97
|
-
"@rollup/plugin-commonjs": "^25.0.7",
|
|
98
|
-
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
99
|
-
"@rollup/plugin-typescript": "^11.1.5",
|
|
100
|
-
"@types/jest": "^29.5.5",
|
|
101
|
-
"@types/node": "^20.8.0",
|
|
102
|
-
"@types/react": "^18.0.0",
|
|
103
|
-
"@typescript-eslint/eslint-plugin": "^6.8.0",
|
|
104
|
-
"@typescript-eslint/parser": "^6.8.0",
|
|
105
|
-
"eslint": "^8.51.0",
|
|
106
|
-
"jest": "^29.7.0",
|
|
107
|
-
"react": "^18.0.0",
|
|
108
|
-
"rollup": "^4.0.0",
|
|
109
|
-
"rollup-plugin-dts": "^6.1.0",
|
|
110
|
-
"ts-jest": "^29.1.1",
|
|
111
|
-
"ts-node": "^10.9.2",
|
|
112
|
-
"tslib": "^2.8.1",
|
|
113
|
-
"tsx": "^4.19.2",
|
|
114
|
-
"typescript": "^5.2.2",
|
|
115
|
-
"viem": "^2.21.54"
|
|
116
|
-
},
|
|
117
|
-
"engines": {
|
|
118
|
-
"node": ">=16.0.0"
|
|
119
|
-
}
|
|
120
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@smoothsend/sdk",
|
|
3
|
+
"version": "2.3.7",
|
|
4
|
+
"description": "Multi-chain gasless transaction SDK Aptos, Avax & more support coming soon like stellar or solana",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.cjs",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./avax": {
|
|
16
|
+
"import": "./dist/avax/index.js",
|
|
17
|
+
"require": "./dist/avax/index.cjs",
|
|
18
|
+
"types": "./dist/avax/index.d.ts"
|
|
19
|
+
},
|
|
20
|
+
"./aptos": {
|
|
21
|
+
"import": "./dist/aptos/index.js",
|
|
22
|
+
"require": "./dist/aptos/index.cjs",
|
|
23
|
+
"types": "./dist/aptos/index.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./stellar": {
|
|
26
|
+
"import": "./dist/stellar/index.js",
|
|
27
|
+
"require": "./dist/stellar/index.cjs",
|
|
28
|
+
"types": "./dist/stellar/index.d.ts"
|
|
29
|
+
},
|
|
30
|
+
"./package.json": "./package.json"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"README.md"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "rollup -c",
|
|
38
|
+
"dev": "rollup -c -w",
|
|
39
|
+
"test": "jest",
|
|
40
|
+
"lint": "eslint src --ext .ts",
|
|
41
|
+
"lint:fix": "eslint src --ext .ts --fix",
|
|
42
|
+
"typecheck": "tsc --noEmit",
|
|
43
|
+
"prepublishOnly": "npm run build",
|
|
44
|
+
"example:authentication": "ts-node examples/authentication.ts",
|
|
45
|
+
"example:health-status": "ts-node examples/health-and-status.ts",
|
|
46
|
+
"example:usage-tracking": "ts-node examples/usage-tracking.ts",
|
|
47
|
+
"example:token-sender": "cd examples/token-sender && npm run dev",
|
|
48
|
+
"example:nft-marketplace": "cd examples/nft-marketplace && npm run dev",
|
|
49
|
+
"example:avax-smoke": "tsx examples/avax/01-gateway-smoke.ts",
|
|
50
|
+
"example:avax-backend-sponsored": "tsx examples/avax/02-backend-sponsored-submit.ts",
|
|
51
|
+
"example:avax-backend-erc20": "tsx examples/avax/03-backend-user-pays-erc20.ts",
|
|
52
|
+
"example:avax-low-level": "tsx examples/avax/04-low-level-steps.ts"
|
|
53
|
+
},
|
|
54
|
+
"keywords": [
|
|
55
|
+
"aptos",
|
|
56
|
+
"stellar",
|
|
57
|
+
"gasless",
|
|
58
|
+
"transactions",
|
|
59
|
+
"gas-free",
|
|
60
|
+
"sponsored-transactions",
|
|
61
|
+
"c-address",
|
|
62
|
+
"smart-account",
|
|
63
|
+
"soroban",
|
|
64
|
+
"wallet-adapter",
|
|
65
|
+
"move",
|
|
66
|
+
"xlm",
|
|
67
|
+
"usdc",
|
|
68
|
+
"blockchain",
|
|
69
|
+
"dapp",
|
|
70
|
+
"web3",
|
|
71
|
+
"relayer",
|
|
72
|
+
"smoothsend"
|
|
73
|
+
],
|
|
74
|
+
"author": "SmoothSend Team",
|
|
75
|
+
"license": "MIT",
|
|
76
|
+
"repository": {
|
|
77
|
+
"type": "git",
|
|
78
|
+
"url": "https://github.com/smoothsend-sdk.git"
|
|
79
|
+
},
|
|
80
|
+
"bugs": {
|
|
81
|
+
"url": "https://github.com/smoothsend-sdk/issues"
|
|
82
|
+
},
|
|
83
|
+
"homepage": "https://smoothsend.xyz",
|
|
84
|
+
"peerDependencies": {
|
|
85
|
+
"@aptos-labs/ts-sdk": ">=6.0.0",
|
|
86
|
+
"@aptos-labs/wallet-adapter-core": ">=3.0.0",
|
|
87
|
+
"@aptos-labs/wallet-adapter-react": ">=3.0.0",
|
|
88
|
+
"react": ">=17.0.0",
|
|
89
|
+
"viem": ">=2.21.0"
|
|
90
|
+
},
|
|
91
|
+
"dependencies": {
|
|
92
|
+
"axios": "^1.6.0"
|
|
93
|
+
},
|
|
94
|
+
"devDependencies": {
|
|
95
|
+
"@aptos-labs/ts-sdk": "^6.3.1",
|
|
96
|
+
"@aptos-labs/wallet-adapter-react": "^3.0.0",
|
|
97
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
98
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
99
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
|
100
|
+
"@types/jest": "^29.5.5",
|
|
101
|
+
"@types/node": "^20.8.0",
|
|
102
|
+
"@types/react": "^18.0.0",
|
|
103
|
+
"@typescript-eslint/eslint-plugin": "^6.8.0",
|
|
104
|
+
"@typescript-eslint/parser": "^6.8.0",
|
|
105
|
+
"eslint": "^8.51.0",
|
|
106
|
+
"jest": "^29.7.0",
|
|
107
|
+
"react": "^18.0.0",
|
|
108
|
+
"rollup": "^4.0.0",
|
|
109
|
+
"rollup-plugin-dts": "^6.1.0",
|
|
110
|
+
"ts-jest": "^29.1.1",
|
|
111
|
+
"ts-node": "^10.9.2",
|
|
112
|
+
"tslib": "^2.8.1",
|
|
113
|
+
"tsx": "^4.19.2",
|
|
114
|
+
"typescript": "^5.2.2",
|
|
115
|
+
"viem": "^2.21.54"
|
|
116
|
+
},
|
|
117
|
+
"engines": {
|
|
118
|
+
"node": ">=16.0.0"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var privyAptosSigner = require('../chunks/shared-BJv1JV1H.cjs');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
require('@aptos-labs/ts-sdk');
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* AVAX-style Aptos + Privy hook.
|
|
9
|
-
*
|
|
10
|
-
* The dApp handles Privy login/wallet creation. SmoothSend starts here: pass
|
|
11
|
-
* the Privy Aptos wallet + `useSignRawHash().signRawHash`, then call
|
|
12
|
-
* `signAndSubmitTransaction` instead of the raw Aptos SDK submit path.
|
|
13
|
-
*/
|
|
14
|
-
function useSmoothSendPrivyWrite(params) {
|
|
15
|
-
const wallet = react.useMemo(() => privyAptosSigner.normalizePrivyAptosWallet(params.wallet), [params.wallet]);
|
|
16
|
-
const signer = react.useMemo(() => params.signRawHash
|
|
17
|
-
? privyAptosSigner.createPrivyAptosSigner({
|
|
18
|
-
wallet,
|
|
19
|
-
signRawHash: params.signRawHash,
|
|
20
|
-
})
|
|
21
|
-
: undefined, [wallet, params.signRawHash]);
|
|
22
|
-
return privyAptosSigner.useSmoothSendAptosPrivy({
|
|
23
|
-
apiKey: params.apiKey,
|
|
24
|
-
network: params.network,
|
|
25
|
-
address: wallet?.address,
|
|
26
|
-
publicKey: wallet?.publicKey,
|
|
27
|
-
signRawHash: signer,
|
|
28
|
-
fullnode: params.fullnode,
|
|
29
|
-
aptosApiKey: params.aptosApiKey,
|
|
30
|
-
gatewayUrl: params.gatewayUrl,
|
|
31
|
-
debug: params.debug,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
exports.createPrivyAptosSigner = privyAptosSigner.createPrivyAptosSigner;
|
|
36
|
-
exports.normalizePrivyAptosPublicKey = privyAptosSigner.normalizePrivyAptosPublicKey;
|
|
37
|
-
exports.normalizePrivyAptosWallet = privyAptosSigner.normalizePrivyAptosWallet;
|
|
38
|
-
exports.useSmoothSendAptosPrivy = privyAptosSigner.useSmoothSendAptosPrivy;
|
|
39
|
-
exports.useSmoothSendPrivyWrite = useSmoothSendPrivyWrite;
|
|
40
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/aptos-privy/useSmoothSendPrivyWrite.tsx"],"sourcesContent":[null],"names":["useMemo","normalizePrivyAptosWallet","createPrivyAptosSigner","useSmoothSendAptosPrivy"],"mappings":";;;;;;AASA;;;;;;AAMG;AACG,SAAU,uBAAuB,CACrC,MAAqC,EAAA;IAErC,MAAM,MAAM,GAAGA,aAAO,CACpB,MAAMC,0CAAyB,CAAC,MAAM,CAAC,MAAM,CAAC,EAC9C,CAAC,MAAM,CAAC,MAAM,CAAC,CAChB;IAED,MAAM,MAAM,GAAGD,aAAO,CACpB,MACE,MAAM,CAAC;UACHE,uCAAsB,CAAC;YACrB,MAAM;YACN,WAAW,EAAE,MAAM,CAAC,WAAW;SAChC;UACD,SAAS,EACf,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,CAC7B;AAED,IAAA,OAAOC,wCAAuB,CAAC;QAC7B,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,OAAO,EAAE,MAAM,EAAE,OAAO;QACxB,SAAS,EAAE,MAAM,EAAE,SAAS;AAC5B,QAAA,WAAW,EAAE,MAAM;QACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,KAAK,EAAE,MAAM,CAAC,KAAK;AACpB,KAAA,CAAC;AACJ;;;;;;;;"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { n as normalizePrivyAptosWallet, c as createPrivyAptosSigner, u as useSmoothSendAptosPrivy } from '../chunks/shared-kovW7ATj.js';
|
|
2
|
-
export { a as normalizePrivyAptosPublicKey } from '../chunks/shared-kovW7ATj.js';
|
|
3
|
-
import { useMemo } from 'react';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* AVAX-style Aptos + Privy hook.
|
|
7
|
-
*
|
|
8
|
-
* The dApp handles Privy login/wallet creation. SmoothSend starts here: pass
|
|
9
|
-
* the Privy Aptos wallet + `useSignRawHash().signRawHash`, then call
|
|
10
|
-
* `signAndSubmitTransaction` instead of the raw Aptos SDK submit path.
|
|
11
|
-
*/
|
|
12
|
-
function useSmoothSendPrivyWrite(params) {
|
|
13
|
-
const wallet = useMemo(() => normalizePrivyAptosWallet(params.wallet), [params.wallet]);
|
|
14
|
-
const signer = useMemo(() => params.signRawHash
|
|
15
|
-
? createPrivyAptosSigner({
|
|
16
|
-
wallet,
|
|
17
|
-
signRawHash: params.signRawHash,
|
|
18
|
-
})
|
|
19
|
-
: undefined, [wallet, params.signRawHash]);
|
|
20
|
-
return useSmoothSendAptosPrivy({
|
|
21
|
-
apiKey: params.apiKey,
|
|
22
|
-
network: params.network,
|
|
23
|
-
address: wallet?.address,
|
|
24
|
-
publicKey: wallet?.publicKey,
|
|
25
|
-
signRawHash: signer,
|
|
26
|
-
fullnode: params.fullnode,
|
|
27
|
-
aptosApiKey: params.aptosApiKey,
|
|
28
|
-
gatewayUrl: params.gatewayUrl,
|
|
29
|
-
debug: params.debug,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { createPrivyAptosSigner, normalizePrivyAptosWallet, useSmoothSendAptosPrivy, useSmoothSendPrivyWrite };
|
|
34
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/aptos-privy/useSmoothSendPrivyWrite.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;AASA;;;;;;AAMG;AACG,SAAU,uBAAuB,CACrC,MAAqC,EAAA;IAErC,MAAM,MAAM,GAAG,OAAO,CACpB,MAAM,yBAAyB,CAAC,MAAM,CAAC,MAAM,CAAC,EAC9C,CAAC,MAAM,CAAC,MAAM,CAAC,CAChB;IAED,MAAM,MAAM,GAAG,OAAO,CACpB,MACE,MAAM,CAAC;UACH,sBAAsB,CAAC;YACrB,MAAM;YACN,WAAW,EAAE,MAAM,CAAC,WAAW;SAChC;UACD,SAAS,EACf,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,CAC7B;AAED,IAAA,OAAO,uBAAuB,CAAC;QAC7B,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,OAAO,EAAE,MAAM,EAAE,OAAO;QACxB,SAAS,EAAE,MAAM,EAAE,SAAS;AAC5B,QAAA,WAAW,EAAE,MAAM;QACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,KAAK,EAAE,MAAM,CAAC,KAAK;AACpB,KAAA,CAAC;AACJ;;;;"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { PrivyAptosWalletInfo } from './types';
|
|
2
|
-
export declare function normalizePrivyAptosPublicKey(publicKey?: string | null): string | undefined;
|
|
3
|
-
export declare function normalizePrivyAptosWallet(wallet: PrivyAptosWalletInfo | null | undefined): PrivyAptosWalletInfo | undefined;
|
|
4
|
-
//# sourceMappingURL=normalizePrivyAptosWallet.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizePrivyAptosWallet.d.ts","sourceRoot":"","sources":["../../src/aptos-privy/normalizePrivyAptosWallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAepD,wBAAgB,4BAA4B,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAyC1F;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,GAC9C,oBAAoB,GAAG,SAAS,CASlC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adapter that wraps Privy's `useSignRawHash().signRawHash` (Tier-2 chains)
|
|
3
|
-
* into the `PrivyAptosRawSigner` shape expected by `useSmoothSendAptosPrivy`.
|
|
4
|
-
*
|
|
5
|
-
* The SDK does NOT import `@privy-io/react-auth` directly — the dApp passes
|
|
6
|
-
* the function in. This keeps Privy as an optional dependency.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* import { useSignRawHash } from '@privy-io/react-auth/extended-chains';
|
|
11
|
-
* import { createPrivyAptosSigner, useSmoothSendAptosPrivy } from '@smoothsend/sdk/aptos';
|
|
12
|
-
*
|
|
13
|
-
* const { signRawHash } = useSignRawHash();
|
|
14
|
-
* const signer = createPrivyAptosSigner({ wallet: aptosWallet, signRawHash });
|
|
15
|
-
*
|
|
16
|
-
* const { signAndSubmitTransaction } = useSmoothSendAptosPrivy({
|
|
17
|
-
* apiKey, network: 'testnet',
|
|
18
|
-
* address: aptosWallet?.address,
|
|
19
|
-
* publicKey: aptosWallet?.publicKey,
|
|
20
|
-
* signRawHash: signer,
|
|
21
|
-
* });
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
import type { PrivyAptosRawSigner, PrivyAptosSignRawHash, PrivyAptosWalletInfo } from './types';
|
|
25
|
-
export interface CreatePrivyAptosSignerParams {
|
|
26
|
-
/** Aptos embedded wallet from Privy. Look it up via `user.linkedAccounts`. */
|
|
27
|
-
wallet: PrivyAptosWalletInfo | null | undefined;
|
|
28
|
-
/** The `signRawHash` function returned by `useSignRawHash()`. */
|
|
29
|
-
signRawHash: PrivyAptosSignRawHash;
|
|
30
|
-
}
|
|
31
|
-
export declare function createPrivyAptosSigner(params: CreatePrivyAptosSignerParams): PrivyAptosRawSigner;
|
|
32
|
-
//# sourceMappingURL=privyAptosSigner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"privyAptosSigner.d.ts","sourceRoot":"","sources":["../../src/aptos-privy/privyAptosSigner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEhG,MAAM,WAAW,4BAA4B;IAC3C,8EAA8E;IAC9E,MAAM,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,iEAAiE;IACjE,WAAW,EAAE,qBAAqB,CAAC;CACpC;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,4BAA4B,GACnC,mBAAmB,CAkBrB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `useSmoothSendAptosPrivy` — Aptos + Privy gasless writes via SmoothSend.
|
|
3
|
-
*
|
|
4
|
-
* Privy's embedded ed25519 wallet signs the signing-message hash via
|
|
5
|
-
* `signRawHash`. SmoothSend's relayer then adds the fee-payer signature and
|
|
6
|
-
* submits, so the end user pays 0 APT gas.
|
|
7
|
-
*
|
|
8
|
-
* This hook is a thin shell over the existing `SmoothSendTransactionSubmitter`
|
|
9
|
-
* — same gasless gateway path used by all other Aptos integrations.
|
|
10
|
-
*/
|
|
11
|
-
import type { UseSmoothSendAptosPrivyParams, UseSmoothSendAptosPrivyResult } from './types';
|
|
12
|
-
export declare function useSmoothSendAptosPrivy(params: UseSmoothSendAptosPrivyParams): UseSmoothSendAptosPrivyResult;
|
|
13
|
-
//# sourceMappingURL=useSmoothSendAptosPrivy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSmoothSendAptosPrivy.d.ts","sourceRoot":"","sources":["../../src/aptos-privy/useSmoothSendAptosPrivy.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAeH,OAAO,KAAK,EAEV,6BAA6B,EAC7B,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AAcjB,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,6BAA6B,GACpC,6BAA6B,CAkJ/B"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @smoothsend/sdk/aptos-privy
|
|
3
|
-
*
|
|
4
|
-
* Lightweight Aptos + Privy entrypoint focused on embedded-wallet signing
|
|
5
|
-
* and SmoothSend gasless submission, without pulling broader Aptos wallet
|
|
6
|
-
* adapter integration surface.
|
|
7
|
-
*/
|
|
8
|
-
export { useSmoothSendAptosPrivy, useSmoothSendPrivyWrite, createPrivyAptosSigner, normalizePrivyAptosPublicKey, normalizePrivyAptosWallet, type CreatePrivyAptosSignerParams, type AptosPrivyHash, type PrivyAptosSignRawHash, type PrivyAptosRawSigner, type PrivyAptosWalletInfo, type SignAndSubmitTransactionInput, type UseSmoothSendAptosPrivyParams, type UseSmoothSendAptosPrivyResult, type UseSmoothSendPrivyWriteParams, type UseSmoothSendPrivyWriteResult, } from './aptos-privy';
|
|
9
|
-
//# sourceMappingURL=aptos-privy-entry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aptos-privy-entry.d.ts","sourceRoot":"","sources":["../src/aptos-privy-entry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,4BAA4B,EAC5B,yBAAyB,EACzB,KAAK,4BAA4B,EACjC,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,GACnC,MAAM,eAAe,CAAC"}
|