@slvr-labs/sdk 0.1.0 → 0.1.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.
Files changed (83) hide show
  1. package/README.md +42 -0
  2. package/dist/index.d.mts +2117 -0
  3. package/dist/index.d.ts +1903 -34
  4. package/dist/index.js +3091 -427
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +3035 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/package.json +19 -11
  9. package/skills/slvr-bot/SKILL.md +9 -8
  10. package/skills/slvr-bot/references/api.md +8 -0
  11. package/dist/connect.d.ts +0 -47
  12. package/dist/connect.d.ts.map +0 -1
  13. package/dist/connect.js +0 -56
  14. package/dist/connect.js.map +0 -1
  15. package/dist/contracts/autoCommit.d.ts +0 -151
  16. package/dist/contracts/autoCommit.d.ts.map +0 -1
  17. package/dist/contracts/autoCommit.js +0 -426
  18. package/dist/contracts/autoCommit.js.map +0 -1
  19. package/dist/contracts/hub.d.ts +0 -50
  20. package/dist/contracts/hub.d.ts.map +0 -1
  21. package/dist/contracts/hub.js +0 -118
  22. package/dist/contracts/hub.js.map +0 -1
  23. package/dist/contracts/index.d.ts +0 -8
  24. package/dist/contracts/index.d.ts.map +0 -1
  25. package/dist/contracts/index.js +0 -18
  26. package/dist/contracts/index.js.map +0 -1
  27. package/dist/contracts/jackpot.d.ts +0 -21
  28. package/dist/contracts/jackpot.d.ts.map +0 -1
  29. package/dist/contracts/jackpot.js +0 -44
  30. package/dist/contracts/jackpot.js.map +0 -1
  31. package/dist/contracts/lottery.d.ts +0 -256
  32. package/dist/contracts/lottery.d.ts.map +0 -1
  33. package/dist/contracts/lottery.js +0 -767
  34. package/dist/contracts/lottery.js.map +0 -1
  35. package/dist/contracts/registry.d.ts +0 -53
  36. package/dist/contracts/registry.d.ts.map +0 -1
  37. package/dist/contracts/registry.js +0 -143
  38. package/dist/contracts/registry.js.map +0 -1
  39. package/dist/contracts/staking.d.ts +0 -101
  40. package/dist/contracts/staking.d.ts.map +0 -1
  41. package/dist/contracts/staking.js +0 -306
  42. package/dist/contracts/staking.js.map +0 -1
  43. package/dist/contracts/token.d.ts +0 -95
  44. package/dist/contracts/token.d.ts.map +0 -1
  45. package/dist/contracts/token.js +0 -273
  46. package/dist/contracts/token.js.map +0 -1
  47. package/dist/deployments.d.ts +0 -117
  48. package/dist/deployments.d.ts.map +0 -1
  49. package/dist/deployments.js +0 -74
  50. package/dist/deployments.js.map +0 -1
  51. package/dist/errors.d.ts +0 -39
  52. package/dist/errors.d.ts.map +0 -1
  53. package/dist/errors.js +0 -67
  54. package/dist/errors.js.map +0 -1
  55. package/dist/ev.d.ts +0 -123
  56. package/dist/ev.d.ts.map +0 -1
  57. package/dist/ev.js +0 -111
  58. package/dist/ev.js.map +0 -1
  59. package/dist/events.d.ts +0 -418
  60. package/dist/events.d.ts.map +0 -1
  61. package/dist/events.js +0 -87
  62. package/dist/events.js.map +0 -1
  63. package/dist/index.d.ts.map +0 -1
  64. package/dist/oracle.d.ts +0 -48
  65. package/dist/oracle.d.ts.map +0 -1
  66. package/dist/oracle.js +0 -77
  67. package/dist/oracle.js.map +0 -1
  68. package/dist/price.d.ts +0 -52
  69. package/dist/price.d.ts.map +0 -1
  70. package/dist/price.js +0 -78
  71. package/dist/price.js.map +0 -1
  72. package/dist/transaction.d.ts +0 -54
  73. package/dist/transaction.d.ts.map +0 -1
  74. package/dist/transaction.js +0 -105
  75. package/dist/transaction.js.map +0 -1
  76. package/dist/types.d.ts +0 -162
  77. package/dist/types.d.ts.map +0 -1
  78. package/dist/types.js +0 -23
  79. package/dist/types.js.map +0 -1
  80. package/dist/utils.d.ts +0 -58
  81. package/dist/utils.d.ts.map +0 -1
  82. package/dist/utils.js +0 -110
  83. package/dist/utils.js.map +0 -1
@@ -1,95 +0,0 @@
1
- import { Address, PublicClient, WalletClient } from 'viem';
2
- /**
3
- * SlvrToken contract interface
4
- */
5
- export declare class SlvrToken {
6
- private publicClient;
7
- private walletClient?;
8
- private address;
9
- private static readonly ABI;
10
- constructor(publicClient: PublicClient, walletClient: WalletClient | undefined, address: Address);
11
- /**
12
- * Update the wallet client
13
- * @param walletClient New wallet client
14
- */
15
- setWalletClient(walletClient: WalletClient | undefined): void;
16
- /**
17
- * Get total supply
18
- */
19
- totalSupply(): Promise<bigint>;
20
- /**
21
- * Get balance of an account
22
- */
23
- balanceOf(account: Address): Promise<bigint>;
24
- /**
25
- * Get allowance
26
- */
27
- allowance(owner: Address, spender: Address): Promise<bigint>;
28
- /**
29
- * Get token name
30
- */
31
- name(): Promise<string>;
32
- /**
33
- * Get token symbol
34
- */
35
- symbol(): Promise<string>;
36
- /**
37
- * Get token decimals
38
- */
39
- decimals(): Promise<number>;
40
- /**
41
- * Get maximum supply
42
- */
43
- maxSupply(): Promise<bigint>;
44
- /**
45
- * Transfer tokens
46
- * @param to Recipient address
47
- * @param amount Amount to transfer
48
- * @returns Transaction hash
49
- * @throws WalletClientRequiredError if wallet client is not available
50
- * @throws ValidationError if inputs are invalid
51
- * @throws ContractCallError if contract call fails
52
- */
53
- transfer(to: Address, amount: bigint): Promise<`0x${string}`>;
54
- /**
55
- * Approve spender
56
- * @param spender Address to approve
57
- * @param amount Amount to approve
58
- * @returns Transaction hash
59
- * @throws WalletClientRequiredError if wallet client is not available
60
- * @throws ValidationError if inputs are invalid
61
- * @throws ContractCallError if contract call fails
62
- */
63
- approve(spender: Address, amount: bigint): Promise<`0x${string}`>;
64
- /**
65
- * Transfer from (requires approval)
66
- * @param from Sender address
67
- * @param to Recipient address
68
- * @param amount Amount to transfer
69
- * @returns Transaction hash
70
- * @throws WalletClientRequiredError if wallet client is not available
71
- * @throws ValidationError if inputs are invalid
72
- * @throws ContractCallError if contract call fails
73
- */
74
- transferFrom(from: Address, to: Address, amount: bigint): Promise<`0x${string}`>;
75
- /**
76
- * Burn tokens
77
- * @param amount Amount to burn
78
- * @returns Transaction hash
79
- * @throws WalletClientRequiredError if wallet client is not available
80
- * @throws ValidationError if amount is invalid
81
- * @throws ContractCallError if contract call fails
82
- */
83
- burn(amount: bigint): Promise<`0x${string}`>;
84
- /**
85
- * Burn tokens from account
86
- * @param account Account to burn from
87
- * @param amount Amount to burn
88
- * @returns Transaction hash
89
- * @throws WalletClientRequiredError if wallet client is not available
90
- * @throws ValidationError if inputs are invalid
91
- * @throws ContractCallError if contract call fails
92
- */
93
- burnFrom(account: Address, amount: bigint): Promise<`0x${string}`>;
94
- }
95
- //# sourceMappingURL=token.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../src/contracts/token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAIrE;;GAEG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,YAAY,CAAC,CAAe;IACpC,OAAO,CAAC,OAAO,CAAU;IAEzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAgBxB;gBAES,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,GAAG,SAAS,EAAE,OAAO,EAAE,OAAO;IAMhG;;;OAGG;IACH,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI;IAI7D;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAQpC;;OAEG;IACG,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IASlD;;OAEG;IACG,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IASlE;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAQ7B;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;IAQ/B;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAQjC;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IAQlC;;;;;;;;OAQG;IACG,QAAQ,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,MAAM,EAAE,CAAC;IAyBnE;;;;;;;;OAQG;IACG,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,MAAM,EAAE,CAAC;IAyBvE;;;;;;;;;OASG;IACG,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,MAAM,EAAE,CAAC;IA0BtF;;;;;;;OAOG;IACG,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,MAAM,EAAE,CAAC;IAwBlD;;;;;;;;OAQG;IACG,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,MAAM,EAAE,CAAC;CAwBzE"}
@@ -1,273 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SlvrToken = void 0;
4
- const viem_1 = require("viem");
5
- const errors_1 = require("../errors");
6
- const utils_1 = require("../utils");
7
- /**
8
- * SlvrToken contract interface
9
- */
10
- class SlvrToken {
11
- constructor(publicClient, walletClient, address) {
12
- this.publicClient = publicClient;
13
- this.walletClient = walletClient;
14
- this.address = address;
15
- }
16
- /**
17
- * Update the wallet client
18
- * @param walletClient New wallet client
19
- */
20
- setWalletClient(walletClient) {
21
- this.walletClient = walletClient;
22
- }
23
- /**
24
- * Get total supply
25
- */
26
- async totalSupply() {
27
- return await this.publicClient.readContract({
28
- address: this.address,
29
- abi: SlvrToken.ABI,
30
- functionName: 'totalSupply',
31
- });
32
- }
33
- /**
34
- * Get balance of an account
35
- */
36
- async balanceOf(account) {
37
- return await this.publicClient.readContract({
38
- address: this.address,
39
- abi: SlvrToken.ABI,
40
- functionName: 'balanceOf',
41
- args: [account],
42
- });
43
- }
44
- /**
45
- * Get allowance
46
- */
47
- async allowance(owner, spender) {
48
- return await this.publicClient.readContract({
49
- address: this.address,
50
- abi: SlvrToken.ABI,
51
- functionName: 'allowance',
52
- args: [owner, spender],
53
- });
54
- }
55
- /**
56
- * Get token name
57
- */
58
- async name() {
59
- return await this.publicClient.readContract({
60
- address: this.address,
61
- abi: SlvrToken.ABI,
62
- functionName: 'name',
63
- });
64
- }
65
- /**
66
- * Get token symbol
67
- */
68
- async symbol() {
69
- return await this.publicClient.readContract({
70
- address: this.address,
71
- abi: SlvrToken.ABI,
72
- functionName: 'symbol',
73
- });
74
- }
75
- /**
76
- * Get token decimals
77
- */
78
- async decimals() {
79
- return await this.publicClient.readContract({
80
- address: this.address,
81
- abi: SlvrToken.ABI,
82
- functionName: 'decimals',
83
- });
84
- }
85
- /**
86
- * Get maximum supply
87
- */
88
- async maxSupply() {
89
- return await this.publicClient.readContract({
90
- address: this.address,
91
- abi: SlvrToken.ABI,
92
- functionName: 'MAX_SUPPLY',
93
- });
94
- }
95
- /**
96
- * Transfer tokens
97
- * @param to Recipient address
98
- * @param amount Amount to transfer
99
- * @returns Transaction hash
100
- * @throws WalletClientRequiredError if wallet client is not available
101
- * @throws ValidationError if inputs are invalid
102
- * @throws ContractCallError if contract call fails
103
- */
104
- async transfer(to, amount) {
105
- if (!this.walletClient) {
106
- throw new errors_1.WalletClientRequiredError('transferring');
107
- }
108
- const recipient = (0, utils_1.validateAddress)(to, 'recipient');
109
- (0, utils_1.validateAmount)(amount, 'transfer amount');
110
- try {
111
- return await this.walletClient.writeContract({
112
- address: this.address,
113
- abi: SlvrToken.ABI,
114
- functionName: 'transfer',
115
- args: [recipient, amount],
116
- account: this.walletClient.account,
117
- chain: null,
118
- });
119
- }
120
- catch (error) {
121
- if (error instanceof errors_1.WalletClientRequiredError || error instanceof errors_1.ContractCallError) {
122
- throw error;
123
- }
124
- throw new errors_1.ContractCallError(`Failed to transfer: ${error instanceof Error ? error.message : String(error)}`, error);
125
- }
126
- }
127
- /**
128
- * Approve spender
129
- * @param spender Address to approve
130
- * @param amount Amount to approve
131
- * @returns Transaction hash
132
- * @throws WalletClientRequiredError if wallet client is not available
133
- * @throws ValidationError if inputs are invalid
134
- * @throws ContractCallError if contract call fails
135
- */
136
- async approve(spender, amount) {
137
- if (!this.walletClient) {
138
- throw new errors_1.WalletClientRequiredError('approving');
139
- }
140
- const spenderAddress = (0, utils_1.validateAddress)(spender, 'spender');
141
- (0, utils_1.validateAmount)(amount, 'approval amount');
142
- try {
143
- return await this.walletClient.writeContract({
144
- address: this.address,
145
- abi: SlvrToken.ABI,
146
- functionName: 'approve',
147
- args: [spenderAddress, amount],
148
- account: this.walletClient.account,
149
- chain: null,
150
- });
151
- }
152
- catch (error) {
153
- if (error instanceof errors_1.WalletClientRequiredError || error instanceof errors_1.ContractCallError) {
154
- throw error;
155
- }
156
- throw new errors_1.ContractCallError(`Failed to approve: ${error instanceof Error ? error.message : String(error)}`, error);
157
- }
158
- }
159
- /**
160
- * Transfer from (requires approval)
161
- * @param from Sender address
162
- * @param to Recipient address
163
- * @param amount Amount to transfer
164
- * @returns Transaction hash
165
- * @throws WalletClientRequiredError if wallet client is not available
166
- * @throws ValidationError if inputs are invalid
167
- * @throws ContractCallError if contract call fails
168
- */
169
- async transferFrom(from, to, amount) {
170
- if (!this.walletClient) {
171
- throw new errors_1.WalletClientRequiredError('transferFrom');
172
- }
173
- const fromAddress = (0, utils_1.validateAddress)(from, 'from');
174
- const toAddress = (0, utils_1.validateAddress)(to, 'to');
175
- (0, utils_1.validateAmount)(amount, 'transfer amount');
176
- try {
177
- return await this.walletClient.writeContract({
178
- address: this.address,
179
- abi: SlvrToken.ABI,
180
- functionName: 'transferFrom',
181
- args: [fromAddress, toAddress, amount],
182
- account: this.walletClient.account,
183
- chain: null,
184
- });
185
- }
186
- catch (error) {
187
- if (error instanceof errors_1.WalletClientRequiredError || error instanceof errors_1.ContractCallError) {
188
- throw error;
189
- }
190
- throw new errors_1.ContractCallError(`Failed to transferFrom: ${error instanceof Error ? error.message : String(error)}`, error);
191
- }
192
- }
193
- /**
194
- * Burn tokens
195
- * @param amount Amount to burn
196
- * @returns Transaction hash
197
- * @throws WalletClientRequiredError if wallet client is not available
198
- * @throws ValidationError if amount is invalid
199
- * @throws ContractCallError if contract call fails
200
- */
201
- async burn(amount) {
202
- if (!this.walletClient) {
203
- throw new errors_1.WalletClientRequiredError('burning');
204
- }
205
- (0, utils_1.validateAmount)(amount, 'burn amount');
206
- try {
207
- return await this.walletClient.writeContract({
208
- address: this.address,
209
- abi: SlvrToken.ABI,
210
- functionName: 'burn',
211
- args: [amount],
212
- account: this.walletClient.account,
213
- chain: null,
214
- });
215
- }
216
- catch (error) {
217
- if (error instanceof errors_1.WalletClientRequiredError || error instanceof errors_1.ContractCallError) {
218
- throw error;
219
- }
220
- throw new errors_1.ContractCallError(`Failed to burn: ${error instanceof Error ? error.message : String(error)}`, error);
221
- }
222
- }
223
- /**
224
- * Burn tokens from account
225
- * @param account Account to burn from
226
- * @param amount Amount to burn
227
- * @returns Transaction hash
228
- * @throws WalletClientRequiredError if wallet client is not available
229
- * @throws ValidationError if inputs are invalid
230
- * @throws ContractCallError if contract call fails
231
- */
232
- async burnFrom(account, amount) {
233
- if (!this.walletClient) {
234
- throw new errors_1.WalletClientRequiredError('burnFrom');
235
- }
236
- const accountAddress = (0, utils_1.validateAddress)(account, 'account');
237
- (0, utils_1.validateAmount)(amount, 'burn amount');
238
- try {
239
- return await this.walletClient.writeContract({
240
- address: this.address,
241
- abi: SlvrToken.ABI,
242
- functionName: 'burnFrom',
243
- args: [accountAddress, amount],
244
- account: this.walletClient.account,
245
- chain: null,
246
- });
247
- }
248
- catch (error) {
249
- if (error instanceof errors_1.WalletClientRequiredError || error instanceof errors_1.ContractCallError) {
250
- throw error;
251
- }
252
- throw new errors_1.ContractCallError(`Failed to burnFrom: ${error instanceof Error ? error.message : String(error)}`, error);
253
- }
254
- }
255
- }
256
- exports.SlvrToken = SlvrToken;
257
- SlvrToken.ABI = (0, viem_1.parseAbi)([
258
- // ERC20 standard functions
259
- 'function totalSupply() view returns (uint256)',
260
- 'function balanceOf(address account) view returns (uint256)',
261
- 'function transfer(address to, uint256 amount) returns (bool)',
262
- 'function allowance(address owner, address spender) view returns (uint256)',
263
- 'function approve(address spender, uint256 amount) returns (bool)',
264
- 'function transferFrom(address from, address to, uint256 amount) returns (bool)',
265
- // SlvrToken specific
266
- 'function name() view returns (string)',
267
- 'function symbol() view returns (string)',
268
- 'function decimals() view returns (uint8)',
269
- 'function MAX_SUPPLY() view returns (uint256)',
270
- 'function burn(uint256 amount)',
271
- 'function burnFrom(address account, uint256 amount)',
272
- ]);
273
- //# sourceMappingURL=token.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"token.js","sourceRoot":"","sources":["../../src/contracts/token.ts"],"names":[],"mappings":";;;AAAA,+BAAqE;AACrE,sCAAyE;AACzE,oCAA2D;AAE3D;;GAEG;AACH,MAAa,SAAS;IAuBpB,YAAY,YAA0B,EAAE,YAAsC,EAAE,OAAgB;QAC9F,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;OAGG;IACH,eAAe,CAAC,YAAsC;QACpD,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW;QACf,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC;YAC1C,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,GAAG,EAAE,SAAS,CAAC,GAAG;YAClB,YAAY,EAAE,aAAa;SAC5B,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,SAAS,CAAC,OAAgB;QAC9B,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CAAC;;AA5RH,8BA6RC;AAxRyB,aAAG,GAAG,IAAA,eAAQ,EAAC;IACrC,2BAA2B;IAC3B,+CAA+C;IAC/C,4DAA4D;IAC5D,8DAA8D;IAC9D,2EAA2E;IAC3E,kEAAkE;IAClE,gFAAgF;IAEhF,qBAAqB;IACrB,uCAAuC;IACvC,yCAAyC;IACzC,0CAA0C;IAC1C,8CAA8C;IAC9C,+BAA+B;IAC/B,oDAAoD;CACrD,CAAC,CAAC"}
@@ -1,117 +0,0 @@
1
- import { Address } from 'viem';
2
- /**
3
- * A known Slvr deployment: chain metadata plus the on-chain addresses the SDK needs.
4
- *
5
- * Addresses mirror the canonical values the production interface ships
6
- * (`interface/config/constants.ts`). `hub`, `registry`, and `jackpot` are only
7
- * present on deployments that run the emission/sink hub architecture — they are
8
- * omitted here for deployments that don't, and the corresponding `sdk.hub` /
9
- * `sdk.registry` / `sdk.jackpot` bindings will be `undefined`.
10
- */
11
- export interface SlvrDeployment {
12
- /** EVM chain id */
13
- chainId: number;
14
- /** Human-readable network name */
15
- name: string;
16
- /** Default JSON-RPC endpoint */
17
- rpcUrl: string;
18
- /** Block explorer base URL, if any */
19
- blockExplorer?: string;
20
- /** Goldsky/hosted subgraph GraphQL endpoint, if any */
21
- subgraphUrl?: string;
22
- /** Contract addresses, shaped to drop straight into `new SlvrSDK({ addresses })` */
23
- addresses: {
24
- /** SlvrGridLottery */
25
- lottery: Address;
26
- /** SlvrVoteEscrowStaking (the veNFT staker) */
27
- staking: Address;
28
- /** SlvrToken (ERC20) */
29
- token: Address;
30
- /** SlvrAutoCommitV2 (optional) */
31
- autoCommit?: Address;
32
- /** SlvrVoteEscrow NFT — needed to approve/own the tokenIds you stake (optional) */
33
- voteEscrow?: Address;
34
- /** SLVR/ETH UniswapV2 pair — enables SLVR price reads via `sdk.price` (optional) */
35
- slvrEthPair?: Address;
36
- /**
37
- * Chainlink-style ETH/USD feed — enables USD prices via `sdk.ethUsd` (optional).
38
- * Absent on deployments (like Robinhood Chain) that have no on-chain feed.
39
- */
40
- chainlinkEthUsd?: Address;
41
- /** Multicall3 — lets the SDK batch multi-square reads into a single RPC call (optional). */
42
- multicall3?: Address;
43
- /** SlvrHub emission/sink router (optional; only on hub deployments) */
44
- hub?: Address;
45
- /** SlvrGameRegistry (optional; only on hub deployments) */
46
- registry?: Address;
47
- /** SlvrJackpot (optional; only on hub deployments) */
48
- jackpot?: Address;
49
- };
50
- }
51
- /**
52
- * Robinhood Chain mainnet — the canonical production Slvr deployment.
53
- *
54
- * Addresses populated from `DeployRobinhood.s.sol` (2026-07-09); `autoCommit`
55
- * is SlvrAutoCommitV2. The live deployment does not run the hub architecture,
56
- * so `hub`/`registry`/`jackpot` are intentionally absent.
57
- */
58
- export declare const robinhood: SlvrDeployment;
59
- /**
60
- * All known Slvr deployments, keyed by a short network slug.
61
- *
62
- * @example
63
- * ```typescript
64
- * import { deployments } from '@slvr-labs/sdk';
65
- * const { addresses, rpcUrl } = deployments.robinhood;
66
- * ```
67
- */
68
- export declare const deployments: {
69
- readonly robinhood: SlvrDeployment;
70
- };
71
- /**
72
- * A ready-to-use viem `Chain` for Robinhood Chain mainnet, so you don't have to
73
- * hand-roll `defineChain`.
74
- *
75
- * @example
76
- * ```typescript
77
- * import { createPublicClient, http } from 'viem';
78
- * import { robinhoodChain } from '@slvr-labs/sdk';
79
- *
80
- * const publicClient = createPublicClient({ chain: robinhoodChain, transport: http() });
81
- * ```
82
- */
83
- export declare const robinhoodChain: {
84
- blockExplorers: {
85
- readonly default: {
86
- readonly name: "Blockscout";
87
- readonly url: "https://robinhoodchain.blockscout.com";
88
- };
89
- };
90
- blockTime?: number | undefined | undefined;
91
- contracts: {
92
- readonly multicall3: {
93
- readonly address: `0x${string}`;
94
- };
95
- };
96
- ensTlds?: readonly string[] | undefined;
97
- id: number;
98
- name: string;
99
- nativeCurrency: {
100
- readonly decimals: 18;
101
- readonly name: "Ether";
102
- readonly symbol: "ETH";
103
- };
104
- experimental_preconfirmationTime?: number | undefined | undefined;
105
- rpcUrls: {
106
- readonly default: {
107
- readonly http: readonly [string];
108
- };
109
- };
110
- sourceId?: number | undefined | undefined;
111
- testnet?: boolean | undefined | undefined;
112
- custom?: Record<string, unknown> | undefined;
113
- fees?: import("viem").ChainFees<undefined> | undefined;
114
- formatters?: undefined;
115
- serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
116
- };
117
- //# sourceMappingURL=deployments.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../src/deployments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,MAAM,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,SAAS,EAAE;QACT,sBAAsB;QACtB,OAAO,EAAE,OAAO,CAAC;QACjB,+CAA+C;QAC/C,OAAO,EAAE,OAAO,CAAC;QACjB,wBAAwB;QACxB,KAAK,EAAE,OAAO,CAAC;QACf,kCAAkC;QAClC,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,mFAAmF;QACnF,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,oFAAoF;QACpF,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB;;;WAGG;QACH,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,4FAA4F;QAC5F,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,uEAAuE;QACvE,GAAG,CAAC,EAAE,OAAO,CAAC;QACd,2DAA2D;QAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,sDAAsD;QACtD,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACH;AAED;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,EAAE,cAuBvB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW;;CAEd,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAczB,CAAC"}
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.robinhoodChain = exports.deployments = exports.robinhood = void 0;
4
- const viem_1 = require("viem");
5
- /**
6
- * Robinhood Chain mainnet — the canonical production Slvr deployment.
7
- *
8
- * Addresses populated from `DeployRobinhood.s.sol` (2026-07-09); `autoCommit`
9
- * is SlvrAutoCommitV2. The live deployment does not run the hub architecture,
10
- * so `hub`/`registry`/`jackpot` are intentionally absent.
11
- */
12
- exports.robinhood = {
13
- chainId: 4663,
14
- name: 'Robinhood Chain',
15
- rpcUrl: 'https://rpc.mainnet.chain.robinhood.com',
16
- blockExplorer: 'https://robinhoodchain.blockscout.com/',
17
- subgraphUrl: 'https://api.goldsky.com/api/public/project_cmre158qbffn101xe929tflsk/subgraphs/slvr-robinhood/1.2.0/gn',
18
- addresses: {
19
- lottery: '0x284Eb4016305Fa7FbC162Fb68F27227271001c7f',
20
- staking: '0xaF68598eBd245DC3cB92FF16E9Ba1814DD137200',
21
- token: '0x791229E3EbD6CFdC3D8157f48722684173C29aD9',
22
- autoCommit: '0x314c8D5755468224AC60c36FB5494F0D7D5Abb3B',
23
- voteEscrow: '0xd9b8FBD61033145c5496132153CE675756313B71',
24
- slvrEthPair: '0xe365b92239097Ed3322131411DbE15a5c4068eff',
25
- // Chainlink ETH/USD feed (standard AggregatorV3 proxy; "ETH / USD", 8 decimals).
26
- // Verified on-chain. There is also an SVR proxy at
27
- // 0x5058aDee53b04e374d8bEDbAD634Bc4778F50b22 with identical price data — that
28
- // one is for protocols integrating Chainlink SVR (OEV recapture); for plain
29
- // price reads the standard proxy below is the right choice.
30
- chainlinkEthUsd: '0x78F3556b67E17Df817D51Ef5a990cDaF09E8d3A9',
31
- // Multicall3 at its canonical cross-chain address (verified deployed on Robinhood Chain).
32
- multicall3: '0xcA11bde05977b3631167028862bE2a173976CA11',
33
- },
34
- };
35
- /**
36
- * All known Slvr deployments, keyed by a short network slug.
37
- *
38
- * @example
39
- * ```typescript
40
- * import { deployments } from '@slvr-labs/sdk';
41
- * const { addresses, rpcUrl } = deployments.robinhood;
42
- * ```
43
- */
44
- exports.deployments = {
45
- robinhood: exports.robinhood,
46
- };
47
- /**
48
- * A ready-to-use viem `Chain` for Robinhood Chain mainnet, so you don't have to
49
- * hand-roll `defineChain`.
50
- *
51
- * @example
52
- * ```typescript
53
- * import { createPublicClient, http } from 'viem';
54
- * import { robinhoodChain } from '@slvr-labs/sdk';
55
- *
56
- * const publicClient = createPublicClient({ chain: robinhoodChain, transport: http() });
57
- * ```
58
- */
59
- exports.robinhoodChain = (0, viem_1.defineChain)({
60
- id: exports.robinhood.chainId,
61
- name: exports.robinhood.name,
62
- nativeCurrency: { decimals: 18, name: 'Ether', symbol: 'ETH' },
63
- rpcUrls: { default: { http: [exports.robinhood.rpcUrl] } },
64
- blockExplorers: {
65
- default: { name: 'Blockscout', url: 'https://robinhoodchain.blockscout.com' },
66
- },
67
- // Registering Multicall3 lets viem batch reads: the SDK's multi-square reads
68
- // become one RPC call, and clients created with `batch: { multicall: true }`
69
- // auto-batch every concurrent read.
70
- contracts: {
71
- multicall3: { address: exports.robinhood.addresses.multicall3 },
72
- },
73
- });
74
- //# sourceMappingURL=deployments.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deployments.js","sourceRoot":"","sources":["../src/deployments.ts"],"names":[],"mappings":";;;AAAA,+BAA4C;AAoD5C;;;;;;GAMG;AACU,QAAA,SAAS,GAAmB;IACvC,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE,yCAAyC;IACjD,aAAa,EAAE,wCAAwC;IACvD,WAAW,EACT,wGAAwG;IAC1G,SAAS,EAAE;QACT,OAAO,EAAE,4CAA4C;QACrD,OAAO,EAAE,4CAA4C;QACrD,KAAK,EAAE,4CAA4C;QACnD,UAAU,EAAE,4CAA4C;QACxD,UAAU,EAAE,4CAA4C;QACxD,WAAW,EAAE,4CAA4C;QACzD,iFAAiF;QACjF,mDAAmD;QACnD,8EAA8E;QAC9E,4EAA4E;QAC5E,4DAA4D;QAC5D,eAAe,EAAE,4CAA4C;QAC7D,0FAA0F;QAC1F,UAAU,EAAE,4CAA4C;KACzD;CACF,CAAC;AAEF;;;;;;;;GAQG;AACU,QAAA,WAAW,GAAG;IACzB,SAAS,EAAT,iBAAS;CACD,CAAC;AAEX;;;;;;;;;;;GAWG;AACU,QAAA,cAAc,GAAG,IAAA,kBAAW,EAAC;IACxC,EAAE,EAAE,iBAAS,CAAC,OAAO;IACrB,IAAI,EAAE,iBAAS,CAAC,IAAI;IACpB,cAAc,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;IAC9D,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,iBAAS,CAAC,MAAM,CAAC,EAAE,EAAE;IAClD,cAAc,EAAE;QACd,OAAO,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,uCAAuC,EAAE;KAC9E;IACD,6EAA6E;IAC7E,6EAA6E;IAC7E,oCAAoC;IACpC,SAAS,EAAE;QACT,UAAU,EAAE,EAAE,OAAO,EAAE,iBAAS,CAAC,SAAS,CAAC,UAAW,EAAE;KACzD;CACF,CAAC,CAAC"}
package/dist/errors.d.ts DELETED
@@ -1,39 +0,0 @@
1
- /**
2
- * Custom error classes for the Slvr SDK
3
- */
4
- /**
5
- * Base error class for all SDK errors
6
- */
7
- export declare class SlvrSDKError extends Error {
8
- readonly code?: string | undefined;
9
- constructor(message: string, code?: string | undefined);
10
- }
11
- /**
12
- * Error thrown when wallet client is required but not provided
13
- */
14
- export declare class WalletClientRequiredError extends SlvrSDKError {
15
- constructor(operation: string);
16
- }
17
- /**
18
- * Error thrown when contract call fails
19
- */
20
- export declare class ContractCallError extends SlvrSDKError {
21
- readonly cause?: unknown | undefined;
22
- constructor(message: string, cause?: unknown | undefined);
23
- }
24
- /**
25
- * Error thrown when input validation fails
26
- */
27
- export declare class ValidationError extends SlvrSDKError {
28
- readonly field?: string | undefined;
29
- constructor(message: string, field?: string | undefined);
30
- }
31
- /**
32
- * Error thrown when transaction fails
33
- */
34
- export declare class TransactionError extends SlvrSDKError {
35
- readonly txHash?: `0x${string}` | undefined;
36
- readonly cause?: unknown | undefined;
37
- constructor(message: string, txHash?: `0x${string}` | undefined, cause?: unknown | undefined);
38
- }
39
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;aACQ,IAAI,CAAC,EAAE,MAAM;gBAA9C,OAAO,EAAE,MAAM,EAAkB,IAAI,CAAC,EAAE,MAAM,YAAA;CAK3D;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,YAAY;gBAC7C,SAAS,EAAE,MAAM;CAK9B;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;aACJ,KAAK,CAAC,EAAE,OAAO;gBAAhD,OAAO,EAAE,MAAM,EAAkB,KAAK,CAAC,EAAE,OAAO,YAAA;CAK7D;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,YAAY;aACF,KAAK,CAAC,EAAE,MAAM;gBAA/C,OAAO,EAAE,MAAM,EAAkB,KAAK,CAAC,EAAE,MAAM,YAAA;CAK5D;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;aAG9B,MAAM,CAAC,EAAE,KAAK,MAAM,EAAE;aACtB,KAAK,CAAC,EAAE,OAAO;gBAF/B,OAAO,EAAE,MAAM,EACC,MAAM,CAAC,EAAE,KAAK,MAAM,EAAE,YAAA,EACtB,KAAK,CAAC,EAAE,OAAO,YAAA;CAMlC"}