tempo.ts 0.4.3 → 0.4.4
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/viem/Actions/token.d.ts +12 -12
- package/dist/viem/Actions/token.js +12 -12
- package/dist/viem/Decorator.d.ts +9 -9
- package/dist/wagmi/Actions/token.d.ts +1 -1
- package/dist/wagmi/Actions/token.js +1 -1
- package/dist/wagmi/Connector.d.ts +4 -3
- package/dist/wagmi/Connector.d.ts.map +1 -1
- package/dist/wagmi/Connector.js +91 -5
- package/dist/wagmi/Connector.js.map +1 -1
- package/dist/wagmi/Hooks/token.d.ts +1 -1
- package/dist/wagmi/Hooks/token.js +1 -1
- package/package.json +1 -1
- package/src/viem/Actions/token.ts +12 -12
- package/src/viem/Decorator.ts +9 -9
- package/src/wagmi/Actions/token.ts +1 -1
- package/src/wagmi/Connector.ts +125 -10
- package/src/wagmi/Hooks/token.ts +1 -1
|
@@ -4333,7 +4333,7 @@ export declare namespace getMetadata {
|
|
|
4333
4333
|
* })
|
|
4334
4334
|
*
|
|
4335
4335
|
* const adminRole = await Actions.token.getRoleAdmin(client, {
|
|
4336
|
-
* role: '
|
|
4336
|
+
* role: 'issuer',
|
|
4337
4337
|
* token: '0x...',
|
|
4338
4338
|
* })
|
|
4339
4339
|
* ```
|
|
@@ -4521,7 +4521,7 @@ export declare namespace grantRoles {
|
|
|
4521
4521
|
* actions.token.grantRoles.call({
|
|
4522
4522
|
* token: '0x20c0...babe',
|
|
4523
4523
|
* to: '0x20c0...beef',
|
|
4524
|
-
* role: '
|
|
4524
|
+
* role: 'issuer',
|
|
4525
4525
|
* }),
|
|
4526
4526
|
* ]
|
|
4527
4527
|
* })
|
|
@@ -5402,7 +5402,7 @@ export declare namespace grantRoles {
|
|
|
5402
5402
|
* const result = await Actions.token.grantRolesSync(client, {
|
|
5403
5403
|
* token: '0x...',
|
|
5404
5404
|
* to: '0x...',
|
|
5405
|
-
* roles: ['
|
|
5405
|
+
* roles: ['issuer'],
|
|
5406
5406
|
* })
|
|
5407
5407
|
* ```
|
|
5408
5408
|
*
|
|
@@ -7374,7 +7374,7 @@ export declare namespace pauseSync {
|
|
|
7374
7374
|
*
|
|
7375
7375
|
* const result = await Actions.token.renounceRoles(client, {
|
|
7376
7376
|
* token: '0x...',
|
|
7377
|
-
* roles: ['
|
|
7377
|
+
* roles: ['issuer'],
|
|
7378
7378
|
* })
|
|
7379
7379
|
* ```
|
|
7380
7380
|
*
|
|
@@ -7421,7 +7421,7 @@ export declare namespace renounceRoles {
|
|
|
7421
7421
|
* calls: [
|
|
7422
7422
|
* actions.token.renounceRoles.call({
|
|
7423
7423
|
* token: '0x20c0...babe',
|
|
7424
|
-
* role: '
|
|
7424
|
+
* role: 'issuer',
|
|
7425
7425
|
* }),
|
|
7426
7426
|
* ]
|
|
7427
7427
|
* })
|
|
@@ -8298,7 +8298,7 @@ export declare namespace renounceRoles {
|
|
|
8298
8298
|
*
|
|
8299
8299
|
* const result = await Actions.token.renounceRolesSync(client, {
|
|
8300
8300
|
* token: '0x...',
|
|
8301
|
-
* roles: ['
|
|
8301
|
+
* roles: ['issuer'],
|
|
8302
8302
|
* })
|
|
8303
8303
|
* ```
|
|
8304
8304
|
*
|
|
@@ -8338,7 +8338,7 @@ export declare namespace renounceRolesSync {
|
|
|
8338
8338
|
* const result = await Actions.token.revokeRoles(client, {
|
|
8339
8339
|
* token: '0x...',
|
|
8340
8340
|
* from: '0x...',
|
|
8341
|
-
* roles: ['
|
|
8341
|
+
* roles: ['issuer'],
|
|
8342
8342
|
* })
|
|
8343
8343
|
* ```
|
|
8344
8344
|
*
|
|
@@ -8388,7 +8388,7 @@ export declare namespace revokeRoles {
|
|
|
8388
8388
|
* actions.token.revokeRoles.call({
|
|
8389
8389
|
* token: '0x20c0...babe',
|
|
8390
8390
|
* from: '0x20c0...beef',
|
|
8391
|
-
* role: '
|
|
8391
|
+
* role: 'issuer',
|
|
8392
8392
|
* }),
|
|
8393
8393
|
* ]
|
|
8394
8394
|
* })
|
|
@@ -9269,7 +9269,7 @@ export declare namespace revokeRoles {
|
|
|
9269
9269
|
* const result = await Actions.token.revokeRolesSync(client, {
|
|
9270
9270
|
* token: '0x...',
|
|
9271
9271
|
* from: '0x...',
|
|
9272
|
-
* roles: ['
|
|
9272
|
+
* roles: ['issuer'],
|
|
9273
9273
|
* })
|
|
9274
9274
|
* ```
|
|
9275
9275
|
*
|
|
@@ -10267,7 +10267,7 @@ export declare namespace setSupplyCapSync {
|
|
|
10267
10267
|
*
|
|
10268
10268
|
* const result = await Actions.token.setRoleAdmin(client, {
|
|
10269
10269
|
* token: '0x...',
|
|
10270
|
-
* role: '
|
|
10270
|
+
* role: 'issuer',
|
|
10271
10271
|
* adminRole: 'admin',
|
|
10272
10272
|
* })
|
|
10273
10273
|
* ```
|
|
@@ -10314,7 +10314,7 @@ export declare namespace setRoleAdmin {
|
|
|
10314
10314
|
* calls: [
|
|
10315
10315
|
* actions.token.setRoleAdmin.call({
|
|
10316
10316
|
* token: '0x20c0...babe',
|
|
10317
|
-
* role: '
|
|
10317
|
+
* role: 'issuer',
|
|
10318
10318
|
* adminRole: 'admin',
|
|
10319
10319
|
* }),
|
|
10320
10320
|
* ]
|
|
@@ -11195,7 +11195,7 @@ export declare namespace setRoleAdmin {
|
|
|
11195
11195
|
*
|
|
11196
11196
|
* const result = await Actions.token.setRoleAdminSync(client, {
|
|
11197
11197
|
* token: '0x...',
|
|
11198
|
-
* role: '
|
|
11198
|
+
* role: 'issuer',
|
|
11199
11199
|
* adminRole: 'admin',
|
|
11200
11200
|
* })
|
|
11201
11201
|
* ```
|
|
@@ -962,7 +962,7 @@ export async function getMetadata(client, parameters) {
|
|
|
962
962
|
* })
|
|
963
963
|
*
|
|
964
964
|
* const adminRole = await Actions.token.getRoleAdmin(client, {
|
|
965
|
-
* role: '
|
|
965
|
+
* role: 'issuer',
|
|
966
966
|
* token: '0x...',
|
|
967
967
|
* })
|
|
968
968
|
* ```
|
|
@@ -1117,7 +1117,7 @@ export async function grantRoles(client, parameters) {
|
|
|
1117
1117
|
* actions.token.grantRoles.call({
|
|
1118
1118
|
* token: '0x20c0...babe',
|
|
1119
1119
|
* to: '0x20c0...beef',
|
|
1120
|
-
* role: '
|
|
1120
|
+
* role: 'issuer',
|
|
1121
1121
|
* }),
|
|
1122
1122
|
* ]
|
|
1123
1123
|
* })
|
|
@@ -1174,7 +1174,7 @@ export async function grantRoles(client, parameters) {
|
|
|
1174
1174
|
* const result = await Actions.token.grantRolesSync(client, {
|
|
1175
1175
|
* token: '0x...',
|
|
1176
1176
|
* to: '0x...',
|
|
1177
|
-
* roles: ['
|
|
1177
|
+
* roles: ['issuer'],
|
|
1178
1178
|
* })
|
|
1179
1179
|
* ```
|
|
1180
1180
|
*
|
|
@@ -1496,7 +1496,7 @@ export async function pauseSync(client, parameters) {
|
|
|
1496
1496
|
*
|
|
1497
1497
|
* const result = await Actions.token.renounceRoles(client, {
|
|
1498
1498
|
* token: '0x...',
|
|
1499
|
-
* roles: ['
|
|
1499
|
+
* roles: ['issuer'],
|
|
1500
1500
|
* })
|
|
1501
1501
|
* ```
|
|
1502
1502
|
*
|
|
@@ -1545,7 +1545,7 @@ export async function renounceRoles(client, parameters) {
|
|
|
1545
1545
|
* calls: [
|
|
1546
1546
|
* actions.token.renounceRoles.call({
|
|
1547
1547
|
* token: '0x20c0...babe',
|
|
1548
|
-
* role: '
|
|
1548
|
+
* role: 'issuer',
|
|
1549
1549
|
* }),
|
|
1550
1550
|
* ]
|
|
1551
1551
|
* })
|
|
@@ -1601,7 +1601,7 @@ export async function renounceRoles(client, parameters) {
|
|
|
1601
1601
|
*
|
|
1602
1602
|
* const result = await Actions.token.renounceRolesSync(client, {
|
|
1603
1603
|
* token: '0x...',
|
|
1604
|
-
* roles: ['
|
|
1604
|
+
* roles: ['issuer'],
|
|
1605
1605
|
* })
|
|
1606
1606
|
* ```
|
|
1607
1607
|
*
|
|
@@ -1641,7 +1641,7 @@ export async function renounceRolesSync(client, parameters) {
|
|
|
1641
1641
|
* const result = await Actions.token.revokeRoles(client, {
|
|
1642
1642
|
* token: '0x...',
|
|
1643
1643
|
* from: '0x...',
|
|
1644
|
-
* roles: ['
|
|
1644
|
+
* roles: ['issuer'],
|
|
1645
1645
|
* })
|
|
1646
1646
|
* ```
|
|
1647
1647
|
*
|
|
@@ -1691,7 +1691,7 @@ export async function revokeRoles(client, parameters) {
|
|
|
1691
1691
|
* actions.token.revokeRoles.call({
|
|
1692
1692
|
* token: '0x20c0...babe',
|
|
1693
1693
|
* from: '0x20c0...beef',
|
|
1694
|
-
* role: '
|
|
1694
|
+
* role: 'issuer',
|
|
1695
1695
|
* }),
|
|
1696
1696
|
* ]
|
|
1697
1697
|
* })
|
|
@@ -1748,7 +1748,7 @@ export async function revokeRoles(client, parameters) {
|
|
|
1748
1748
|
* const result = await Actions.token.revokeRolesSync(client, {
|
|
1749
1749
|
* token: '0x...',
|
|
1750
1750
|
* from: '0x...',
|
|
1751
|
-
* roles: ['
|
|
1751
|
+
* roles: ['issuer'],
|
|
1752
1752
|
* })
|
|
1753
1753
|
* ```
|
|
1754
1754
|
*
|
|
@@ -1925,7 +1925,7 @@ export async function setSupplyCapSync(client, parameters) {
|
|
|
1925
1925
|
*
|
|
1926
1926
|
* const result = await Actions.token.setRoleAdmin(client, {
|
|
1927
1927
|
* token: '0x...',
|
|
1928
|
-
* role: '
|
|
1928
|
+
* role: 'issuer',
|
|
1929
1929
|
* adminRole: 'admin',
|
|
1930
1930
|
* })
|
|
1931
1931
|
* ```
|
|
@@ -1971,7 +1971,7 @@ export async function setRoleAdmin(client, parameters) {
|
|
|
1971
1971
|
* calls: [
|
|
1972
1972
|
* actions.token.setRoleAdmin.call({
|
|
1973
1973
|
* token: '0x20c0...babe',
|
|
1974
|
-
* role: '
|
|
1974
|
+
* role: 'issuer',
|
|
1975
1975
|
* adminRole: 'admin',
|
|
1976
1976
|
* }),
|
|
1977
1977
|
* ]
|
|
@@ -2029,7 +2029,7 @@ export async function setRoleAdmin(client, parameters) {
|
|
|
2029
2029
|
*
|
|
2030
2030
|
* const result = await Actions.token.setRoleAdminSync(client, {
|
|
2031
2031
|
* token: '0x...',
|
|
2032
|
-
* role: '
|
|
2032
|
+
* role: 'issuer',
|
|
2033
2033
|
* adminRole: 'admin',
|
|
2034
2034
|
* })
|
|
2035
2035
|
* ```
|
package/dist/viem/Decorator.d.ts
CHANGED
|
@@ -2030,7 +2030,7 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
|
|
|
2030
2030
|
* }).extend(tempoActions())
|
|
2031
2031
|
*
|
|
2032
2032
|
* const adminRole = await client.token.getRoleAdmin({
|
|
2033
|
-
* role: '
|
|
2033
|
+
* role: 'issuer',
|
|
2034
2034
|
* token: '0x...',
|
|
2035
2035
|
* })
|
|
2036
2036
|
* ```
|
|
@@ -2086,7 +2086,7 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
|
|
|
2086
2086
|
* const hash = await client.token.grantRoles({
|
|
2087
2087
|
* token: '0x...',
|
|
2088
2088
|
* to: '0x...',
|
|
2089
|
-
* roles: ['
|
|
2089
|
+
* roles: ['issuer'],
|
|
2090
2090
|
* })
|
|
2091
2091
|
* ```
|
|
2092
2092
|
*
|
|
@@ -2114,7 +2114,7 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
|
|
|
2114
2114
|
* const result = await client.token.grantRolesSync({
|
|
2115
2115
|
* token: '0x...',
|
|
2116
2116
|
* to: '0x...',
|
|
2117
|
-
* roles: ['
|
|
2117
|
+
* roles: ['issuer'],
|
|
2118
2118
|
* })
|
|
2119
2119
|
* ```
|
|
2120
2120
|
*
|
|
@@ -2248,7 +2248,7 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
|
|
|
2248
2248
|
*
|
|
2249
2249
|
* const hash = await client.token.renounceRoles({
|
|
2250
2250
|
* token: '0x...',
|
|
2251
|
-
* roles: ['
|
|
2251
|
+
* roles: ['issuer'],
|
|
2252
2252
|
* })
|
|
2253
2253
|
* ```
|
|
2254
2254
|
*
|
|
@@ -2275,7 +2275,7 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
|
|
|
2275
2275
|
*
|
|
2276
2276
|
* const result = await client.token.renounceRolesSync({
|
|
2277
2277
|
* token: '0x...',
|
|
2278
|
-
* roles: ['
|
|
2278
|
+
* roles: ['issuer'],
|
|
2279
2279
|
* })
|
|
2280
2280
|
* ```
|
|
2281
2281
|
*
|
|
@@ -2302,7 +2302,7 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
|
|
|
2302
2302
|
* const hash = await client.token.revokeRoles({
|
|
2303
2303
|
* token: '0x...',
|
|
2304
2304
|
* from: '0x...',
|
|
2305
|
-
* roles: ['
|
|
2305
|
+
* roles: ['issuer'],
|
|
2306
2306
|
* })
|
|
2307
2307
|
* ```
|
|
2308
2308
|
*
|
|
@@ -2330,7 +2330,7 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
|
|
|
2330
2330
|
* const result = await client.token.revokeRolesSync({
|
|
2331
2331
|
* token: '0x...',
|
|
2332
2332
|
* from: '0x...',
|
|
2333
|
-
* roles: ['
|
|
2333
|
+
* roles: ['issuer'],
|
|
2334
2334
|
* })
|
|
2335
2335
|
* ```
|
|
2336
2336
|
*
|
|
@@ -2410,7 +2410,7 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
|
|
|
2410
2410
|
*
|
|
2411
2411
|
* const hash = await client.token.setRoleAdmin({
|
|
2412
2412
|
* token: '0x...',
|
|
2413
|
-
* role: '
|
|
2413
|
+
* role: 'issuer',
|
|
2414
2414
|
* adminRole: 'admin',
|
|
2415
2415
|
* })
|
|
2416
2416
|
* ```
|
|
@@ -2438,7 +2438,7 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
|
|
|
2438
2438
|
*
|
|
2439
2439
|
* const result = await client.token.setRoleAdminSync({
|
|
2440
2440
|
* token: '0x...',
|
|
2441
|
-
* role: '
|
|
2441
|
+
* role: 'issuer',
|
|
2442
2442
|
* adminRole: 'admin',
|
|
2443
2443
|
* })
|
|
2444
2444
|
* ```
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Address from 'ox/Address';
|
|
2
|
-
import
|
|
3
|
-
import { type
|
|
2
|
+
import * as Hex from 'ox/Hex';
|
|
3
|
+
import { type LocalAccount } from 'viem';
|
|
4
|
+
import * as WebAuthnP256 from '../viem/WebAuthnP256.js';
|
|
4
5
|
/**
|
|
5
6
|
* Connector for a Secp256k1 EOA.
|
|
6
7
|
*
|
|
@@ -69,7 +70,7 @@ export declare namespace webAuthn {
|
|
|
69
70
|
/** Options for WebAuthn registration. */
|
|
70
71
|
createOptions?: (Pick<WebAuthnP256.createCredential.Parameters, 'createFn' | 'label' | 'rpId' | 'userId' | 'timeout'> & {
|
|
71
72
|
/** Function to fetch a challenge to sign over at registration. */
|
|
72
|
-
getChallenge?: (() => Promise<Hex>) | undefined;
|
|
73
|
+
getChallenge?: (() => Promise<Hex.Hex>) | undefined;
|
|
73
74
|
}) | undefined;
|
|
74
75
|
/** Options for WebAuthn authentication. */
|
|
75
76
|
getOptions?: (Pick<WebAuthnP256.getCredential.Parameters, 'getFn' | 'rpId'> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Connector.d.ts","sourceRoot":"","sources":["../../src/wagmi/Connector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"Connector.d.ts","sourceRoot":"","sources":["../../src/wagmi/Connector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,YAAY,CAAA;AAGrC,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAA;AAG7B,OAAO,EAIL,KAAK,YAAY,EAIlB,MAAM,MAAM,CAAA;AAUb,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAA;AAMvD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,O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,CAAC,cAAc;GA4J/D;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,KAAY,UAAU,GAAG;QACvB,yCAAyC;QACzC,aAAa,CAAC,EACV,CAAC,IAAI,CACH,YAAY,CAAC,gBAAgB,CAAC,UAAU,EACxC,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CACrD,GAAG;YACF,kEAAkE;YAClE,YAAY,CAAC,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAA;SACpD,CAAC,GACF,SAAS,CAAA;QACb,2CAA2C;QAC3C,UAAU,CAAC,EACP,CAAC,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,UAAU,EAAE,OAAO,GAAG,MAAM,CAAC,GAAG;YAC/D,yDAAyD;YACzD,YAAY,CAAC,EACT,YAAY,CAAC,aAAa,CAAC,UAAU,CAAC,cAAc,CAAC,GACrD,SAAS,CAAA;SACd,CAAC,GACF,SAAS,CAAA;QACb,qCAAqC;QACrC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAC1B,CAAA;CACF"}
|
package/dist/wagmi/Connector.js
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import * as Address from 'ox/Address';
|
|
2
2
|
import * as Bytes from 'ox/Bytes';
|
|
3
|
-
import
|
|
3
|
+
import * as Hash from 'ox/Hash';
|
|
4
|
+
import * as Hex from 'ox/Hex';
|
|
5
|
+
import * as Provider from 'ox/Provider';
|
|
6
|
+
import * as RpcRequest from 'ox/RpcRequest';
|
|
4
7
|
import { createClient, getAddress, SwitchChainError, } from 'viem';
|
|
5
8
|
import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts';
|
|
9
|
+
import { getTransactionReceipt, sendTransaction, sendTransactionSync, } from 'viem/actions';
|
|
6
10
|
import { ChainNotConfiguredError, createConnector } from 'wagmi';
|
|
11
|
+
import * as Account from '../viem/Account.js';
|
|
12
|
+
import * as WebAuthnP256 from '../viem/WebAuthnP256.js';
|
|
13
|
+
const sendCallsMagic = Hash.keccak256(Hex.fromString('TEMPO_5792'));
|
|
7
14
|
/**
|
|
8
15
|
* Connector for a Secp256k1 EOA.
|
|
9
16
|
*
|
|
@@ -113,8 +120,10 @@ export function dangerous_secp256k1(options = {}) {
|
|
|
113
120
|
throw new ChainNotConfiguredError();
|
|
114
121
|
return createClient({
|
|
115
122
|
account,
|
|
116
|
-
chain,
|
|
117
|
-
transport,
|
|
123
|
+
chain: chain,
|
|
124
|
+
transport: withErc5792Compat(transport, {
|
|
125
|
+
account,
|
|
126
|
+
}),
|
|
118
127
|
});
|
|
119
128
|
},
|
|
120
129
|
async getProvider({ chainId } = {}) {
|
|
@@ -170,6 +179,8 @@ export function webAuthn(options = {}) {
|
|
|
170
179
|
credential ??= await WebAuthnP256.getCredential({
|
|
171
180
|
...(options.getOptions ?? {}),
|
|
172
181
|
credentialId: lastActiveCredential?.id,
|
|
182
|
+
// biome-ignore lint/suspicious/noTsIgnore: _
|
|
183
|
+
// @ts-ignore
|
|
173
184
|
async getPublicKey(credential) {
|
|
174
185
|
{
|
|
175
186
|
const publicKey = await options.getOptions?.getPublicKey?.(credential);
|
|
@@ -250,8 +261,10 @@ export function webAuthn(options = {}) {
|
|
|
250
261
|
throw new ChainNotConfiguredError();
|
|
251
262
|
return createClient({
|
|
252
263
|
account,
|
|
253
|
-
chain,
|
|
254
|
-
transport,
|
|
264
|
+
chain: chain,
|
|
265
|
+
transport: withErc5792Compat(transport, {
|
|
266
|
+
account,
|
|
267
|
+
}),
|
|
255
268
|
});
|
|
256
269
|
},
|
|
257
270
|
async getProvider({ chainId } = {}) {
|
|
@@ -260,4 +273,77 @@ export function webAuthn(options = {}) {
|
|
|
260
273
|
},
|
|
261
274
|
}));
|
|
262
275
|
}
|
|
276
|
+
// TODO: This is a temporary workaround to support EIP-5792. To be removed
|
|
277
|
+
// once we support a EIP-1193 Provider abstraction for Tempo accounts.
|
|
278
|
+
// biome-ignore lint/correctness/noUnusedVariables: _
|
|
279
|
+
function withErc5792Compat(transport, { account }) {
|
|
280
|
+
return (options) => {
|
|
281
|
+
const t = transport(options);
|
|
282
|
+
return {
|
|
283
|
+
...t,
|
|
284
|
+
async request(args) {
|
|
285
|
+
const request = RpcRequest.from(args);
|
|
286
|
+
const client = createClient({
|
|
287
|
+
account,
|
|
288
|
+
chain: options.chain,
|
|
289
|
+
transport,
|
|
290
|
+
});
|
|
291
|
+
if (request.method === 'wallet_sendCalls') {
|
|
292
|
+
const params = request.params[0] ?? {};
|
|
293
|
+
const { capabilities, chainId, from } = params;
|
|
294
|
+
const { sync } = capabilities ?? {};
|
|
295
|
+
if (!account)
|
|
296
|
+
throw new Provider.DisconnectedError();
|
|
297
|
+
if (!chainId)
|
|
298
|
+
throw new Provider.UnsupportedChainIdError();
|
|
299
|
+
if (Number(chainId) !== client.chain.id)
|
|
300
|
+
throw new Provider.UnsupportedChainIdError();
|
|
301
|
+
if (from && !Address.isEqual(from, account.address))
|
|
302
|
+
throw new Provider.DisconnectedError();
|
|
303
|
+
const calls = (params.calls ?? []).map((call) => ({
|
|
304
|
+
to: call.to,
|
|
305
|
+
value: call.value ? BigInt(call.value) : undefined,
|
|
306
|
+
data: call.data,
|
|
307
|
+
}));
|
|
308
|
+
const hash = await (async () => {
|
|
309
|
+
if (!sync)
|
|
310
|
+
return sendTransaction(client, {
|
|
311
|
+
account,
|
|
312
|
+
calls,
|
|
313
|
+
});
|
|
314
|
+
const { transactionHash } = await sendTransactionSync(client, {
|
|
315
|
+
account,
|
|
316
|
+
calls,
|
|
317
|
+
});
|
|
318
|
+
return transactionHash;
|
|
319
|
+
})();
|
|
320
|
+
const id = Hex.concat(hash, Hex.padLeft(chainId, 32), sendCallsMagic);
|
|
321
|
+
return {
|
|
322
|
+
capabilities: { sync },
|
|
323
|
+
id,
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
if (request.method === 'wallet_getCallsStatus') {
|
|
327
|
+
const [id] = request.params ?? [];
|
|
328
|
+
if (!id)
|
|
329
|
+
throw new Error('`id` not found');
|
|
330
|
+
if (!id.endsWith(sendCallsMagic.slice(2)))
|
|
331
|
+
throw new Error('`id` not supported');
|
|
332
|
+
Hex.assert(id);
|
|
333
|
+
const hash = Hex.slice(id, 0, 32);
|
|
334
|
+
const chainId = Hex.slice(id, 32, 64);
|
|
335
|
+
const receipt = await getTransactionReceipt(client, { hash });
|
|
336
|
+
return {
|
|
337
|
+
atomic: true,
|
|
338
|
+
chainId: Number(chainId),
|
|
339
|
+
receipts: [receipt],
|
|
340
|
+
status: receipt.status === 'success' ? 200 : 500,
|
|
341
|
+
version: '2.0.0',
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
return t.request(args);
|
|
345
|
+
},
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
}
|
|
263
349
|
//# sourceMappingURL=Connector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Connector.js","sourceRoot":"","sources":["../../src/wagmi/Connector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,YAAY,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EACL,YAAY,EAEZ,UAAU,EAGV,gBAAgB,GACjB,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACvE,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAEhE;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CACjC,UAA0C,EAAE;IAE5C,IAAI,OAAiC,CAAA;IAwBrC,OAAO,eAAe,CAAoC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACrE,EAAE,EAAE,WAAW;QACf,IAAI,EAAE,iBAAiB;QACvB,IA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;wBAChD,OAAO,EAAE,OAAO;qBACjB,CAAA;gBACH,CAAC;gBAED,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YACxB,CAAC;SACO,CAAA;IACZ,CAAC,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1471,7 +1471,7 @@ export declare namespace getMetadata {
|
|
|
1471
1471
|
* })
|
|
1472
1472
|
*
|
|
1473
1473
|
* const adminRole = await Actions.token.getRoleAdmin(client, {
|
|
1474
|
-
* role: '
|
|
1474
|
+
* role: 'issuer',
|
|
1475
1475
|
* token: '0x...',
|
|
1476
1476
|
* })
|
|
1477
1477
|
* ```
|
|
@@ -1708,7 +1708,7 @@ export namespace grantRoles {
|
|
|
1708
1708
|
* actions.token.grantRoles.call({
|
|
1709
1709
|
* token: '0x20c0...babe',
|
|
1710
1710
|
* to: '0x20c0...beef',
|
|
1711
|
-
* role: '
|
|
1711
|
+
* role: 'issuer',
|
|
1712
1712
|
* }),
|
|
1713
1713
|
* ]
|
|
1714
1714
|
* })
|
|
@@ -1765,7 +1765,7 @@ export namespace grantRoles {
|
|
|
1765
1765
|
* const result = await Actions.token.grantRolesSync(client, {
|
|
1766
1766
|
* token: '0x...',
|
|
1767
1767
|
* to: '0x...',
|
|
1768
|
-
* roles: ['
|
|
1768
|
+
* roles: ['issuer'],
|
|
1769
1769
|
* })
|
|
1770
1770
|
* ```
|
|
1771
1771
|
*
|
|
@@ -2238,7 +2238,7 @@ export namespace pauseSync {
|
|
|
2238
2238
|
*
|
|
2239
2239
|
* const result = await Actions.token.renounceRoles(client, {
|
|
2240
2240
|
* token: '0x...',
|
|
2241
|
-
* roles: ['
|
|
2241
|
+
* roles: ['issuer'],
|
|
2242
2242
|
* })
|
|
2243
2243
|
* ```
|
|
2244
2244
|
*
|
|
@@ -2323,7 +2323,7 @@ export namespace renounceRoles {
|
|
|
2323
2323
|
* calls: [
|
|
2324
2324
|
* actions.token.renounceRoles.call({
|
|
2325
2325
|
* token: '0x20c0...babe',
|
|
2326
|
-
* role: '
|
|
2326
|
+
* role: 'issuer',
|
|
2327
2327
|
* }),
|
|
2328
2328
|
* ]
|
|
2329
2329
|
* })
|
|
@@ -2379,7 +2379,7 @@ export namespace renounceRoles {
|
|
|
2379
2379
|
*
|
|
2380
2380
|
* const result = await Actions.token.renounceRolesSync(client, {
|
|
2381
2381
|
* token: '0x...',
|
|
2382
|
-
* roles: ['
|
|
2382
|
+
* roles: ['issuer'],
|
|
2383
2383
|
* })
|
|
2384
2384
|
* ```
|
|
2385
2385
|
*
|
|
@@ -2447,7 +2447,7 @@ export namespace renounceRolesSync {
|
|
|
2447
2447
|
* const result = await Actions.token.revokeRoles(client, {
|
|
2448
2448
|
* token: '0x...',
|
|
2449
2449
|
* from: '0x...',
|
|
2450
|
-
* roles: ['
|
|
2450
|
+
* roles: ['issuer'],
|
|
2451
2451
|
* })
|
|
2452
2452
|
* ```
|
|
2453
2453
|
*
|
|
@@ -2535,7 +2535,7 @@ export namespace revokeRoles {
|
|
|
2535
2535
|
* actions.token.revokeRoles.call({
|
|
2536
2536
|
* token: '0x20c0...babe',
|
|
2537
2537
|
* from: '0x20c0...beef',
|
|
2538
|
-
* role: '
|
|
2538
|
+
* role: 'issuer',
|
|
2539
2539
|
* }),
|
|
2540
2540
|
* ]
|
|
2541
2541
|
* })
|
|
@@ -2592,7 +2592,7 @@ export namespace revokeRoles {
|
|
|
2592
2592
|
* const result = await Actions.token.revokeRolesSync(client, {
|
|
2593
2593
|
* token: '0x...',
|
|
2594
2594
|
* from: '0x...',
|
|
2595
|
-
* roles: ['
|
|
2595
|
+
* roles: ['issuer'],
|
|
2596
2596
|
* })
|
|
2597
2597
|
* ```
|
|
2598
2598
|
*
|
|
@@ -2855,7 +2855,7 @@ export namespace setSupplyCapSync {
|
|
|
2855
2855
|
*
|
|
2856
2856
|
* const result = await Actions.token.setRoleAdmin(client, {
|
|
2857
2857
|
* token: '0x...',
|
|
2858
|
-
* role: '
|
|
2858
|
+
* role: 'issuer',
|
|
2859
2859
|
* adminRole: 'admin',
|
|
2860
2860
|
* })
|
|
2861
2861
|
* ```
|
|
@@ -2935,7 +2935,7 @@ export namespace setRoleAdmin {
|
|
|
2935
2935
|
* calls: [
|
|
2936
2936
|
* actions.token.setRoleAdmin.call({
|
|
2937
2937
|
* token: '0x20c0...babe',
|
|
2938
|
-
* role: '
|
|
2938
|
+
* role: 'issuer',
|
|
2939
2939
|
* adminRole: 'admin',
|
|
2940
2940
|
* }),
|
|
2941
2941
|
* ]
|
|
@@ -2992,7 +2992,7 @@ export namespace setRoleAdmin {
|
|
|
2992
2992
|
*
|
|
2993
2993
|
* const result = await Actions.token.setRoleAdminSync(client, {
|
|
2994
2994
|
* token: '0x...',
|
|
2995
|
-
* role: '
|
|
2995
|
+
* role: 'issuer',
|
|
2996
2996
|
* adminRole: 'admin',
|
|
2997
2997
|
* })
|
|
2998
2998
|
* ```
|
package/src/viem/Decorator.ts
CHANGED
|
@@ -2185,7 +2185,7 @@ export type Decorator<
|
|
|
2185
2185
|
* }).extend(tempoActions())
|
|
2186
2186
|
*
|
|
2187
2187
|
* const adminRole = await client.token.getRoleAdmin({
|
|
2188
|
-
* role: '
|
|
2188
|
+
* role: 'issuer',
|
|
2189
2189
|
* token: '0x...',
|
|
2190
2190
|
* })
|
|
2191
2191
|
* ```
|
|
@@ -2245,7 +2245,7 @@ export type Decorator<
|
|
|
2245
2245
|
* const hash = await client.token.grantRoles({
|
|
2246
2246
|
* token: '0x...',
|
|
2247
2247
|
* to: '0x...',
|
|
2248
|
-
* roles: ['
|
|
2248
|
+
* roles: ['issuer'],
|
|
2249
2249
|
* })
|
|
2250
2250
|
* ```
|
|
2251
2251
|
*
|
|
@@ -2275,7 +2275,7 @@ export type Decorator<
|
|
|
2275
2275
|
* const result = await client.token.grantRolesSync({
|
|
2276
2276
|
* token: '0x...',
|
|
2277
2277
|
* to: '0x...',
|
|
2278
|
-
* roles: ['
|
|
2278
|
+
* roles: ['issuer'],
|
|
2279
2279
|
* })
|
|
2280
2280
|
* ```
|
|
2281
2281
|
*
|
|
@@ -2419,7 +2419,7 @@ export type Decorator<
|
|
|
2419
2419
|
*
|
|
2420
2420
|
* const hash = await client.token.renounceRoles({
|
|
2421
2421
|
* token: '0x...',
|
|
2422
|
-
* roles: ['
|
|
2422
|
+
* roles: ['issuer'],
|
|
2423
2423
|
* })
|
|
2424
2424
|
* ```
|
|
2425
2425
|
*
|
|
@@ -2448,7 +2448,7 @@ export type Decorator<
|
|
|
2448
2448
|
*
|
|
2449
2449
|
* const result = await client.token.renounceRolesSync({
|
|
2450
2450
|
* token: '0x...',
|
|
2451
|
-
* roles: ['
|
|
2451
|
+
* roles: ['issuer'],
|
|
2452
2452
|
* })
|
|
2453
2453
|
* ```
|
|
2454
2454
|
*
|
|
@@ -2477,7 +2477,7 @@ export type Decorator<
|
|
|
2477
2477
|
* const hash = await client.token.revokeRoles({
|
|
2478
2478
|
* token: '0x...',
|
|
2479
2479
|
* from: '0x...',
|
|
2480
|
-
* roles: ['
|
|
2480
|
+
* roles: ['issuer'],
|
|
2481
2481
|
* })
|
|
2482
2482
|
* ```
|
|
2483
2483
|
*
|
|
@@ -2507,7 +2507,7 @@ export type Decorator<
|
|
|
2507
2507
|
* const result = await client.token.revokeRolesSync({
|
|
2508
2508
|
* token: '0x...',
|
|
2509
2509
|
* from: '0x...',
|
|
2510
|
-
* roles: ['
|
|
2510
|
+
* roles: ['issuer'],
|
|
2511
2511
|
* })
|
|
2512
2512
|
* ```
|
|
2513
2513
|
*
|
|
@@ -2593,7 +2593,7 @@ export type Decorator<
|
|
|
2593
2593
|
*
|
|
2594
2594
|
* const hash = await client.token.setRoleAdmin({
|
|
2595
2595
|
* token: '0x...',
|
|
2596
|
-
* role: '
|
|
2596
|
+
* role: 'issuer',
|
|
2597
2597
|
* adminRole: 'admin',
|
|
2598
2598
|
* })
|
|
2599
2599
|
* ```
|
|
@@ -2623,7 +2623,7 @@ export type Decorator<
|
|
|
2623
2623
|
*
|
|
2624
2624
|
* const result = await client.token.setRoleAdminSync({
|
|
2625
2625
|
* token: '0x...',
|
|
2626
|
-
* role: '
|
|
2626
|
+
* role: 'issuer',
|
|
2627
2627
|
* adminRole: 'admin',
|
|
2628
2628
|
* })
|
|
2629
2629
|
* ```
|
package/src/wagmi/Connector.ts
CHANGED
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
import * as Address from 'ox/Address'
|
|
2
2
|
import * as Bytes from 'ox/Bytes'
|
|
3
|
-
import
|
|
3
|
+
import * as Hash from 'ox/Hash'
|
|
4
|
+
import * as Hex from 'ox/Hex'
|
|
5
|
+
import * as Provider from 'ox/Provider'
|
|
6
|
+
import * as RpcRequest from 'ox/RpcRequest'
|
|
4
7
|
import {
|
|
5
8
|
createClient,
|
|
6
9
|
type EIP1193Provider,
|
|
7
10
|
getAddress,
|
|
8
|
-
type Hex,
|
|
9
11
|
type LocalAccount,
|
|
10
12
|
SwitchChainError,
|
|
13
|
+
type Transport,
|
|
14
|
+
type Account as viem_Account,
|
|
11
15
|
} from 'viem'
|
|
12
16
|
import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'
|
|
17
|
+
import {
|
|
18
|
+
getTransactionReceipt,
|
|
19
|
+
sendTransaction,
|
|
20
|
+
sendTransactionSync,
|
|
21
|
+
} from 'viem/actions'
|
|
13
22
|
import { ChainNotConfiguredError, createConnector } from 'wagmi'
|
|
23
|
+
import * as Account from '../viem/Account.js'
|
|
24
|
+
import type * as tempo_Chain from '../viem/Chain.js'
|
|
25
|
+
import * as WebAuthnP256 from '../viem/WebAuthnP256.js'
|
|
26
|
+
|
|
27
|
+
type Chain = ReturnType<ReturnType<typeof tempo_Chain.define>>
|
|
28
|
+
|
|
29
|
+
const sendCallsMagic = Hash.keccak256(Hex.fromString('TEMPO_5792'))
|
|
14
30
|
|
|
15
31
|
/**
|
|
16
32
|
* Connector for a Secp256k1 EOA.
|
|
@@ -45,7 +61,7 @@ export function dangerous_secp256k1(
|
|
|
45
61
|
type StorageItem = {
|
|
46
62
|
'secp256k1.activeAddress': Address.Address
|
|
47
63
|
'secp256k1.lastActiveAddress': Address.Address
|
|
48
|
-
[key: `secp256k1.${string}.privateKey`]: Hex
|
|
64
|
+
[key: `secp256k1.${string}.privateKey`]: Hex.Hex
|
|
49
65
|
}
|
|
50
66
|
|
|
51
67
|
return createConnector<Provider, Properties, StorageItem>((config) => ({
|
|
@@ -168,8 +184,10 @@ export function dangerous_secp256k1(
|
|
|
168
184
|
|
|
169
185
|
return createClient({
|
|
170
186
|
account,
|
|
171
|
-
chain,
|
|
172
|
-
transport,
|
|
187
|
+
chain: chain as Chain,
|
|
188
|
+
transport: withErc5792Compat(transport, {
|
|
189
|
+
account,
|
|
190
|
+
}),
|
|
173
191
|
})
|
|
174
192
|
},
|
|
175
193
|
async getProvider({ chainId } = {}) {
|
|
@@ -214,7 +232,7 @@ export function webAuthn(options: webAuthn.Parameters = {}) {
|
|
|
214
232
|
type StorageItem = {
|
|
215
233
|
'webAuthn.activeCredential': WebAuthnP256.P256Credential
|
|
216
234
|
'webAuthn.lastActiveCredential': WebAuthnP256.P256Credential
|
|
217
|
-
[key: `webAuthn.${string}.publicKey`]: Hex
|
|
235
|
+
[key: `webAuthn.${string}.publicKey`]: Hex.Hex
|
|
218
236
|
}
|
|
219
237
|
|
|
220
238
|
return createConnector<Provider, Properties, StorageItem>((config) => ({
|
|
@@ -270,6 +288,8 @@ export function webAuthn(options: webAuthn.Parameters = {}) {
|
|
|
270
288
|
credential ??= await WebAuthnP256.getCredential({
|
|
271
289
|
...(options.getOptions ?? {}),
|
|
272
290
|
credentialId: lastActiveCredential?.id,
|
|
291
|
+
// biome-ignore lint/suspicious/noTsIgnore: _
|
|
292
|
+
// @ts-ignore
|
|
273
293
|
async getPublicKey(credential) {
|
|
274
294
|
{
|
|
275
295
|
const publicKey =
|
|
@@ -282,7 +302,7 @@ export function webAuthn(options: webAuthn.Parameters = {}) {
|
|
|
282
302
|
`webAuthn.${credential.id}.publicKey`,
|
|
283
303
|
)
|
|
284
304
|
if (!publicKey) throw new Error('publicKey not found')
|
|
285
|
-
return publicKey as Hex
|
|
305
|
+
return publicKey as Hex.Hex
|
|
286
306
|
}
|
|
287
307
|
},
|
|
288
308
|
rpId: options.getOptions?.rpId ?? options.rpId,
|
|
@@ -356,8 +376,10 @@ export function webAuthn(options: webAuthn.Parameters = {}) {
|
|
|
356
376
|
|
|
357
377
|
return createClient({
|
|
358
378
|
account,
|
|
359
|
-
chain,
|
|
360
|
-
transport,
|
|
379
|
+
chain: chain as Chain,
|
|
380
|
+
transport: withErc5792Compat(transport, {
|
|
381
|
+
account,
|
|
382
|
+
}),
|
|
361
383
|
})
|
|
362
384
|
},
|
|
363
385
|
async getProvider({ chainId } = {}) {
|
|
@@ -376,7 +398,7 @@ export declare namespace webAuthn {
|
|
|
376
398
|
'createFn' | 'label' | 'rpId' | 'userId' | 'timeout'
|
|
377
399
|
> & {
|
|
378
400
|
/** Function to fetch a challenge to sign over at registration. */
|
|
379
|
-
getChallenge?: (() => Promise<Hex>) | undefined
|
|
401
|
+
getChallenge?: (() => Promise<Hex.Hex>) | undefined
|
|
380
402
|
})
|
|
381
403
|
| undefined
|
|
382
404
|
/** Options for WebAuthn authentication. */
|
|
@@ -392,3 +414,96 @@ export declare namespace webAuthn {
|
|
|
392
414
|
rpId?: string | undefined
|
|
393
415
|
}
|
|
394
416
|
}
|
|
417
|
+
|
|
418
|
+
// TODO: This is a temporary workaround to support EIP-5792. To be removed
|
|
419
|
+
// once we support a EIP-1193 Provider abstraction for Tempo accounts.
|
|
420
|
+
// biome-ignore lint/correctness/noUnusedVariables: _
|
|
421
|
+
function withErc5792Compat(
|
|
422
|
+
transport: Transport,
|
|
423
|
+
{ account }: withErc5792Compat.Options,
|
|
424
|
+
): Transport {
|
|
425
|
+
return (options) => {
|
|
426
|
+
const t = transport(options)
|
|
427
|
+
|
|
428
|
+
return {
|
|
429
|
+
...t,
|
|
430
|
+
async request(args: never) {
|
|
431
|
+
const request = RpcRequest.from(args)
|
|
432
|
+
|
|
433
|
+
const client = createClient({
|
|
434
|
+
account,
|
|
435
|
+
chain: options.chain as Chain,
|
|
436
|
+
transport,
|
|
437
|
+
})
|
|
438
|
+
|
|
439
|
+
if (request.method === 'wallet_sendCalls') {
|
|
440
|
+
const params = request.params[0] ?? {}
|
|
441
|
+
const { capabilities, chainId, from } = params
|
|
442
|
+
const { sync } = capabilities ?? {}
|
|
443
|
+
|
|
444
|
+
if (!account) throw new Provider.DisconnectedError()
|
|
445
|
+
if (!chainId) throw new Provider.UnsupportedChainIdError()
|
|
446
|
+
if (Number(chainId) !== client.chain.id)
|
|
447
|
+
throw new Provider.UnsupportedChainIdError()
|
|
448
|
+
if (from && !Address.isEqual(from, account.address))
|
|
449
|
+
throw new Provider.DisconnectedError()
|
|
450
|
+
|
|
451
|
+
const calls = (params.calls ?? []).map((call) => ({
|
|
452
|
+
to: call.to,
|
|
453
|
+
value: call.value ? BigInt(call.value) : undefined,
|
|
454
|
+
data: call.data,
|
|
455
|
+
}))
|
|
456
|
+
|
|
457
|
+
const hash = await (async () => {
|
|
458
|
+
if (!sync)
|
|
459
|
+
return sendTransaction(client, {
|
|
460
|
+
account,
|
|
461
|
+
calls,
|
|
462
|
+
})
|
|
463
|
+
|
|
464
|
+
const { transactionHash } = await sendTransactionSync(client, {
|
|
465
|
+
account,
|
|
466
|
+
calls,
|
|
467
|
+
})
|
|
468
|
+
return transactionHash
|
|
469
|
+
})()
|
|
470
|
+
|
|
471
|
+
const id = Hex.concat(hash, Hex.padLeft(chainId, 32), sendCallsMagic)
|
|
472
|
+
|
|
473
|
+
return {
|
|
474
|
+
capabilities: { sync },
|
|
475
|
+
id,
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
if (request.method === 'wallet_getCallsStatus') {
|
|
480
|
+
const [id] = request.params ?? []
|
|
481
|
+
if (!id) throw new Error('`id` not found')
|
|
482
|
+
if (!id.endsWith(sendCallsMagic.slice(2)))
|
|
483
|
+
throw new Error('`id` not supported')
|
|
484
|
+
Hex.assert(id)
|
|
485
|
+
|
|
486
|
+
const hash = Hex.slice(id, 0, 32)
|
|
487
|
+
const chainId = Hex.slice(id, 32, 64)
|
|
488
|
+
|
|
489
|
+
const receipt = await getTransactionReceipt(client, { hash })
|
|
490
|
+
return {
|
|
491
|
+
atomic: true,
|
|
492
|
+
chainId: Number(chainId),
|
|
493
|
+
receipts: [receipt],
|
|
494
|
+
status: receipt.status === 'success' ? 200 : 500,
|
|
495
|
+
version: '2.0.0',
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
return t.request(args)
|
|
500
|
+
},
|
|
501
|
+
} as never
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
declare namespace withErc5792Compat {
|
|
506
|
+
type Options = {
|
|
507
|
+
account: viem_Account | undefined
|
|
508
|
+
}
|
|
509
|
+
}
|
package/src/wagmi/Hooks/token.ts
CHANGED