@rhinestone/sdk 1.5.0 → 2.0.0-beta.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/src/accounts/error.d.ts +1 -1
- package/dist/src/accounts/error.js +1 -19
- package/dist/src/accounts/index.d.ts +5 -5
- package/dist/src/accounts/index.js +121 -157
- package/dist/src/accounts/json-rpc/index.d.ts +1 -1
- package/dist/src/accounts/json-rpc/index.js +8 -10
- package/dist/src/accounts/json-rpc/providers.d.ts +1 -1
- package/dist/src/accounts/json-rpc/providers.js +4 -7
- package/dist/src/accounts/kernel.d.ts +3 -3
- package/dist/src/accounts/kernel.js +66 -75
- package/dist/src/accounts/nexus.d.ts +3 -3
- package/dist/src/accounts/nexus.js +62 -73
- package/dist/src/accounts/passport.d.ts +3 -3
- package/dist/src/accounts/passport.js +9 -13
- package/dist/src/accounts/safe.d.ts +3 -3
- package/dist/src/accounts/safe.js +54 -63
- package/dist/src/accounts/signing/common.d.ts +2 -2
- package/dist/src/accounts/signing/common.js +30 -36
- package/dist/src/accounts/signing/message.d.ts +2 -2
- package/dist/src/accounts/signing/message.js +10 -12
- package/dist/src/accounts/signing/passkeys.js +11 -17
- package/dist/src/accounts/signing/typedData.d.ts +1 -1
- package/dist/src/accounts/signing/typedData.js +6 -8
- package/dist/src/accounts/startale.d.ts +3 -3
- package/dist/src/accounts/startale.js +37 -47
- package/dist/src/accounts/utils.d.ts +2 -2
- package/dist/src/accounts/utils.js +22 -28
- package/dist/src/accounts/walletClient.js +4 -8
- package/dist/src/actions/compact.d.ts +1 -1
- package/dist/src/actions/compact.js +22 -35
- package/dist/src/actions/deployment.d.ts +1 -1
- package/dist/src/actions/deployment.js +11 -13
- package/dist/src/actions/ecdsa.d.ts +1 -1
- package/dist/src/actions/ecdsa.js +14 -20
- package/dist/src/actions/index.d.ts +2 -2
- package/dist/src/actions/index.js +6 -10
- package/dist/src/actions/mfa.d.ts +1 -1
- package/dist/src/actions/mfa.js +18 -24
- package/dist/src/actions/passkeys.d.ts +2 -2
- package/dist/src/actions/passkeys.js +14 -20
- package/dist/src/actions/recovery.d.ts +1 -1
- package/dist/src/actions/recovery.js +25 -29
- package/dist/src/actions/smart-sessions.d.ts +1 -1
- package/dist/src/actions/smart-sessions.js +8 -12
- package/dist/src/auth/provider.d.ts +1 -1
- package/dist/src/auth/provider.js +1 -4
- package/dist/src/errors/index.d.ts +3 -3
- package/dist/src/errors/index.js +10 -54
- package/dist/src/execution/compact.d.ts +3 -3
- package/dist/src/execution/compact.js +10 -18
- package/dist/src/execution/error.js +1 -11
- package/dist/src/execution/index.d.ts +8 -8
- package/dist/src/execution/index.js +50 -65
- package/dist/src/execution/permit2.d.ts +5 -5
- package/dist/src/execution/permit2.js +8 -13
- package/dist/src/execution/singleChainOps.d.ts +2 -2
- package/dist/src/execution/singleChainOps.js +1 -3
- package/dist/src/execution/types.d.ts +1 -1
- package/dist/src/execution/types.js +1 -2
- package/dist/src/execution/utils.d.ts +4 -4
- package/dist/src/execution/utils.js +133 -156
- package/dist/src/index.d.ts +9 -9
- package/dist/src/index.js +55 -66
- package/dist/src/jwt-server/digest.js +3 -6
- package/dist/src/jwt-server/express.d.ts +1 -1
- package/dist/src/jwt-server/express.d.ts.map +1 -1
- package/dist/src/jwt-server/express.js +6 -7
- package/dist/src/jwt-server/handlers.d.ts +1 -1
- package/dist/src/jwt-server/handlers.js +7 -11
- package/dist/src/jwt-server/index.d.ts +7 -7
- package/dist/src/jwt-server/index.js +6 -17
- package/dist/src/jwt-server/jcs.js +1 -4
- package/dist/src/jwt-server/signer.d.ts +1 -1
- package/dist/src/jwt-server/signer.js +10 -13
- package/dist/src/jwt-server/sponsorship.js +2 -7
- package/dist/src/jwt-server/web.d.ts +1 -1
- package/dist/src/jwt-server/web.js +5 -9
- package/dist/src/modules/abi/smart-session-emissary.js +1 -3
- package/dist/src/modules/abi/smart-sessions.js +1 -4
- package/dist/src/modules/chain-abstraction.js +1 -5
- package/dist/src/modules/common.d.ts +1 -1
- package/dist/src/modules/common.js +1 -13
- package/dist/src/modules/index.d.ts +5 -5
- package/dist/src/modules/index.js +35 -50
- package/dist/src/modules/legacy.d.ts +2 -2
- package/dist/src/modules/legacy.js +11 -14
- package/dist/src/modules/read.d.ts +1 -1
- package/dist/src/modules/read.js +11 -15
- package/dist/src/modules/validators/core.d.ts +2 -2
- package/dist/src/modules/validators/core.js +26 -44
- package/dist/src/modules/validators/index.d.ts +2 -2
- package/dist/src/modules/validators/index.js +3 -19
- package/dist/src/modules/validators/policies/claim/permit2.d.ts +1 -1
- package/dist/src/modules/validators/policies/claim/permit2.js +39 -44
- package/dist/src/modules/validators/policies/claim/types.js +11 -14
- package/dist/src/modules/validators/smart-sessions.d.ts +3 -3
- package/dist/src/modules/validators/smart-sessions.js +65 -94
- package/dist/src/orchestrator/client.d.ts +2 -2
- package/dist/src/orchestrator/client.js +46 -50
- package/dist/src/orchestrator/consts.d.ts +1 -1
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +2 -8
- package/dist/src/orchestrator/error.js +1 -33
- package/dist/src/orchestrator/index.d.ts +7 -7
- package/dist/src/orchestrator/index.js +7 -56
- package/dist/src/orchestrator/registry.d.ts +2 -2
- package/dist/src/orchestrator/registry.js +19 -33
- package/dist/src/orchestrator/types.js +1 -17
- package/dist/src/orchestrator/utils.js +1 -3
- package/dist/src/types.d.ts +3 -3
- package/dist/src/types.js +1 -2
- package/dist/src/utils/index.d.ts +2 -2
- package/dist/src/utils/index.js +9 -15
- package/package.json +15 -98
|
@@ -1,54 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.getTokenAddress = getTokenAddress;
|
|
5
|
-
exports.getTokenDecimals = getTokenDecimals;
|
|
6
|
-
exports.getWethAddress = getWethAddress;
|
|
7
|
-
exports.getWrappedTokenAddress = getWrappedTokenAddress;
|
|
8
|
-
exports.getChainById = getChainById;
|
|
9
|
-
exports.getSupportedTokens = getSupportedTokens;
|
|
10
|
-
exports.getSupportedChainIds = getSupportedChainIds;
|
|
11
|
-
exports.isTestnet = isTestnet;
|
|
12
|
-
exports.isTokenAddressSupported = isTokenAddressSupported;
|
|
13
|
-
exports.getDefaultAccountAccessList = getDefaultAccountAccessList;
|
|
14
|
-
exports.resolveTokenAddress = resolveTokenAddress;
|
|
15
|
-
exports.getAllSupportedChainsAndTokens = getAllSupportedChainsAndTokens;
|
|
16
|
-
const shared_configs_1 = require("@rhinestone/shared-configs");
|
|
17
|
-
const viem_1 = require("viem");
|
|
18
|
-
const error_1 = require("./error");
|
|
1
|
+
import { chainRegistry, chains, } from '@rhinestone/shared-configs';
|
|
2
|
+
import { isAddress } from 'viem';
|
|
3
|
+
import { UnsupportedChainError, UnsupportedTokenError } from './error.js';
|
|
19
4
|
function getSupportedChainIds() {
|
|
20
|
-
return
|
|
5
|
+
return chains.map((chain) => chain.id);
|
|
21
6
|
}
|
|
22
7
|
function getChainEntry(chainId) {
|
|
23
|
-
return
|
|
8
|
+
return chainRegistry[chainId.toString()];
|
|
24
9
|
}
|
|
25
10
|
function getWethAddress(chain) {
|
|
26
11
|
const chainEntry = getChainEntry(chain.id);
|
|
27
12
|
if (!chainEntry) {
|
|
28
|
-
throw new
|
|
13
|
+
throw new UnsupportedChainError(chain.id);
|
|
29
14
|
}
|
|
30
15
|
const wethToken = chainEntry.tokens.find((token) => token.symbol === 'WETH');
|
|
31
16
|
if (!wethToken) {
|
|
32
|
-
throw new
|
|
17
|
+
throw new UnsupportedTokenError('WETH', chain.id);
|
|
33
18
|
}
|
|
34
19
|
return wethToken.address;
|
|
35
20
|
}
|
|
36
21
|
function getWrappedTokenAddress(chain) {
|
|
37
22
|
const chainEntry = getChainEntry(chain.id);
|
|
38
23
|
if (!chainEntry) {
|
|
39
|
-
throw new
|
|
24
|
+
throw new UnsupportedChainError(chain.id);
|
|
40
25
|
}
|
|
41
26
|
const token = chainEntry.wrappedNativeToken ??
|
|
42
27
|
chainEntry.tokens.find((t) => t.symbol === 'WETH');
|
|
43
28
|
if (!token) {
|
|
44
|
-
throw new
|
|
29
|
+
throw new UnsupportedTokenError('WETH', chain.id);
|
|
45
30
|
}
|
|
46
31
|
return token.address;
|
|
47
32
|
}
|
|
48
33
|
function getTokenSymbol(tokenAddress, chainId) {
|
|
49
34
|
const chainEntry = getChainEntry(chainId);
|
|
50
35
|
if (!chainEntry) {
|
|
51
|
-
throw new
|
|
36
|
+
throw new UnsupportedChainError(chainId);
|
|
52
37
|
}
|
|
53
38
|
const token = chainEntry.tokens.find((t) => t.address.toLowerCase() === tokenAddress.toLowerCase());
|
|
54
39
|
return token?.symbol;
|
|
@@ -56,29 +41,29 @@ function getTokenSymbol(tokenAddress, chainId) {
|
|
|
56
41
|
function getTokenAddress(tokenSymbol, chainId) {
|
|
57
42
|
const chainEntry = getChainEntry(chainId);
|
|
58
43
|
if (!chainEntry) {
|
|
59
|
-
throw new
|
|
44
|
+
throw new UnsupportedChainError(chainId);
|
|
60
45
|
}
|
|
61
46
|
const token = chainEntry.tokens.find((t) => t.symbol === tokenSymbol);
|
|
62
47
|
if (!token) {
|
|
63
|
-
throw new
|
|
48
|
+
throw new UnsupportedTokenError(tokenSymbol, chainId);
|
|
64
49
|
}
|
|
65
50
|
return token.address;
|
|
66
51
|
}
|
|
67
52
|
function getTokenDecimals(tokenSymbol, chainId) {
|
|
68
53
|
const chainEntry = getChainEntry(chainId);
|
|
69
54
|
if (!chainEntry) {
|
|
70
|
-
throw new
|
|
55
|
+
throw new UnsupportedChainError(chainId);
|
|
71
56
|
}
|
|
72
57
|
const token = chainEntry.tokens.find((t) => t.symbol === tokenSymbol);
|
|
73
58
|
if (!token) {
|
|
74
|
-
throw new
|
|
59
|
+
throw new UnsupportedTokenError(tokenSymbol, chainId);
|
|
75
60
|
}
|
|
76
61
|
return token.decimals;
|
|
77
62
|
}
|
|
78
63
|
function getChainById(chainId) {
|
|
79
|
-
const chain =
|
|
64
|
+
const chain = chains.find((chain) => chain.id === chainId);
|
|
80
65
|
if (!chain) {
|
|
81
|
-
throw new
|
|
66
|
+
throw new UnsupportedChainError(chainId);
|
|
82
67
|
}
|
|
83
68
|
return chain;
|
|
84
69
|
}
|
|
@@ -96,7 +81,7 @@ function isTokenAddressSupported(address, chainId) {
|
|
|
96
81
|
function getSupportedTokens(chainId) {
|
|
97
82
|
const chainEntry = getChainEntry(chainId);
|
|
98
83
|
if (!chainEntry) {
|
|
99
|
-
throw new
|
|
84
|
+
throw new UnsupportedChainError(chainId);
|
|
100
85
|
}
|
|
101
86
|
return chainEntry.tokens;
|
|
102
87
|
}
|
|
@@ -115,7 +100,7 @@ function getDefaultAccountAccessList(onTestnets) {
|
|
|
115
100
|
};
|
|
116
101
|
}
|
|
117
102
|
function resolveTokenAddress(token, chainId) {
|
|
118
|
-
if (
|
|
103
|
+
if (isAddress(token)) {
|
|
119
104
|
return token;
|
|
120
105
|
}
|
|
121
106
|
return getTokenAddress(token, chainId);
|
|
@@ -127,3 +112,4 @@ function getAllSupportedChainsAndTokens() {
|
|
|
127
112
|
tokens: getSupportedTokens(chainId),
|
|
128
113
|
}));
|
|
129
114
|
}
|
|
115
|
+
export { getTokenSymbol, getTokenAddress, getTokenDecimals, getWethAddress, getWrappedTokenAddress, getChainById, getSupportedTokens, getSupportedChainIds, isTestnet, isTokenAddressSupported, getDefaultAccountAccessList, resolveTokenAddress, getAllSupportedChainsAndTokens, };
|
|
@@ -1,31 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SIG_MODE_ERC1271_EMISSARY_EXECUTION = exports.SIG_MODE_EMISSARY_EXECUTION_ERC1271 = exports.SIG_MODE_EMISSARY_EXECUTION = exports.SIG_MODE_ERC1271_EMISSARY = exports.SIG_MODE_EMISSARY_ERC1271 = exports.SIG_MODE_ERC1271 = exports.SIG_MODE_EMISSARY = exports.INTENT_STATUS_PRECONFIRMED = exports.INTENT_STATUS_FILLED = exports.INTENT_STATUS_COMPLETED = exports.INTENT_STATUS_CLAIMED = exports.INTENT_STATUS_EXPIRED = exports.INTENT_STATUS_FAILED = exports.INTENT_STATUS_PENDING = void 0;
|
|
4
1
|
const INTENT_STATUS_PENDING = 'PENDING';
|
|
5
|
-
exports.INTENT_STATUS_PENDING = INTENT_STATUS_PENDING;
|
|
6
2
|
const INTENT_STATUS_FAILED = 'FAILED';
|
|
7
|
-
exports.INTENT_STATUS_FAILED = INTENT_STATUS_FAILED;
|
|
8
3
|
const INTENT_STATUS_EXPIRED = 'EXPIRED';
|
|
9
|
-
exports.INTENT_STATUS_EXPIRED = INTENT_STATUS_EXPIRED;
|
|
10
4
|
const INTENT_STATUS_COMPLETED = 'COMPLETED';
|
|
11
|
-
exports.INTENT_STATUS_COMPLETED = INTENT_STATUS_COMPLETED;
|
|
12
5
|
const INTENT_STATUS_FILLED = 'FILLED';
|
|
13
|
-
exports.INTENT_STATUS_FILLED = INTENT_STATUS_FILLED;
|
|
14
6
|
const INTENT_STATUS_PRECONFIRMED = 'PRECONFIRMED';
|
|
15
|
-
exports.INTENT_STATUS_PRECONFIRMED = INTENT_STATUS_PRECONFIRMED;
|
|
16
7
|
const INTENT_STATUS_CLAIMED = 'CLAIMED';
|
|
17
|
-
exports.INTENT_STATUS_CLAIMED = INTENT_STATUS_CLAIMED;
|
|
18
8
|
const SIG_MODE_EMISSARY = 0;
|
|
19
|
-
exports.SIG_MODE_EMISSARY = SIG_MODE_EMISSARY;
|
|
20
9
|
const SIG_MODE_ERC1271 = 1;
|
|
21
|
-
exports.SIG_MODE_ERC1271 = SIG_MODE_ERC1271;
|
|
22
10
|
const SIG_MODE_EMISSARY_ERC1271 = 2;
|
|
23
|
-
exports.SIG_MODE_EMISSARY_ERC1271 = SIG_MODE_EMISSARY_ERC1271;
|
|
24
11
|
const SIG_MODE_ERC1271_EMISSARY = 3;
|
|
25
|
-
exports.SIG_MODE_ERC1271_EMISSARY = SIG_MODE_ERC1271_EMISSARY;
|
|
26
12
|
const SIG_MODE_EMISSARY_EXECUTION = 4;
|
|
27
|
-
exports.SIG_MODE_EMISSARY_EXECUTION = SIG_MODE_EMISSARY_EXECUTION;
|
|
28
13
|
const SIG_MODE_EMISSARY_EXECUTION_ERC1271 = 5;
|
|
29
|
-
exports.SIG_MODE_EMISSARY_EXECUTION_ERC1271 = SIG_MODE_EMISSARY_EXECUTION_ERC1271;
|
|
30
14
|
const SIG_MODE_ERC1271_EMISSARY_EXECUTION = 6;
|
|
31
|
-
|
|
15
|
+
export { INTENT_STATUS_PENDING, INTENT_STATUS_FAILED, INTENT_STATUS_EXPIRED, INTENT_STATUS_CLAIMED, INTENT_STATUS_COMPLETED, INTENT_STATUS_FILLED, INTENT_STATUS_PRECONFIRMED, SIG_MODE_EMISSARY, SIG_MODE_ERC1271, SIG_MODE_EMISSARY_ERC1271, SIG_MODE_ERC1271_EMISSARY, SIG_MODE_EMISSARY_EXECUTION, SIG_MODE_EMISSARY_EXECUTION_ERC1271, SIG_MODE_ERC1271_EMISSARY_EXECUTION, };
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertBigIntFields = convertBigIntFields;
|
|
4
1
|
function convertBigIntFields(obj) {
|
|
5
2
|
if (obj === null || obj === undefined) {
|
|
6
3
|
return obj;
|
|
@@ -22,3 +19,4 @@ function convertBigIntFields(obj) {
|
|
|
22
19
|
}
|
|
23
20
|
return obj;
|
|
24
21
|
}
|
|
22
|
+
export { convertBigIntFields };
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Account, Address, Chain, Hex } from 'viem';
|
|
2
2
|
import type { WebAuthnAccount } from 'viem/account-abstraction';
|
|
3
|
-
import type { ModuleType } from './modules/common';
|
|
4
|
-
import type { AuxiliaryFunds, SettlementLayer } from './orchestrator/types';
|
|
3
|
+
import type { ModuleType } from './modules/common.js';
|
|
4
|
+
import type { AuxiliaryFunds, SettlementLayer } from './orchestrator/types.js';
|
|
5
5
|
type AccountType = 'safe' | 'nexus' | 'kernel' | 'startale' | 'passport' | 'eoa';
|
|
6
6
|
interface SafeAccount {
|
|
7
7
|
type: 'safe';
|
|
@@ -240,7 +240,7 @@ type RhinestoneSDKConfig = RhinestoneSDKConfigBase & ({
|
|
|
240
240
|
});
|
|
241
241
|
type RhinestoneConfig = RhinestoneAccountConfig & Partial<RhinestoneSDKConfig> & {
|
|
242
242
|
/** @internal Resolved auth provider — set by RhinestoneSDK, not by users. */
|
|
243
|
-
_authProvider?: import('./auth/provider').AuthProvider;
|
|
243
|
+
_authProvider?: import('./auth/provider.js').AuthProvider;
|
|
244
244
|
};
|
|
245
245
|
type TokenSymbol = 'ETH' | 'WETH' | 'USDC' | 'USDT' | 'USDT0';
|
|
246
246
|
interface CalldataInput {
|
package/dist/src/types.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Account, Address, Hex } from 'viem';
|
|
2
|
-
import { getSetup as experimental_getModuleSetup } from '../modules';
|
|
3
|
-
import type { RhinestoneAccountConfig } from '../types';
|
|
2
|
+
import { getSetup as experimental_getModuleSetup } from '../modules/index.js';
|
|
3
|
+
import type { RhinestoneAccountConfig } from '../types.js';
|
|
4
4
|
declare function experimental_getV0InitData(config: RhinestoneAccountConfig): {
|
|
5
5
|
address: Address;
|
|
6
6
|
factory: Address;
|
package/dist/src/utils/index.js
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.experimental_getV0InitData = experimental_getV0InitData;
|
|
5
|
-
exports.experimental_getRhinestoneInitData = experimental_getRhinestoneInitData;
|
|
6
|
-
exports.toViewOnlyAccount = toViewOnlyAccount;
|
|
7
|
-
const accounts_1 = require("viem/accounts");
|
|
8
|
-
const accounts_2 = require("../accounts");
|
|
9
|
-
const modules_1 = require("../modules");
|
|
10
|
-
Object.defineProperty(exports, "experimental_getModuleSetup", { enumerable: true, get: function () { return modules_1.getSetup; } });
|
|
1
|
+
import { toAccount } from 'viem/accounts';
|
|
2
|
+
import { getAddress, getInitCode, getV0InitCode } from '../accounts/index.js';
|
|
3
|
+
import { getSetup as experimental_getModuleSetup } from '../modules/index.js';
|
|
11
4
|
function experimental_getV0InitData(config) {
|
|
12
|
-
const initCode =
|
|
5
|
+
const initCode = getV0InitCode(config);
|
|
13
6
|
if (!initCode) {
|
|
14
7
|
throw new Error('Init code not available');
|
|
15
8
|
}
|
|
@@ -17,7 +10,7 @@ function experimental_getV0InitData(config) {
|
|
|
17
10
|
throw new Error('Factory not available');
|
|
18
11
|
}
|
|
19
12
|
const { factory, factoryData } = initCode;
|
|
20
|
-
const address =
|
|
13
|
+
const address = getAddress(config);
|
|
21
14
|
return {
|
|
22
15
|
address,
|
|
23
16
|
factory,
|
|
@@ -26,11 +19,11 @@ function experimental_getV0InitData(config) {
|
|
|
26
19
|
};
|
|
27
20
|
}
|
|
28
21
|
function experimental_getRhinestoneInitData(config) {
|
|
29
|
-
const initCode =
|
|
22
|
+
const initCode = getInitCode(config);
|
|
30
23
|
if (!initCode) {
|
|
31
24
|
throw new Error('Init code not available');
|
|
32
25
|
}
|
|
33
|
-
const address =
|
|
26
|
+
const address = getAddress(config);
|
|
34
27
|
if ('factory' in initCode) {
|
|
35
28
|
const { factory, factoryData } = initCode;
|
|
36
29
|
return {
|
|
@@ -48,7 +41,7 @@ function experimental_getRhinestoneInitData(config) {
|
|
|
48
41
|
}
|
|
49
42
|
function toViewOnlyAccount(address) {
|
|
50
43
|
const errorMessage = 'Signing is not supported for view-only accounts';
|
|
51
|
-
return
|
|
44
|
+
return toAccount({
|
|
52
45
|
address,
|
|
53
46
|
signMessage: async () => {
|
|
54
47
|
throw new Error(errorMessage);
|
|
@@ -61,3 +54,4 @@ function toViewOnlyAccount(address) {
|
|
|
61
54
|
},
|
|
62
55
|
});
|
|
63
56
|
}
|
|
57
|
+
export { experimental_getV0InitData, experimental_getModuleSetup, experimental_getRhinestoneInitData, toViewOnlyAccount, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhinestone/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta.0",
|
|
4
4
|
"description": "End-to-end chain abstraction and modularity toolkit",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rhinestone",
|
|
@@ -12,143 +12,60 @@
|
|
|
12
12
|
"sdk"
|
|
13
13
|
],
|
|
14
14
|
"license": "MIT",
|
|
15
|
-
"
|
|
15
|
+
"type": "module",
|
|
16
16
|
"types": "./dist/src/index.d.ts",
|
|
17
17
|
"exports": {
|
|
18
18
|
".": {
|
|
19
19
|
"types": "./dist/src/index.d.ts",
|
|
20
|
-
"import": "./dist/src/index.js"
|
|
21
|
-
"require": "./dist/src/index.js"
|
|
20
|
+
"import": "./dist/src/index.js"
|
|
22
21
|
},
|
|
23
22
|
"./actions": {
|
|
24
23
|
"types": "./dist/src/actions/index.d.ts",
|
|
25
|
-
"import": "./dist/src/actions/index.js"
|
|
26
|
-
"require": "./dist/src/actions/index.js"
|
|
24
|
+
"import": "./dist/src/actions/index.js"
|
|
27
25
|
},
|
|
28
26
|
"./actions/compact": {
|
|
29
27
|
"types": "./dist/src/actions/compact.d.ts",
|
|
30
|
-
"import": "./dist/src/actions/compact.js"
|
|
31
|
-
"require": "./dist/src/actions/compact.js"
|
|
28
|
+
"import": "./dist/src/actions/compact.js"
|
|
32
29
|
},
|
|
33
30
|
"./actions/ecdsa": {
|
|
34
31
|
"types": "./dist/src/actions/ecdsa.d.ts",
|
|
35
|
-
"import": "./dist/src/actions/ecdsa.js"
|
|
36
|
-
"require": "./dist/src/actions/ecdsa.js"
|
|
32
|
+
"import": "./dist/src/actions/ecdsa.js"
|
|
37
33
|
},
|
|
38
34
|
"./actions/mfa": {
|
|
39
35
|
"types": "./dist/src/actions/mfa.d.ts",
|
|
40
|
-
"import": "./dist/src/actions/mfa.js"
|
|
41
|
-
"require": "./dist/src/actions/mfa.js"
|
|
36
|
+
"import": "./dist/src/actions/mfa.js"
|
|
42
37
|
},
|
|
43
38
|
"./actions/passkeys": {
|
|
44
39
|
"types": "./dist/src/actions/passkeys.d.ts",
|
|
45
|
-
"import": "./dist/src/actions/passkeys.js"
|
|
46
|
-
"require": "./dist/src/actions/passkeys.js"
|
|
40
|
+
"import": "./dist/src/actions/passkeys.js"
|
|
47
41
|
},
|
|
48
42
|
"./signing/passkeys": {
|
|
49
43
|
"types": "./dist/src/accounts/signing/passkeys.d.ts",
|
|
50
|
-
"import": "./dist/src/accounts/signing/passkeys.js"
|
|
51
|
-
"require": "./dist/src/accounts/signing/passkeys.js"
|
|
44
|
+
"import": "./dist/src/accounts/signing/passkeys.js"
|
|
52
45
|
},
|
|
53
46
|
"./actions/smart-sessions": {
|
|
54
47
|
"types": "./dist/src/actions/smart-sessions.d.ts",
|
|
55
|
-
"import": "./dist/src/actions/smart-sessions.js"
|
|
56
|
-
"require": "./dist/src/actions/smart-sessions.js"
|
|
48
|
+
"import": "./dist/src/actions/smart-sessions.js"
|
|
57
49
|
},
|
|
58
50
|
"./actions/recovery": {
|
|
59
51
|
"types": "./dist/src/actions/recovery.d.ts",
|
|
60
|
-
"import": "./dist/src/actions/recovery.js"
|
|
61
|
-
"require": "./dist/src/actions/recovery.js"
|
|
52
|
+
"import": "./dist/src/actions/recovery.js"
|
|
62
53
|
},
|
|
63
54
|
"./errors": {
|
|
64
55
|
"types": "./dist/src/errors/index.d.ts",
|
|
65
|
-
"import": "./dist/src/errors/index.js"
|
|
66
|
-
"require": "./dist/src/errors/index.js"
|
|
56
|
+
"import": "./dist/src/errors/index.js"
|
|
67
57
|
},
|
|
68
58
|
"./utils": {
|
|
69
59
|
"types": "./dist/src/utils/index.d.ts",
|
|
70
|
-
"import": "./dist/src/utils/index.js"
|
|
71
|
-
"require": "./dist/src/utils/index.js"
|
|
72
|
-
},
|
|
73
|
-
"./dist/src/actions": {
|
|
74
|
-
"types": "./dist/src/actions/index.d.ts",
|
|
75
|
-
"import": "./dist/src/actions/index.js",
|
|
76
|
-
"require": "./dist/src/actions/index.js"
|
|
77
|
-
},
|
|
78
|
-
"./dist/src/actions/compact": {
|
|
79
|
-
"types": "./dist/src/actions/compact.d.ts",
|
|
80
|
-
"import": "./dist/src/actions/compact.js",
|
|
81
|
-
"require": "./dist/src/actions/compact.js"
|
|
82
|
-
},
|
|
83
|
-
"./dist/src/actions/ecdsa": {
|
|
84
|
-
"types": "./dist/src/actions/ecdsa.d.ts",
|
|
85
|
-
"import": "./dist/src/actions/ecdsa.js",
|
|
86
|
-
"require": "./dist/src/actions/ecdsa.js"
|
|
87
|
-
},
|
|
88
|
-
"./dist/src/actions/mfa": {
|
|
89
|
-
"types": "./dist/src/actions/mfa.d.ts",
|
|
90
|
-
"import": "./dist/src/actions/mfa.js",
|
|
91
|
-
"require": "./dist/src/actions/mfa.js"
|
|
92
|
-
},
|
|
93
|
-
"./dist/src/actions/passkeys": {
|
|
94
|
-
"types": "./dist/src/actions/passkeys.d.ts",
|
|
95
|
-
"import": "./dist/src/actions/passkeys.js",
|
|
96
|
-
"require": "./dist/src/actions/passkeys.js"
|
|
97
|
-
},
|
|
98
|
-
"./dist/src/actions/smart-sessions": {
|
|
99
|
-
"types": "./dist/src/actions/smart-sessions.d.ts",
|
|
100
|
-
"import": "./dist/src/actions/smart-sessions.js",
|
|
101
|
-
"require": "./dist/src/actions/smart-sessions.js"
|
|
102
|
-
},
|
|
103
|
-
"./dist/src/actions/recovery": {
|
|
104
|
-
"types": "./dist/src/actions/recovery.d.ts",
|
|
105
|
-
"import": "./dist/src/actions/recovery.js",
|
|
106
|
-
"require": "./dist/src/actions/recovery.js"
|
|
107
|
-
},
|
|
108
|
-
"./dist/src/errors": {
|
|
109
|
-
"types": "./dist/src/errors/index.d.ts",
|
|
110
|
-
"import": "./dist/src/errors/index.js",
|
|
111
|
-
"require": "./dist/src/errors/index.js"
|
|
112
|
-
},
|
|
113
|
-
"./dist/src/utils": {
|
|
114
|
-
"types": "./dist/src/utils/index.d.ts",
|
|
115
|
-
"import": "./dist/src/utils/index.js",
|
|
116
|
-
"require": "./dist/src/utils/index.js"
|
|
117
|
-
},
|
|
118
|
-
"./dist/src/orchestrator": {
|
|
119
|
-
"types": "./dist/src/orchestrator/index.d.ts",
|
|
120
|
-
"import": "./dist/src/orchestrator/index.js",
|
|
121
|
-
"require": "./dist/src/orchestrator/index.js"
|
|
122
|
-
},
|
|
123
|
-
"./dist/src/orchestrator/types": {
|
|
124
|
-
"types": "./dist/src/orchestrator/types.d.ts",
|
|
125
|
-
"import": "./dist/src/orchestrator/types.js",
|
|
126
|
-
"require": "./dist/src/orchestrator/types.js"
|
|
127
|
-
},
|
|
128
|
-
"./dist/src/execution/compact": {
|
|
129
|
-
"types": "./dist/src/execution/compact.d.ts",
|
|
130
|
-
"import": "./dist/src/execution/compact.js",
|
|
131
|
-
"require": "./dist/src/execution/compact.js"
|
|
132
|
-
},
|
|
133
|
-
"./dist/src/execution/permit2": {
|
|
134
|
-
"types": "./dist/src/execution/permit2.d.ts",
|
|
135
|
-
"import": "./dist/src/execution/permit2.js",
|
|
136
|
-
"require": "./dist/src/execution/permit2.js"
|
|
137
|
-
},
|
|
138
|
-
"./dist/src/execution/singleChainOps": {
|
|
139
|
-
"types": "./dist/src/execution/singleChainOps.d.ts",
|
|
140
|
-
"import": "./dist/src/execution/singleChainOps.js",
|
|
141
|
-
"require": "./dist/src/execution/singleChainOps.js"
|
|
60
|
+
"import": "./dist/src/utils/index.js"
|
|
142
61
|
},
|
|
143
62
|
"./smart-sessions": {
|
|
144
63
|
"types": "./dist/src/modules/validators/smart-sessions.d.ts",
|
|
145
|
-
"import": "./dist/src/modules/validators/smart-sessions.js"
|
|
146
|
-
"require": "./dist/src/modules/validators/smart-sessions.js"
|
|
64
|
+
"import": "./dist/src/modules/validators/smart-sessions.js"
|
|
147
65
|
},
|
|
148
66
|
"./jwt-server": {
|
|
149
67
|
"types": "./dist/src/jwt-server/index.d.ts",
|
|
150
|
-
"import": "./dist/src/jwt-server/index.js"
|
|
151
|
-
"require": "./dist/src/jwt-server/index.js"
|
|
68
|
+
"import": "./dist/src/jwt-server/index.js"
|
|
152
69
|
}
|
|
153
70
|
},
|
|
154
71
|
"files": [
|