@arcenpay/node 0.0.1 → 0.0.2
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/_esm-H6IRXC3A.mjs +804 -0
- package/dist/_esm-HVKNJV5D.mjs +127 -0
- package/dist/chains-3R75GF4L.mjs +21 -0
- package/dist/{chunk-SKFD6TSD.mjs → chunk-5CPGRELK.mjs} +3 -25
- package/dist/chunk-E2J5KZ6E.mjs +41 -0
- package/dist/chunk-GY2HMODH.mjs +94 -0
- package/dist/chunk-XHLV6BIG.mjs +10224 -0
- package/dist/index.d.mts +9 -10
- package/dist/index.d.ts +9 -10
- package/dist/index.js +1328 -180
- package/dist/index.mjs +1218 -153
- package/dist/tableland-gyl7O0n6.d.mts +191 -0
- package/dist/tableland-gyl7O0n6.d.ts +191 -0
- package/dist/tableland.d.mts +1 -46
- package/dist/tableland.d.ts +1 -46
- package/dist/tableland.js +3 -1
- package/dist/tableland.mjs +2 -1
- package/package.json +6 -2
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AccountNotFoundError,
|
|
3
|
+
EIP1271Abi,
|
|
4
|
+
KERNEL_ADDRESSES,
|
|
5
|
+
KERNEL_FEATURES,
|
|
6
|
+
KERNEL_FEATURES_BY_VERSION,
|
|
7
|
+
KernelAccountAbi,
|
|
8
|
+
KernelEIP1193Provider,
|
|
9
|
+
KernelFactoryAbi,
|
|
10
|
+
KernelFactoryStakerAbi,
|
|
11
|
+
KernelV3AccountAbi,
|
|
12
|
+
KernelV3ExecuteAbi,
|
|
13
|
+
KernelV3FactoryAbi,
|
|
14
|
+
KernelV3InitAbi,
|
|
15
|
+
KernelV3_1AccountAbi,
|
|
16
|
+
KernelV3_3AccountAbi,
|
|
17
|
+
SignTransactionNotSupportedBySmartAccountError,
|
|
18
|
+
TokenActionsAbi,
|
|
19
|
+
accountMetadata,
|
|
20
|
+
addressToEmptyAccount,
|
|
21
|
+
changeSudoValidator,
|
|
22
|
+
constants_exports,
|
|
23
|
+
createFallbackKernelAccountClient,
|
|
24
|
+
createKernelAccount,
|
|
25
|
+
createKernelAccountClient,
|
|
26
|
+
createKernelAccountV0_2,
|
|
27
|
+
createKernelAccountV1,
|
|
28
|
+
createKernelMigrationAccount,
|
|
29
|
+
createZeroDevPaymasterClient,
|
|
30
|
+
deepHexlify,
|
|
31
|
+
eip712WrapHash,
|
|
32
|
+
encodeCallData,
|
|
33
|
+
encodeCallData2,
|
|
34
|
+
encodeDeployCallData,
|
|
35
|
+
encodeDeployCallData2,
|
|
36
|
+
fixSignedData,
|
|
37
|
+
gasTokenAddresses,
|
|
38
|
+
getActionSelector,
|
|
39
|
+
getCustomNonceKeyFromString,
|
|
40
|
+
getERC20PaymasterApproveCall,
|
|
41
|
+
getEncodedPluginsData,
|
|
42
|
+
getExecMode,
|
|
43
|
+
getKernelV3Nonce,
|
|
44
|
+
getPluginsEnableTypedData,
|
|
45
|
+
getUpgradeKernelCall,
|
|
46
|
+
getUserOperationGasPrice,
|
|
47
|
+
getValidatorPluginInstallModuleData,
|
|
48
|
+
hasKernelFeature,
|
|
49
|
+
invalidateNonce,
|
|
50
|
+
isPluginInitialized,
|
|
51
|
+
isProviderSet,
|
|
52
|
+
kernelAccountClientActions,
|
|
53
|
+
satisfiesRange,
|
|
54
|
+
setPimlicoAsProvider,
|
|
55
|
+
signUserOperation,
|
|
56
|
+
sponsorUserOperation,
|
|
57
|
+
toSigner,
|
|
58
|
+
uninstallPlugin,
|
|
59
|
+
upgradeKernel,
|
|
60
|
+
validateKernelVersionWithEntryPoint,
|
|
61
|
+
verifyEIP6492Signature,
|
|
62
|
+
zerodevPaymasterActions
|
|
63
|
+
} from "./chunk-XHLV6BIG.mjs";
|
|
64
|
+
import "./chunk-E2J5KZ6E.mjs";
|
|
65
|
+
export {
|
|
66
|
+
AccountNotFoundError,
|
|
67
|
+
EIP1271Abi,
|
|
68
|
+
KERNEL_ADDRESSES,
|
|
69
|
+
KERNEL_FEATURES,
|
|
70
|
+
KERNEL_FEATURES_BY_VERSION,
|
|
71
|
+
KernelAccountAbi,
|
|
72
|
+
KernelEIP1193Provider,
|
|
73
|
+
KernelFactoryAbi,
|
|
74
|
+
KernelFactoryStakerAbi,
|
|
75
|
+
KernelV3AccountAbi,
|
|
76
|
+
KernelV3ExecuteAbi,
|
|
77
|
+
KernelV3FactoryAbi,
|
|
78
|
+
KernelV3InitAbi,
|
|
79
|
+
KernelV3_1AccountAbi,
|
|
80
|
+
KernelV3_3AccountAbi,
|
|
81
|
+
SignTransactionNotSupportedBySmartAccountError,
|
|
82
|
+
TokenActionsAbi,
|
|
83
|
+
accountMetadata,
|
|
84
|
+
addressToEmptyAccount,
|
|
85
|
+
changeSudoValidator,
|
|
86
|
+
constants_exports as constants,
|
|
87
|
+
createFallbackKernelAccountClient,
|
|
88
|
+
createKernelAccount,
|
|
89
|
+
createKernelAccountClient,
|
|
90
|
+
createKernelAccountV0_2,
|
|
91
|
+
createKernelAccountV1,
|
|
92
|
+
createKernelMigrationAccount,
|
|
93
|
+
createZeroDevPaymasterClient,
|
|
94
|
+
deepHexlify,
|
|
95
|
+
eip712WrapHash,
|
|
96
|
+
encodeCallData as encodeCallDataEpV06,
|
|
97
|
+
encodeCallData2 as encodeCallDataEpV07,
|
|
98
|
+
encodeDeployCallData as encodeDeployCallDataV06,
|
|
99
|
+
encodeDeployCallData2 as encodeDeployCallDataV07,
|
|
100
|
+
fixSignedData,
|
|
101
|
+
gasTokenAddresses,
|
|
102
|
+
getActionSelector,
|
|
103
|
+
getCustomNonceKeyFromString,
|
|
104
|
+
getERC20PaymasterApproveCall,
|
|
105
|
+
getEncodedPluginsData,
|
|
106
|
+
getExecMode,
|
|
107
|
+
getKernelV3Nonce,
|
|
108
|
+
getPluginsEnableTypedData,
|
|
109
|
+
getUpgradeKernelCall,
|
|
110
|
+
getUserOperationGasPrice,
|
|
111
|
+
getValidatorPluginInstallModuleData,
|
|
112
|
+
hasKernelFeature,
|
|
113
|
+
invalidateNonce,
|
|
114
|
+
isPluginInitialized,
|
|
115
|
+
isProviderSet,
|
|
116
|
+
kernelAccountClientActions,
|
|
117
|
+
satisfiesRange,
|
|
118
|
+
setPimlicoAsProvider,
|
|
119
|
+
signUserOperation,
|
|
120
|
+
sponsorUserOperation,
|
|
121
|
+
toSigner,
|
|
122
|
+
uninstallPlugin,
|
|
123
|
+
upgradeKernel,
|
|
124
|
+
validateKernelVersionWithEntryPoint,
|
|
125
|
+
verifyEIP6492Signature,
|
|
126
|
+
zerodevPaymasterActions
|
|
127
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_CHAIN_ID,
|
|
3
|
+
SUPPORTED_CHAINS,
|
|
4
|
+
TOKENS,
|
|
5
|
+
baseMainnet,
|
|
6
|
+
baseSepolia,
|
|
7
|
+
getBlockExplorerUrl,
|
|
8
|
+
getChain,
|
|
9
|
+
sepolia
|
|
10
|
+
} from "./chunk-GY2HMODH.mjs";
|
|
11
|
+
import "./chunk-E2J5KZ6E.mjs";
|
|
12
|
+
export {
|
|
13
|
+
DEFAULT_CHAIN_ID,
|
|
14
|
+
SUPPORTED_CHAINS,
|
|
15
|
+
TOKENS,
|
|
16
|
+
baseMainnet,
|
|
17
|
+
baseSepolia,
|
|
18
|
+
getBlockExplorerUrl,
|
|
19
|
+
getChain,
|
|
20
|
+
sepolia
|
|
21
|
+
};
|
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __esm = (fn, res) => function __init() {
|
|
6
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
7
|
-
};
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
-
|
|
22
1
|
// src/services/tableland.ts
|
|
23
2
|
import { Database } from "@tableland/sdk";
|
|
24
3
|
import { JsonRpcProvider, Wallet } from "ethers";
|
|
@@ -239,7 +218,9 @@ var TablelandService = class {
|
|
|
239
218
|
}
|
|
240
219
|
ensureInitialized() {
|
|
241
220
|
if (!this.initialized || !this.dbRead) {
|
|
242
|
-
throw new Error(
|
|
221
|
+
throw new Error(
|
|
222
|
+
"[Tableland] Service not initialized. Call initialize() first."
|
|
223
|
+
);
|
|
243
224
|
}
|
|
244
225
|
}
|
|
245
226
|
ensureWritable() {
|
|
@@ -259,8 +240,5 @@ var TablelandService = class {
|
|
|
259
240
|
};
|
|
260
241
|
|
|
261
242
|
export {
|
|
262
|
-
__esm,
|
|
263
|
-
__export,
|
|
264
|
-
__toCommonJS,
|
|
265
243
|
TablelandService
|
|
266
244
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __esm = (fn, res) => function __init() {
|
|
8
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
9
|
+
};
|
|
10
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
11
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
+
};
|
|
13
|
+
var __export = (target, all) => {
|
|
14
|
+
for (var name in all)
|
|
15
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
+
for (let key of __getOwnPropNames(from))
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
28
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
|
+
mod
|
|
32
|
+
));
|
|
33
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
__esm,
|
|
37
|
+
__commonJS,
|
|
38
|
+
__export,
|
|
39
|
+
__toESM,
|
|
40
|
+
__toCommonJS
|
|
41
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// src/internal/sdk-core/chains.ts
|
|
2
|
+
import { defineChain } from "viem";
|
|
3
|
+
var sepolia = defineChain({
|
|
4
|
+
id: 11155111,
|
|
5
|
+
name: "Sepolia",
|
|
6
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
7
|
+
rpcUrls: {
|
|
8
|
+
default: { http: ["https://ethereum-sepolia-rpc.publicnode.com"] }
|
|
9
|
+
},
|
|
10
|
+
blockExplorers: {
|
|
11
|
+
default: { name: "Etherscan", url: "https://sepolia.etherscan.io" }
|
|
12
|
+
},
|
|
13
|
+
testnet: true
|
|
14
|
+
});
|
|
15
|
+
var baseSepolia = defineChain({
|
|
16
|
+
id: 84532,
|
|
17
|
+
name: "Base Sepolia",
|
|
18
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
19
|
+
rpcUrls: {
|
|
20
|
+
default: { http: ["https://sepolia.base.org"] }
|
|
21
|
+
},
|
|
22
|
+
blockExplorers: {
|
|
23
|
+
default: { name: "BaseScan", url: "https://sepolia.basescan.org" }
|
|
24
|
+
},
|
|
25
|
+
testnet: true
|
|
26
|
+
});
|
|
27
|
+
var baseMainnet = defineChain({
|
|
28
|
+
id: 8453,
|
|
29
|
+
name: "Base",
|
|
30
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
31
|
+
rpcUrls: {
|
|
32
|
+
default: { http: ["https://mainnet.base.org"] }
|
|
33
|
+
},
|
|
34
|
+
blockExplorers: {
|
|
35
|
+
default: { name: "BaseScan", url: "https://basescan.org" }
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
var SUPPORTED_CHAINS = {
|
|
39
|
+
sepolia,
|
|
40
|
+
baseSepolia,
|
|
41
|
+
baseMainnet
|
|
42
|
+
};
|
|
43
|
+
var TOKENS = {
|
|
44
|
+
// Ethereum Sepolia
|
|
45
|
+
11155111: {
|
|
46
|
+
USDC: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"
|
|
47
|
+
},
|
|
48
|
+
// Base Sepolia
|
|
49
|
+
84532: {
|
|
50
|
+
USDC: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
|
|
51
|
+
},
|
|
52
|
+
// Base Mainnet
|
|
53
|
+
8453: {
|
|
54
|
+
USDC: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
var DEFAULT_CHAIN_ID = 84532;
|
|
58
|
+
function getBlockExplorerUrl(chainId, txHash) {
|
|
59
|
+
const chainMap = {
|
|
60
|
+
11155111: sepolia,
|
|
61
|
+
84532: baseSepolia,
|
|
62
|
+
8453: baseMainnet
|
|
63
|
+
};
|
|
64
|
+
const chain = chainMap[chainId];
|
|
65
|
+
if (!chain) return "";
|
|
66
|
+
const explorerUrl = chain.blockExplorers?.default?.url;
|
|
67
|
+
if (!explorerUrl) return "";
|
|
68
|
+
return `${explorerUrl}/tx/${txHash}`;
|
|
69
|
+
}
|
|
70
|
+
function getChain(chainId) {
|
|
71
|
+
const chainMap = {
|
|
72
|
+
11155111: sepolia,
|
|
73
|
+
84532: baseSepolia,
|
|
74
|
+
8453: baseMainnet
|
|
75
|
+
};
|
|
76
|
+
const chain = chainMap[chainId];
|
|
77
|
+
if (!chain) {
|
|
78
|
+
throw new Error(
|
|
79
|
+
`[getChain] Unsupported chainId: ${chainId}. Supported: ${Object.keys(chainMap).join(", ")}`
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
return chain;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export {
|
|
86
|
+
sepolia,
|
|
87
|
+
baseSepolia,
|
|
88
|
+
baseMainnet,
|
|
89
|
+
SUPPORTED_CHAINS,
|
|
90
|
+
TOKENS,
|
|
91
|
+
DEFAULT_CHAIN_ID,
|
|
92
|
+
getBlockExplorerUrl,
|
|
93
|
+
getChain
|
|
94
|
+
};
|