@rhinestone/sdk 1.0.0-alpha.1 → 1.0.0-alpha.10
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.map +1 -1
- package/dist/src/accounts/error.js +2 -0
- package/dist/src/accounts/index.d.ts +15 -8
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +204 -164
- package/dist/src/accounts/index.test.js +2 -2
- package/dist/src/accounts/kernel.d.ts +7 -9
- package/dist/src/accounts/kernel.d.ts.map +1 -1
- package/dist/src/accounts/kernel.js +0 -9
- package/dist/src/accounts/kernel.test.js +6 -6
- package/dist/src/accounts/nexus.d.ts +14 -13
- package/dist/src/accounts/nexus.d.ts.map +1 -1
- package/dist/src/accounts/nexus.js +91 -88
- package/dist/src/accounts/nexus.test.js +10 -10
- package/dist/src/accounts/safe.d.ts +4 -6
- package/dist/src/accounts/safe.d.ts.map +1 -1
- package/dist/src/accounts/safe.js +20 -30
- package/dist/src/accounts/safe.test.js +6 -6
- package/dist/src/accounts/startale.d.ts +20 -0
- package/dist/src/accounts/startale.d.ts.map +1 -0
- package/dist/src/accounts/startale.js +100 -0
- package/dist/src/accounts/startale.test.d.ts +2 -0
- package/dist/src/accounts/startale.test.d.ts.map +1 -0
- package/dist/src/accounts/startale.test.js +97 -0
- package/dist/src/accounts/utils.d.ts +4 -3
- package/dist/src/accounts/utils.d.ts.map +1 -1
- package/dist/src/accounts/utils.js +44 -0
- package/dist/src/actions/index.d.ts +17 -7
- package/dist/src/actions/index.d.ts.map +1 -1
- package/dist/src/actions/index.js +108 -15
- package/dist/src/actions/index.test.js +35 -17
- package/dist/src/actions/smart-session.d.ts +2 -2
- package/dist/src/actions/smart-session.d.ts.map +1 -1
- package/dist/src/execution/compact.d.ts +6 -3
- package/dist/src/execution/compact.d.ts.map +1 -1
- package/dist/src/execution/compact.js +44 -1
- package/dist/src/execution/error.d.ts +2 -9
- package/dist/src/execution/error.d.ts.map +1 -1
- package/dist/src/execution/error.js +4 -13
- package/dist/src/execution/index.d.ts +2 -3
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +34 -49
- package/dist/src/execution/smart-session.d.ts +1 -1
- package/dist/src/execution/smart-session.d.ts.map +1 -1
- package/dist/src/execution/smart-session.js +12 -17
- package/dist/src/execution/utils.d.ts +13 -11
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +141 -85
- package/dist/src/index.d.ts +14 -14
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +24 -20
- package/dist/src/modules/index.d.ts +3 -7
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +1 -10
- package/dist/src/modules/index.test.js +2 -2
- package/dist/src/modules/omni-account.d.ts +1 -4
- package/dist/src/modules/omni-account.d.ts.map +1 -1
- package/dist/src/modules/omni-account.js +2 -8
- package/dist/src/modules/read.d.ts +5 -6
- package/dist/src/modules/read.d.ts.map +1 -1
- package/dist/src/modules/read.js +6 -37
- package/dist/src/modules/validators/core.d.ts +6 -7
- package/dist/src/modules/validators/core.d.ts.map +1 -1
- package/dist/src/modules/validators/core.js +83 -8
- package/dist/src/modules/validators/core.test.js +4 -4
- package/dist/src/modules/validators/smart-sessions.d.ts +3 -3
- package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
- package/dist/src/modules/validators/smart-sessions.js +7 -6
- package/dist/src/modules/validators/smart-sessions.test.js +4 -4
- package/dist/src/orchestrator/client.d.ts +1 -0
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +136 -94
- package/dist/src/orchestrator/consts.d.ts +3 -3
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +4 -4
- package/dist/src/orchestrator/index.d.ts +2 -2
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +1 -7
- package/dist/src/orchestrator/registry.d.ts +31 -12
- package/dist/src/orchestrator/registry.d.ts.map +1 -1
- package/dist/src/orchestrator/registry.js +57 -380
- package/dist/src/orchestrator/registry.json +365 -0
- package/dist/src/orchestrator/registry.test.d.ts.map +1 -0
- package/dist/src/orchestrator/registry.test.js +137 -0
- package/dist/src/orchestrator/types.d.ts +69 -14
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/dist/src/orchestrator/utils.d.ts.map +1 -1
- package/dist/src/orchestrator/utils.js +2 -2
- package/dist/src/types.d.ts +41 -21
- package/dist/src/types.d.ts.map +1 -1
- package/dist/test/consts.d.ts +2 -2
- package/dist/test/consts.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src/actions/registry.d.ts +0 -7
- package/dist/src/actions/registry.d.ts.map +0 -1
- package/dist/src/actions/registry.js +0 -7
- package/dist/src/actions/registry.test.d.ts.map +0 -1
- package/dist/src/actions/registry.test.js +0 -25
- package/dist/src/modules/registry.d.ts +0 -13
- package/dist/src/modules/registry.d.ts.map +0 -1
- package/dist/src/modules/registry.js +0 -67
- /package/dist/src/{actions → orchestrator}/registry.test.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../orchestrator/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../orchestrator/utils.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAoB,MAAM,SAAS,CAAA;AAWzD,iBAAS,eAAe,CAAC,QAAQ,EAAE,QAAQ,iBA4F1C;AAED,iBAAS,mBAAmB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAwB1C;AAED,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -6,7 +6,7 @@ const viem_1 = require("viem");
|
|
|
6
6
|
function getClaimProofer(settlementSystem) {
|
|
7
7
|
switch (settlementSystem) {
|
|
8
8
|
case 'ACROSS':
|
|
9
|
-
return '
|
|
9
|
+
return '0x1636b30481Db91Bbc5818e65d3962838BdCd5569';
|
|
10
10
|
case 'SAME_CHAIN':
|
|
11
11
|
return viem_1.zeroAddress;
|
|
12
12
|
}
|
|
@@ -20,7 +20,7 @@ function getIntentOpHash(intentOp) {
|
|
|
20
20
|
name: 'The Compact',
|
|
21
21
|
version: '1',
|
|
22
22
|
chainId: BigInt(notarizedChainElement.chainId),
|
|
23
|
-
verifyingContract: '
|
|
23
|
+
verifyingContract: '0xAbd3388A633758D0Bae01Efb885EF1e87BD519a6',
|
|
24
24
|
},
|
|
25
25
|
types: {
|
|
26
26
|
MultichainCompact: [
|
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 { EnableSessionData } from './modules/validators/smart-sessions';
|
|
4
|
-
type AccountType = 'safe' | 'nexus' | 'kernel';
|
|
3
|
+
import type { EnableSessionData } from './modules/validators/smart-sessions';
|
|
4
|
+
type AccountType = 'safe' | 'nexus' | 'kernel' | 'startale';
|
|
5
5
|
interface AccountProviderConfig {
|
|
6
6
|
type: AccountType;
|
|
7
7
|
}
|
|
@@ -14,15 +14,24 @@ interface WebauthnValidatorConfig {
|
|
|
14
14
|
type: 'passkey';
|
|
15
15
|
account: WebAuthnAccount;
|
|
16
16
|
}
|
|
17
|
+
interface MultiFactorValidatorConfig {
|
|
18
|
+
type: 'multi-factor';
|
|
19
|
+
validators: (OwnableValidatorConfig | WebauthnValidatorConfig)[];
|
|
20
|
+
threshold?: number;
|
|
21
|
+
}
|
|
22
|
+
interface ProviderConfig {
|
|
23
|
+
type: 'alchemy';
|
|
24
|
+
apiKey: string;
|
|
25
|
+
}
|
|
17
26
|
interface BundlerConfig {
|
|
18
|
-
type: 'pimlico';
|
|
27
|
+
type: 'pimlico' | 'biconomy';
|
|
19
28
|
apiKey: string;
|
|
20
29
|
}
|
|
21
30
|
interface PaymasterConfig {
|
|
22
|
-
type: 'pimlico';
|
|
31
|
+
type: 'pimlico' | 'biconomy';
|
|
23
32
|
apiKey: string;
|
|
24
33
|
}
|
|
25
|
-
type OwnerSet = OwnableValidatorConfig | WebauthnValidatorConfig;
|
|
34
|
+
type OwnerSet = OwnableValidatorConfig | WebauthnValidatorConfig | MultiFactorValidatorConfig;
|
|
26
35
|
interface SudoPolicy {
|
|
27
36
|
type: 'sudo';
|
|
28
37
|
}
|
|
@@ -79,28 +88,26 @@ interface RhinestoneAccountConfig {
|
|
|
79
88
|
account?: AccountProviderConfig;
|
|
80
89
|
owners: OwnerSet;
|
|
81
90
|
rhinestoneApiKey: string;
|
|
82
|
-
deployerAccount?: Account;
|
|
83
91
|
sessions?: Session[];
|
|
84
92
|
recovery?: Recovery;
|
|
85
93
|
eoa?: Account;
|
|
86
|
-
provider?:
|
|
87
|
-
type: 'alchemy';
|
|
88
|
-
apiKey: string;
|
|
89
|
-
};
|
|
94
|
+
provider?: ProviderConfig;
|
|
90
95
|
bundler?: BundlerConfig;
|
|
91
96
|
paymaster?: PaymasterConfig;
|
|
92
97
|
}
|
|
93
|
-
|
|
94
|
-
|
|
98
|
+
type TokenSymbol = 'ETH' | 'WETH' | 'USDC' | 'USDT';
|
|
99
|
+
interface CallInput {
|
|
100
|
+
to: Address | TokenSymbol;
|
|
95
101
|
data?: Hex;
|
|
96
102
|
value?: bigint;
|
|
97
103
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
104
|
+
interface Call {
|
|
105
|
+
to: Address;
|
|
106
|
+
data: Hex;
|
|
107
|
+
value: bigint;
|
|
108
|
+
}
|
|
102
109
|
interface TokenRequest {
|
|
103
|
-
address: Address;
|
|
110
|
+
address: Address | TokenSymbol;
|
|
104
111
|
amount: bigint;
|
|
105
112
|
}
|
|
106
113
|
type OwnerSignerSet = {
|
|
@@ -111,6 +118,18 @@ type OwnerSignerSet = {
|
|
|
111
118
|
type: 'owner';
|
|
112
119
|
kind: 'passkey';
|
|
113
120
|
account: WebAuthnAccount;
|
|
121
|
+
} | {
|
|
122
|
+
type: 'owner';
|
|
123
|
+
kind: 'multi-factor';
|
|
124
|
+
validators: ({
|
|
125
|
+
type: 'ecdsa';
|
|
126
|
+
id: number | Hex;
|
|
127
|
+
accounts: Account[];
|
|
128
|
+
} | {
|
|
129
|
+
type: 'passkey';
|
|
130
|
+
id: number | Hex;
|
|
131
|
+
account: WebAuthnAccount;
|
|
132
|
+
})[];
|
|
114
133
|
};
|
|
115
134
|
interface SessionSignerSet {
|
|
116
135
|
type: 'session';
|
|
@@ -123,18 +142,19 @@ interface GuardiansSignerSet {
|
|
|
123
142
|
}
|
|
124
143
|
type SignerSet = OwnerSignerSet | SessionSignerSet | GuardiansSignerSet;
|
|
125
144
|
interface BaseTransaction {
|
|
126
|
-
calls:
|
|
127
|
-
tokenRequests
|
|
145
|
+
calls: CallInput[];
|
|
146
|
+
tokenRequests?: TokenRequest[];
|
|
128
147
|
gasLimit?: bigint;
|
|
129
148
|
signers?: SignerSet;
|
|
149
|
+
eip7702InitSignature?: Hex;
|
|
130
150
|
}
|
|
131
151
|
interface SameChainTransaction extends BaseTransaction {
|
|
132
152
|
chain: Chain;
|
|
133
153
|
}
|
|
134
154
|
interface CrossChainTransaction extends BaseTransaction {
|
|
135
|
-
|
|
155
|
+
sourceChains?: Chain[];
|
|
136
156
|
targetChain: Chain;
|
|
137
157
|
}
|
|
138
158
|
type Transaction = SameChainTransaction | CrossChainTransaction;
|
|
139
|
-
export type { AccountType, RhinestoneAccountConfig, AccountProviderConfig, BundlerConfig, PaymasterConfig, Transaction,
|
|
159
|
+
export type { AccountType, RhinestoneAccountConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, TokenSymbol, CallInput, Call, TokenRequest, OwnerSet, OwnableValidatorConfig, WebauthnValidatorConfig, MultiFactorValidatorConfig, SignerSet, Session, Recovery, Policy, UniversalActionPolicyParamCondition, };
|
|
140
160
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAE5E,KAAK,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAA;AAE3D,UAAU,qBAAqB;IAC7B,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,UAAU,sBAAsB;IAC9B,IAAI,EAAE,OAAO,CAAA;IACb,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,uBAAuB;IAC/B,IAAI,EAAE,SAAS,CAAA;IACf,OAAO,EAAE,eAAe,CAAA;CACzB;AAED,UAAU,0BAA0B;IAClC,IAAI,EAAE,cAAc,CAAA;IACpB,UAAU,EAAE,CAAC,sBAAsB,GAAG,uBAAuB,CAAC,EAAE,CAAA;IAChE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,SAAS,CAAA;IACf,MAAM,EAAE,MAAM,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K,EAAE,KAAK,CAAA;CACb;AAED,UAAU,qBAAsB,SAAQ,eAAe;IACrD,YAAY,CAAC,EAAE,KAAK,EAAE,CAAA;IACtB,WAAW,EAAE,KAAK,CAAA;CACnB;AAED,KAAK,WAAW,GAAG,oBAAoB,GAAG,qBAAqB,CAAA;AAE/D,YAAY,EACV,WAAW,EACX,uBAAuB,EACvB,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,eAAe,EACf,WAAW,EACX,WAAW,EACX,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,SAAS,EACT,OAAO,EACP,QAAQ,EACR,MAAM,EACN,mCAAmC,GACpC,CAAA"}
|
package/dist/test/consts.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WebAuthnAccount } from 'viem/account-abstraction';
|
|
2
|
-
import { Account } from 'viem/accounts';
|
|
1
|
+
import { type WebAuthnAccount } from 'viem/account-abstraction';
|
|
2
|
+
import { type Account } from 'viem/accounts';
|
|
3
3
|
declare const accountA: Account;
|
|
4
4
|
declare const accountB: Account;
|
|
5
5
|
declare const accountC: Account;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../test/consts.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../test/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,KAAK,OAAO,EAAuB,MAAM,eAAe,CAAA;AAEjE,QAAA,MAAM,QAAQ,EAAE,OAEf,CAAA;AACD,QAAA,MAAM,QAAQ,EAAE,OAEf,CAAA;AACD,QAAA,MAAM,QAAQ,EAAE,OAEf,CAAA;AACD,QAAA,MAAM,QAAQ,EAAE,OAEf,CAAA;AACD,QAAA,MAAM,cAAc,EAAE,eAMpB,CAAA;AAEF,QAAA,MAAM,YAAY,aAAa,CAAA;AAE/B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../actions/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAA;AAGtC,iBAAS,aAAa,CAAC,OAAO,EAAE,iBAAiB;;;EAEhD;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.test.d.ts","sourceRoot":"","sources":["../../../actions/registry.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const vitest_1 = require("vitest");
|
|
4
|
-
const consts_1 = require("../../test/consts");
|
|
5
|
-
const consts_2 = require("../../test/consts");
|
|
6
|
-
const __1 = require("..");
|
|
7
|
-
const registry_1 = require("./registry");
|
|
8
|
-
(0, vitest_1.describe)('Actions', async () => {
|
|
9
|
-
const rhinestoneAccount = await (0, __1.createRhinestoneAccount)({
|
|
10
|
-
owners: {
|
|
11
|
-
type: 'ecdsa',
|
|
12
|
-
accounts: [consts_2.accountA],
|
|
13
|
-
},
|
|
14
|
-
rhinestoneApiKey: consts_1.MOCK_API_KEY,
|
|
15
|
-
});
|
|
16
|
-
(0, vitest_1.describe)('Trust Attester', () => {
|
|
17
|
-
(0, vitest_1.test)('should return the correct call', () => {
|
|
18
|
-
const call = (0, registry_1.trustAttester)(rhinestoneAccount);
|
|
19
|
-
(0, vitest_1.expect)(call).toStrictEqual({
|
|
20
|
-
data: '0xf05c04e1000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000333034e9f539ce08819e12c1b8cb29084d0000000000000000000000006d0515e8e499468dce9583626f0ca15b887f9d03',
|
|
21
|
-
to: '0x000000000069e2a187aeffb852bf3ccdc95151b2',
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Address, PublicClient } from 'viem';
|
|
2
|
-
import { RhinestoneAccountConfig } from '../types';
|
|
3
|
-
declare function getAttesters(): {
|
|
4
|
-
list: Address[];
|
|
5
|
-
threshold: number;
|
|
6
|
-
};
|
|
7
|
-
declare function getTrustAttesterCall(config: RhinestoneAccountConfig): {
|
|
8
|
-
to: `0x${string}`;
|
|
9
|
-
data: `0x${string}`;
|
|
10
|
-
};
|
|
11
|
-
declare function getTrustedAttesters(client: PublicClient, account: Address): Promise<readonly Address[]>;
|
|
12
|
-
export { getTrustAttesterCall, getTrustedAttesters, getAttesters };
|
|
13
|
-
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../modules/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAsB,YAAY,EAAE,MAAM,MAAM,CAAA;AAEhE,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAQlD,iBAAS,YAAY,IAAI;IACvB,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB,CAKA;AAED,iBAAS,oBAAoB,CAAC,MAAM,EAAE,uBAAuB;;;EA0B5D;AAED,iBAAe,mBAAmB,CAChC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC,CAyB7B;AAED,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTrustAttesterCall = getTrustAttesterCall;
|
|
4
|
-
exports.getTrustedAttesters = getTrustedAttesters;
|
|
5
|
-
exports.getAttesters = getAttesters;
|
|
6
|
-
const viem_1 = require("viem");
|
|
7
|
-
const _1 = require(".");
|
|
8
|
-
const omni_account_1 = require("./omni-account");
|
|
9
|
-
function getAttesters() {
|
|
10
|
-
return {
|
|
11
|
-
list: [omni_account_1.RHINESTONE_ATTESTER_ADDRESS, omni_account_1.OMNI_ACCOUNT_MOCK_ATTESTER_ADDRESS],
|
|
12
|
-
threshold: 1,
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
function getTrustAttesterCall(config) {
|
|
16
|
-
const moduleSetup = (0, _1.getSetup)(config);
|
|
17
|
-
return {
|
|
18
|
-
to: omni_account_1.RHINESTONE_MODULE_REGISTRY_ADDRESS,
|
|
19
|
-
data: (0, viem_1.encodeFunctionData)({
|
|
20
|
-
abi: [
|
|
21
|
-
{
|
|
22
|
-
name: 'trustAttesters',
|
|
23
|
-
type: 'function',
|
|
24
|
-
inputs: [
|
|
25
|
-
{
|
|
26
|
-
name: 'threshold',
|
|
27
|
-
type: 'uint8',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: 'attesters',
|
|
31
|
-
type: 'address[]',
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
outputs: [],
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
functionName: 'trustAttesters',
|
|
38
|
-
args: [moduleSetup.threshold, moduleSetup.attesters],
|
|
39
|
-
}),
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
async function getTrustedAttesters(client, account) {
|
|
43
|
-
return await client.readContract({
|
|
44
|
-
address: omni_account_1.RHINESTONE_MODULE_REGISTRY_ADDRESS,
|
|
45
|
-
abi: [
|
|
46
|
-
{
|
|
47
|
-
type: 'function',
|
|
48
|
-
stateMutability: 'view',
|
|
49
|
-
name: 'findTrustedAttesters',
|
|
50
|
-
inputs: [
|
|
51
|
-
{
|
|
52
|
-
type: 'address',
|
|
53
|
-
name: 'smartAccount',
|
|
54
|
-
},
|
|
55
|
-
],
|
|
56
|
-
outputs: [
|
|
57
|
-
{
|
|
58
|
-
type: 'address[]',
|
|
59
|
-
name: 'attesters',
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
functionName: 'findTrustedAttesters',
|
|
65
|
-
args: [account],
|
|
66
|
-
});
|
|
67
|
-
}
|
|
File without changes
|