@rhinestone/sdk 0.2.1 → 0.3.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/README.md +4 -4
- package/dist/accounts/index.d.ts +15515 -4
- package/dist/accounts/index.d.ts.map +1 -1
- package/dist/accounts/index.js +69 -10
- package/dist/accounts/nexus.d.ts +15542 -32
- package/dist/accounts/nexus.d.ts.map +1 -1
- package/dist/accounts/nexus.js +86 -65
- package/dist/accounts/safe.d.ts +3 -1
- package/dist/accounts/safe.d.ts.map +1 -1
- package/dist/accounts/safe.js +8 -2
- package/dist/examples/abi/weth.d.ts +214 -0
- package/dist/examples/abi/weth.d.ts.map +1 -0
- package/dist/examples/abi/weth.js +279 -0
- package/dist/examples/cross-chain-ss.d.ts +1 -0
- package/dist/examples/cross-chain-ss.d.ts.map +1 -0
- package/dist/{example.js → examples/cross-chain-ss.js} +59 -22
- package/dist/examples/omni-account.d.ts +1 -0
- package/dist/examples/omni-account.d.ts.map +1 -0
- package/dist/examples/omni-account.js +169 -0
- package/dist/examples/smart-sessions.d.ts +1 -0
- package/dist/examples/smart-sessions.d.ts.map +1 -0
- package/dist/examples/smart-sessions.js +216 -0
- package/dist/execution/index.d.ts +28 -3
- package/dist/execution/index.d.ts.map +1 -1
- package/dist/execution/index.js +177 -47
- package/dist/execution/smart-session.d.ts +14 -0
- package/dist/execution/smart-session.d.ts.map +1 -0
- package/dist/execution/smart-session.js +83 -0
- package/dist/index.d.ts +15 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -10
- package/dist/modules/abi/smart-sessions.d.ts +42 -0
- package/dist/modules/abi/smart-sessions.d.ts.map +1 -0
- package/dist/modules/abi/smart-sessions.js +128 -0
- package/dist/modules/common.d.ts +16 -0
- package/dist/modules/common.d.ts.map +1 -0
- package/dist/modules/common.js +5 -0
- package/dist/modules/index.d.ts +7 -18
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +14 -119
- package/dist/modules/omni-account.d.ts +9 -0
- package/dist/modules/omni-account.d.ts.map +1 -0
- package/dist/modules/omni-account.js +7 -0
- package/dist/modules/validators.d.ts +31 -0
- package/dist/modules/validators.d.ts.map +1 -0
- package/dist/modules/validators.js +518 -0
- package/dist/orchestrator/client.d.ts +2 -5
- package/dist/orchestrator/client.d.ts.map +1 -1
- package/dist/orchestrator/consts.d.ts +3 -1
- package/dist/orchestrator/consts.d.ts.map +1 -1
- package/dist/orchestrator/consts.js +3 -1
- package/dist/orchestrator/index.d.ts +5 -3
- package/dist/orchestrator/index.d.ts.map +1 -1
- package/dist/orchestrator/index.js +5 -4
- package/dist/orchestrator/registry.d.ts +5 -0
- package/dist/orchestrator/registry.d.ts.map +1 -0
- package/dist/orchestrator/registry.js +187 -0
- package/dist/orchestrator/types.d.ts +39 -23
- package/dist/orchestrator/types.d.ts.map +1 -1
- package/dist/orchestrator/types.js +7 -6
- package/dist/orchestrator/utils.d.ts +8 -4
- package/dist/orchestrator/utils.d.ts.map +1 -1
- package/dist/orchestrator/utils.js +19 -5
- package/dist/types.d.ts +64 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/example.d.ts +0 -1
- package/dist/example.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../accounts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,KAAK,EASN,MAAM,MAAM,CAAA;AAEb,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAclD,iBAAe,aAAa,CAAC,MAAM,EAAE,uBAAuB;;;;;;;;;;;;;;GAS3D;AAED,iBAAe,UAAU,CAAC,MAAM,EAAE,uBAAuB,0BAgBxD;AAED,iBAAe,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,uBAAuB,oBAiBtE;AAED,iBAAe,YAAY,CACzB,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,KAAK,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA9Epq/B;AAED,iBAAe,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,0BAYhE;AAqDD,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,2BAA2B,EAC3B,IAAI,GACL,CAAA"}
|
package/dist/accounts/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { createPublicClient, http, createWalletClient, size, keccak256, encodePacked, slice, } from 'viem';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { createPublicClient, http, createWalletClient, size, keccak256, encodePacked, slice, concat, } from 'viem';
|
|
2
|
+
import { getWebauthnValidatorSignature, isRip7212SupportedNetwork, } from '../modules';
|
|
3
|
+
import { getOwnerValidator, getSmartSessionValidator, } from '../modules/validators';
|
|
4
|
+
import { getDeployArgs as getSafeDeployArgs, getSmartAccount as getSafeSmartAccount, get7702InitCalls as get7702SafeInitCalls, get7702SmartAccount as get7702SafeAccount, getSessionSmartAccount as getSafeSessionSmartAccount, } from './safe';
|
|
5
|
+
import { getDeployArgs as getNexusDeployArgs, getSmartAccount as getNexusSmartAccount, get7702InitCalls as get7702NexusInitCalls, get7702SmartAccount as get7702NexusAccount, getSessionSmartAccount as getNexusSessionSmartAccount, } from './nexus';
|
|
4
6
|
import { getBundlerClient } from './utils';
|
|
5
7
|
async function getDeployArgs(config) {
|
|
6
8
|
switch (config.account.type) {
|
|
@@ -42,12 +44,12 @@ async function isDeployed(chain, config) {
|
|
|
42
44
|
}
|
|
43
45
|
return size(code) > 0;
|
|
44
46
|
}
|
|
45
|
-
async function deploySource(
|
|
47
|
+
async function deploySource(chain, config) {
|
|
46
48
|
if (is7702(config)) {
|
|
47
49
|
return deploy7702Self(chain, config);
|
|
48
50
|
}
|
|
49
51
|
else {
|
|
50
|
-
return deployStandaloneSelf(
|
|
52
|
+
return deployStandaloneSelf(chain, config);
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
async function deployTarget(chain, config) {
|
|
@@ -97,7 +99,8 @@ async function deploy7702Self(chain, config) {
|
|
|
97
99
|
});
|
|
98
100
|
await publicClient.waitForTransactionReceipt({ hash });
|
|
99
101
|
}
|
|
100
|
-
async function deployStandaloneSelf(
|
|
102
|
+
async function deployStandaloneSelf(chain, config) {
|
|
103
|
+
const deployer = config.deployerAccount;
|
|
101
104
|
const { factory, factoryData } = await getDeployArgs(config);
|
|
102
105
|
const publicClient = createPublicClient({
|
|
103
106
|
chain: chain,
|
|
@@ -154,16 +157,62 @@ async function deploy7702WithBundler(chain, config) {
|
|
|
154
157
|
hash: opHash,
|
|
155
158
|
});
|
|
156
159
|
}
|
|
157
|
-
async function
|
|
160
|
+
async function getSmartAccount(config, client, chain) {
|
|
158
161
|
switch (config.account.type) {
|
|
159
162
|
case 'safe': {
|
|
160
|
-
return
|
|
163
|
+
return getSafeSmartAccount();
|
|
161
164
|
}
|
|
162
165
|
case 'nexus': {
|
|
163
|
-
|
|
166
|
+
const address = await getAddress(config);
|
|
167
|
+
const ownerValidator = getOwnerValidator(config);
|
|
168
|
+
const signFn = (hash) => sign(config.owners, chain, hash);
|
|
169
|
+
return getNexusSmartAccount(client, address, config.owners, ownerValidator.address, signFn);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
async function getSmartSessionSmartAccount(config, client, chain, session) {
|
|
174
|
+
switch (config.account.type) {
|
|
175
|
+
case 'safe': {
|
|
176
|
+
return getSafeSessionSmartAccount();
|
|
177
|
+
}
|
|
178
|
+
case 'nexus': {
|
|
179
|
+
const address = await getAddress(config);
|
|
180
|
+
const smartSessionValidator = getSmartSessionValidator(config);
|
|
181
|
+
if (!smartSessionValidator) {
|
|
182
|
+
throw new Error('Smart sessions are not enabled for this account');
|
|
183
|
+
}
|
|
184
|
+
const signFn = (hash) => sign(session.owners, chain, hash);
|
|
185
|
+
return getNexusSessionSmartAccount(client, address, session, smartSessionValidator.address, signFn);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
async function sign(validators, chain, hash) {
|
|
190
|
+
switch (validators.type) {
|
|
191
|
+
case 'ecdsa': {
|
|
192
|
+
const signatures = await Promise.all(validators.accounts.map((account) => signEcdsa(account, hash)));
|
|
193
|
+
return concat(signatures);
|
|
194
|
+
}
|
|
195
|
+
case 'passkey': {
|
|
196
|
+
return await signPasskey(validators.account, chain, hash);
|
|
164
197
|
}
|
|
165
198
|
}
|
|
166
199
|
}
|
|
200
|
+
async function signEcdsa(account, hash) {
|
|
201
|
+
if (!account.signMessage) {
|
|
202
|
+
throw new Error('Signing not supported for the account');
|
|
203
|
+
}
|
|
204
|
+
return await account.signMessage({ message: { raw: hash } });
|
|
205
|
+
}
|
|
206
|
+
async function signPasskey(account, chain, hash) {
|
|
207
|
+
const { webauthn, signature } = await account.sign({ hash });
|
|
208
|
+
const usePrecompiled = isRip7212SupportedNetwork(chain);
|
|
209
|
+
const encodedSignature = getWebauthnValidatorSignature({
|
|
210
|
+
webauthn,
|
|
211
|
+
signature,
|
|
212
|
+
usePrecompiled,
|
|
213
|
+
});
|
|
214
|
+
return encodedSignature;
|
|
215
|
+
}
|
|
167
216
|
async function get7702SmartAccount(config, client) {
|
|
168
217
|
if (!config.eoa) {
|
|
169
218
|
throw new Error('EIP-7702 accounts must have an EOA account');
|
|
@@ -177,7 +226,17 @@ async function get7702SmartAccount(config, client) {
|
|
|
177
226
|
}
|
|
178
227
|
}
|
|
179
228
|
}
|
|
229
|
+
async function get7702InitCalls(config) {
|
|
230
|
+
switch (config.account.type) {
|
|
231
|
+
case 'safe': {
|
|
232
|
+
return get7702SafeInitCalls();
|
|
233
|
+
}
|
|
234
|
+
case 'nexus': {
|
|
235
|
+
return get7702NexusInitCalls(config);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
180
239
|
function is7702(config) {
|
|
181
240
|
return config.eoa !== undefined;
|
|
182
241
|
}
|
|
183
|
-
export { getDeployArgs, getBundleInitCode, getAddress, isDeployed, deploySource, deployTarget, };
|
|
242
|
+
export { getDeployArgs, getBundleInitCode, getAddress, isDeployed, deploySource, deployTarget, getSmartAccount, getSmartSessionSmartAccount, sign, };
|