tempo.ts 0.2.0 → 0.2.1
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/chains.d.ts.map +1 -1
- package/dist/chains.js +3 -1
- package/dist/chains.js.map +1 -1
- package/dist/viem/Actions/amm.d.ts +64 -43
- package/dist/viem/Actions/amm.d.ts.map +1 -1
- package/dist/viem/Actions/amm.js +62 -47
- package/dist/viem/Actions/amm.js.map +1 -1
- package/dist/viem/Actions/dex.d.ts +32 -32
- package/dist/viem/Actions/dex.js +32 -32
- package/dist/viem/Actions/faucet.d.ts +34 -0
- package/dist/viem/Actions/faucet.d.ts.map +1 -0
- package/dist/viem/Actions/faucet.js +33 -0
- package/dist/viem/Actions/faucet.js.map +1 -0
- package/dist/viem/Actions/fee.d.ts +13 -13
- package/dist/viem/Actions/fee.js +13 -13
- package/dist/viem/Actions/index.d.ts +1 -0
- package/dist/viem/Actions/index.d.ts.map +1 -1
- package/dist/viem/Actions/index.js +1 -0
- package/dist/viem/Actions/index.js.map +1 -1
- package/dist/viem/Actions/policy.d.ts +46 -46
- package/dist/viem/Actions/policy.js +46 -46
- package/dist/viem/Actions/reward.d.ts +38 -38
- package/dist/viem/Actions/reward.js +38 -38
- package/dist/viem/Actions/token.d.ts +159 -159
- package/dist/viem/Actions/token.js +159 -159
- package/dist/viem/Decorator.d.ts +128 -101
- package/dist/viem/Decorator.d.ts.map +1 -1
- package/dist/viem/Decorator.js +4 -0
- package/dist/viem/Decorator.js.map +1 -1
- package/dist/wagmi/Actions/amm.d.ts +12 -12
- package/dist/wagmi/Actions/amm.js +12 -12
- package/dist/wagmi/Actions/dex.d.ts +25 -25
- package/dist/wagmi/Actions/dex.js +25 -25
- package/dist/wagmi/Actions/faucet.d.ts +35 -0
- package/dist/wagmi/Actions/faucet.d.ts.map +1 -0
- package/dist/wagmi/Actions/faucet.js +33 -0
- package/dist/wagmi/Actions/faucet.js.map +1 -0
- package/dist/wagmi/Actions/fee.d.ts +3 -3
- package/dist/wagmi/Actions/fee.js +3 -3
- package/dist/wagmi/Actions/index.d.ts +1 -0
- package/dist/wagmi/Actions/index.d.ts.map +1 -1
- package/dist/wagmi/Actions/index.js +1 -0
- package/dist/wagmi/Actions/index.js.map +1 -1
- package/dist/wagmi/Actions/reward.d.ts +10 -10
- package/dist/wagmi/Actions/reward.js +10 -10
- package/dist/wagmi/Actions/token.d.ts +45 -45
- package/dist/wagmi/Actions/token.js +46 -46
- package/dist/wagmi/Actions/token.js.map +1 -1
- package/dist/wagmi/Connector.d.ts +11 -3
- package/dist/wagmi/Connector.d.ts.map +1 -1
- package/dist/wagmi/Connector.js +16 -4
- package/dist/wagmi/Connector.js.map +1 -1
- package/dist/wagmi/Hooks/faucet.d.ts +39 -0
- package/dist/wagmi/Hooks/faucet.d.ts.map +1 -0
- package/dist/wagmi/Hooks/faucet.js +40 -0
- package/dist/wagmi/Hooks/faucet.js.map +1 -0
- package/dist/wagmi/Hooks/index.d.ts +1 -0
- package/dist/wagmi/Hooks/index.d.ts.map +1 -1
- package/dist/wagmi/Hooks/index.js +1 -0
- package/dist/wagmi/Hooks/index.js.map +1 -1
- package/package.json +1 -1
- package/src/chains.ts +3 -1
- package/src/viem/Actions/amm.test.ts +75 -0
- package/src/viem/Actions/amm.ts +63 -48
- package/src/viem/Actions/dex.ts +32 -32
- package/src/viem/Actions/faucet.ts +50 -0
- package/src/viem/Actions/fee.ts +13 -13
- package/src/viem/Actions/index.ts +1 -0
- package/src/viem/Actions/policy.ts +46 -46
- package/src/viem/Actions/reward.ts +38 -38
- package/src/viem/Actions/token.ts +159 -159
- package/src/viem/Chain.bench-d.ts +12 -0
- package/src/viem/Decorator.bench-d.ts +1 -1
- package/src/viem/Decorator.test.ts +1 -0
- package/src/viem/Decorator.ts +133 -101
- package/src/wagmi/Actions/amm.ts +12 -12
- package/src/wagmi/Actions/dex.ts +25 -25
- package/src/wagmi/Actions/faucet.ts +46 -0
- package/src/wagmi/Actions/fee.ts +3 -3
- package/src/wagmi/Actions/index.ts +1 -0
- package/src/wagmi/Actions/reward.ts +10 -10
- package/src/wagmi/Actions/token.ts +46 -46
- package/src/wagmi/Connector.ts +31 -8
- package/src/wagmi/Hooks/faucet.ts +76 -0
- package/src/wagmi/Hooks/index.ts +1 -0
|
@@ -11,16 +11,16 @@ export type PolicyType = 'whitelist' | 'blacklist';
|
|
|
11
11
|
* ```ts
|
|
12
12
|
* import { createClient, http } from 'viem'
|
|
13
13
|
* import { tempo } from 'tempo.ts/chains'
|
|
14
|
-
* import
|
|
14
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
15
15
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
16
16
|
*
|
|
17
17
|
* const client = createClient({
|
|
18
18
|
* account: privateKeyToAccount('0x...'),
|
|
19
|
-
* chain: tempo
|
|
19
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
20
20
|
* transport: http(),
|
|
21
21
|
* })
|
|
22
22
|
*
|
|
23
|
-
* const { hash, policyId } = await
|
|
23
|
+
* const { hash, policyId } = await Actions.policy.create(client, {
|
|
24
24
|
* admin: '0x...',
|
|
25
25
|
* type: 'whitelist',
|
|
26
26
|
* })
|
|
@@ -59,10 +59,10 @@ export declare namespace create {
|
|
|
59
59
|
* ```ts
|
|
60
60
|
* import { createClient, http, walletActions } from 'viem'
|
|
61
61
|
* import { tempo } from 'tempo.ts/chains'
|
|
62
|
-
* import
|
|
62
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
63
63
|
*
|
|
64
64
|
* const client = createClient({
|
|
65
|
-
* chain: tempo
|
|
65
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
66
66
|
* transport: http(),
|
|
67
67
|
* }).extend(walletActions)
|
|
68
68
|
*
|
|
@@ -333,16 +333,16 @@ export declare namespace create {
|
|
|
333
333
|
* ```ts
|
|
334
334
|
* import { createClient, http } from 'viem'
|
|
335
335
|
* import { tempo } from 'tempo.ts/chains'
|
|
336
|
-
* import
|
|
336
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
337
337
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
338
338
|
*
|
|
339
339
|
* const client = createClient({
|
|
340
340
|
* account: privateKeyToAccount('0x...'),
|
|
341
|
-
* chain: tempo
|
|
341
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
342
342
|
* transport: http(),
|
|
343
343
|
* })
|
|
344
344
|
*
|
|
345
|
-
* const result = await
|
|
345
|
+
* const result = await Actions.policy.createSync(client, {
|
|
346
346
|
* admin: '0x...',
|
|
347
347
|
* type: 'whitelist',
|
|
348
348
|
* })
|
|
@@ -370,16 +370,16 @@ export declare namespace createSync {
|
|
|
370
370
|
* ```ts
|
|
371
371
|
* import { createClient, http } from 'viem'
|
|
372
372
|
* import { tempo } from 'tempo.ts/chains'
|
|
373
|
-
* import
|
|
373
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
374
374
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
375
375
|
*
|
|
376
376
|
* const client = createClient({
|
|
377
377
|
* account: privateKeyToAccount('0x...'),
|
|
378
|
-
* chain: tempo
|
|
378
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
379
379
|
* transport: http(),
|
|
380
380
|
* })
|
|
381
381
|
*
|
|
382
|
-
* const hash = await
|
|
382
|
+
* const hash = await Actions.policy.setAdmin(client, {
|
|
383
383
|
* policyId: 2n,
|
|
384
384
|
* admin: '0x...',
|
|
385
385
|
* })
|
|
@@ -413,10 +413,10 @@ export declare namespace setAdmin {
|
|
|
413
413
|
* ```ts
|
|
414
414
|
* import { createClient, http, walletActions } from 'viem'
|
|
415
415
|
* import { tempo } from 'tempo.ts/chains'
|
|
416
|
-
* import
|
|
416
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
417
417
|
*
|
|
418
418
|
* const client = createClient({
|
|
419
|
-
* chain: tempo
|
|
419
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
420
420
|
* transport: http(),
|
|
421
421
|
* }).extend(walletActions)
|
|
422
422
|
*
|
|
@@ -667,16 +667,16 @@ export declare namespace setAdmin {
|
|
|
667
667
|
* ```ts
|
|
668
668
|
* import { createClient, http } from 'viem'
|
|
669
669
|
* import { tempo } from 'tempo.ts/chains'
|
|
670
|
-
* import
|
|
670
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
671
671
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
672
672
|
*
|
|
673
673
|
* const client = createClient({
|
|
674
674
|
* account: privateKeyToAccount('0x...'),
|
|
675
|
-
* chain: tempo
|
|
675
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
676
676
|
* transport: http(),
|
|
677
677
|
* })
|
|
678
678
|
*
|
|
679
|
-
* const result = await
|
|
679
|
+
* const result = await Actions.policy.setAdminSync(client, {
|
|
680
680
|
* policyId: 2n,
|
|
681
681
|
* admin: '0x...',
|
|
682
682
|
* })
|
|
@@ -704,16 +704,16 @@ export declare namespace setAdminSync {
|
|
|
704
704
|
* ```ts
|
|
705
705
|
* import { createClient, http } from 'viem'
|
|
706
706
|
* import { tempo } from 'tempo.ts/chains'
|
|
707
|
-
* import
|
|
707
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
708
708
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
709
709
|
*
|
|
710
710
|
* const client = createClient({
|
|
711
711
|
* account: privateKeyToAccount('0x...'),
|
|
712
|
-
* chain: tempo
|
|
712
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
713
713
|
* transport: http(),
|
|
714
714
|
* })
|
|
715
715
|
*
|
|
716
|
-
* const hash = await
|
|
716
|
+
* const hash = await Actions.policy.modifyWhitelist(client, {
|
|
717
717
|
* policyId: 2n,
|
|
718
718
|
* account: '0x...',
|
|
719
719
|
* allowed: true,
|
|
@@ -750,10 +750,10 @@ export declare namespace modifyWhitelist {
|
|
|
750
750
|
* ```ts
|
|
751
751
|
* import { createClient, http, walletActions } from 'viem'
|
|
752
752
|
* import { tempo } from 'tempo.ts/chains'
|
|
753
|
-
* import
|
|
753
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
754
754
|
*
|
|
755
755
|
* const client = createClient({
|
|
756
|
-
* chain: tempo
|
|
756
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
757
757
|
* transport: http(),
|
|
758
758
|
* }).extend(walletActions)
|
|
759
759
|
*
|
|
@@ -1009,16 +1009,16 @@ export declare namespace modifyWhitelist {
|
|
|
1009
1009
|
* ```ts
|
|
1010
1010
|
* import { createClient, http } from 'viem'
|
|
1011
1011
|
* import { tempo } from 'tempo.ts/chains'
|
|
1012
|
-
* import
|
|
1012
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1013
1013
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1014
1014
|
*
|
|
1015
1015
|
* const client = createClient({
|
|
1016
1016
|
* account: privateKeyToAccount('0x...'),
|
|
1017
|
-
* chain: tempo
|
|
1017
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1018
1018
|
* transport: http(),
|
|
1019
1019
|
* })
|
|
1020
1020
|
*
|
|
1021
|
-
* const result = await
|
|
1021
|
+
* const result = await Actions.policy.modifyWhitelistSync(client, {
|
|
1022
1022
|
* policyId: 2n,
|
|
1023
1023
|
* account: '0x...',
|
|
1024
1024
|
* allowed: true,
|
|
@@ -1047,16 +1047,16 @@ export declare namespace modifyWhitelistSync {
|
|
|
1047
1047
|
* ```ts
|
|
1048
1048
|
* import { createClient, http } from 'viem'
|
|
1049
1049
|
* import { tempo } from 'tempo.ts/chains'
|
|
1050
|
-
* import
|
|
1050
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1051
1051
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1052
1052
|
*
|
|
1053
1053
|
* const client = createClient({
|
|
1054
1054
|
* account: privateKeyToAccount('0x...'),
|
|
1055
|
-
* chain: tempo
|
|
1055
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1056
1056
|
* transport: http(),
|
|
1057
1057
|
* })
|
|
1058
1058
|
*
|
|
1059
|
-
* const hash = await
|
|
1059
|
+
* const hash = await Actions.policy.modifyBlacklist(client, {
|
|
1060
1060
|
* policyId: 2n,
|
|
1061
1061
|
* account: '0x...',
|
|
1062
1062
|
* restricted: true,
|
|
@@ -1093,10 +1093,10 @@ export declare namespace modifyBlacklist {
|
|
|
1093
1093
|
* ```ts
|
|
1094
1094
|
* import { createClient, http, walletActions } from 'viem'
|
|
1095
1095
|
* import { tempo } from 'tempo.ts/chains'
|
|
1096
|
-
* import
|
|
1096
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1097
1097
|
*
|
|
1098
1098
|
* const client = createClient({
|
|
1099
|
-
* chain: tempo
|
|
1099
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1100
1100
|
* transport: http(),
|
|
1101
1101
|
* }).extend(walletActions)
|
|
1102
1102
|
*
|
|
@@ -1352,16 +1352,16 @@ export declare namespace modifyBlacklist {
|
|
|
1352
1352
|
* ```ts
|
|
1353
1353
|
* import { createClient, http } from 'viem'
|
|
1354
1354
|
* import { tempo } from 'tempo.ts/chains'
|
|
1355
|
-
* import
|
|
1355
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1356
1356
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1357
1357
|
*
|
|
1358
1358
|
* const client = createClient({
|
|
1359
1359
|
* account: privateKeyToAccount('0x...'),
|
|
1360
|
-
* chain: tempo
|
|
1360
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1361
1361
|
* transport: http(),
|
|
1362
1362
|
* })
|
|
1363
1363
|
*
|
|
1364
|
-
* const result = await
|
|
1364
|
+
* const result = await Actions.policy.modifyBlacklistSync(client, {
|
|
1365
1365
|
* policyId: 2n,
|
|
1366
1366
|
* account: '0x...',
|
|
1367
1367
|
* restricted: true,
|
|
@@ -1390,14 +1390,14 @@ export declare namespace modifyBlacklistSync {
|
|
|
1390
1390
|
* ```ts
|
|
1391
1391
|
* import { createClient, http } from 'viem'
|
|
1392
1392
|
* import { tempo } from 'tempo.ts/chains'
|
|
1393
|
-
* import
|
|
1393
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1394
1394
|
*
|
|
1395
1395
|
* const client = createClient({
|
|
1396
|
-
* chain: tempo
|
|
1396
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1397
1397
|
* transport: http(),
|
|
1398
1398
|
* })
|
|
1399
1399
|
*
|
|
1400
|
-
* const data = await
|
|
1400
|
+
* const data = await Actions.policy.getData(client, {
|
|
1401
1401
|
* policyId: 2n,
|
|
1402
1402
|
* })
|
|
1403
1403
|
* ```
|
|
@@ -1460,14 +1460,14 @@ export declare namespace getData {
|
|
|
1460
1460
|
* ```ts
|
|
1461
1461
|
* import { createClient, http } from 'viem'
|
|
1462
1462
|
* import { tempo } from 'tempo.ts/chains'
|
|
1463
|
-
* import
|
|
1463
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1464
1464
|
*
|
|
1465
1465
|
* const client = createClient({
|
|
1466
|
-
* chain: tempo
|
|
1466
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1467
1467
|
* transport: http(),
|
|
1468
1468
|
* })
|
|
1469
1469
|
*
|
|
1470
|
-
* const authorized = await
|
|
1470
|
+
* const authorized = await Actions.policy.isAuthorized(client, {
|
|
1471
1471
|
* policyId: 2n,
|
|
1472
1472
|
* user: '0x...',
|
|
1473
1473
|
* })
|
|
@@ -1527,10 +1527,10 @@ export declare namespace isAuthorized {
|
|
|
1527
1527
|
* ```ts
|
|
1528
1528
|
* import { createClient, http } from 'viem'
|
|
1529
1529
|
* import { tempo } from 'tempo.ts/chains'
|
|
1530
|
-
* import
|
|
1530
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1531
1531
|
*
|
|
1532
1532
|
* const client = createClient({
|
|
1533
|
-
* chain: tempo
|
|
1533
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1534
1534
|
* transport: http(),
|
|
1535
1535
|
* })
|
|
1536
1536
|
*
|
|
@@ -1565,10 +1565,10 @@ export declare namespace watchCreate {
|
|
|
1565
1565
|
* ```ts
|
|
1566
1566
|
* import { createClient, http } from 'viem'
|
|
1567
1567
|
* import { tempo } from 'tempo.ts/chains'
|
|
1568
|
-
* import
|
|
1568
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1569
1569
|
*
|
|
1570
1570
|
* const client = createClient({
|
|
1571
|
-
* chain: tempo
|
|
1571
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1572
1572
|
* transport: http(),
|
|
1573
1573
|
* })
|
|
1574
1574
|
*
|
|
@@ -1602,10 +1602,10 @@ export declare namespace watchAdminUpdated {
|
|
|
1602
1602
|
* ```ts
|
|
1603
1603
|
* import { createClient, http } from 'viem'
|
|
1604
1604
|
* import { tempo } from 'tempo.ts/chains'
|
|
1605
|
-
* import
|
|
1605
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1606
1606
|
*
|
|
1607
1607
|
* const client = createClient({
|
|
1608
|
-
* chain: tempo
|
|
1608
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1609
1609
|
* transport: http(),
|
|
1610
1610
|
* })
|
|
1611
1611
|
*
|
|
@@ -1639,10 +1639,10 @@ export declare namespace watchWhitelistUpdated {
|
|
|
1639
1639
|
* ```ts
|
|
1640
1640
|
* import { createClient, http } from 'viem'
|
|
1641
1641
|
* import { tempo } from 'tempo.ts/chains'
|
|
1642
|
-
* import
|
|
1642
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1643
1643
|
*
|
|
1644
1644
|
* const client = createClient({
|
|
1645
|
-
* chain: tempo
|
|
1645
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1646
1646
|
* transport: http(),
|
|
1647
1647
|
* })
|
|
1648
1648
|
*
|
|
@@ -15,16 +15,16 @@ const policyTypeMap = {
|
|
|
15
15
|
* ```ts
|
|
16
16
|
* import { createClient, http } from 'viem'
|
|
17
17
|
* import { tempo } from 'tempo.ts/chains'
|
|
18
|
-
* import
|
|
18
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
19
19
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
20
20
|
*
|
|
21
21
|
* const client = createClient({
|
|
22
22
|
* account: privateKeyToAccount('0x...'),
|
|
23
|
-
* chain: tempo
|
|
23
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
24
24
|
* transport: http(),
|
|
25
25
|
* })
|
|
26
26
|
*
|
|
27
|
-
* const { hash, policyId } = await
|
|
27
|
+
* const { hash, policyId } = await Actions.policy.create(client, {
|
|
28
28
|
* admin: '0x...',
|
|
29
29
|
* type: 'whitelist',
|
|
30
30
|
* })
|
|
@@ -65,10 +65,10 @@ export async function create(client, parameters) {
|
|
|
65
65
|
* ```ts
|
|
66
66
|
* import { createClient, http, walletActions } from 'viem'
|
|
67
67
|
* import { tempo } from 'tempo.ts/chains'
|
|
68
|
-
* import
|
|
68
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
69
69
|
*
|
|
70
70
|
* const client = createClient({
|
|
71
|
-
* chain: tempo
|
|
71
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
72
72
|
* transport: http(),
|
|
73
73
|
* }).extend(walletActions)
|
|
74
74
|
*
|
|
@@ -136,16 +136,16 @@ export async function create(client, parameters) {
|
|
|
136
136
|
* ```ts
|
|
137
137
|
* import { createClient, http } from 'viem'
|
|
138
138
|
* import { tempo } from 'tempo.ts/chains'
|
|
139
|
-
* import
|
|
139
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
140
140
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
141
141
|
*
|
|
142
142
|
* const client = createClient({
|
|
143
143
|
* account: privateKeyToAccount('0x...'),
|
|
144
|
-
* chain: tempo
|
|
144
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
145
145
|
* transport: http(),
|
|
146
146
|
* })
|
|
147
147
|
*
|
|
148
|
-
* const result = await
|
|
148
|
+
* const result = await Actions.policy.createSync(client, {
|
|
149
149
|
* admin: '0x...',
|
|
150
150
|
* type: 'whitelist',
|
|
151
151
|
* })
|
|
@@ -174,16 +174,16 @@ export async function createSync(client, parameters) {
|
|
|
174
174
|
* ```ts
|
|
175
175
|
* import { createClient, http } from 'viem'
|
|
176
176
|
* import { tempo } from 'tempo.ts/chains'
|
|
177
|
-
* import
|
|
177
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
178
178
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
179
179
|
*
|
|
180
180
|
* const client = createClient({
|
|
181
181
|
* account: privateKeyToAccount('0x...'),
|
|
182
|
-
* chain: tempo
|
|
182
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
183
183
|
* transport: http(),
|
|
184
184
|
* })
|
|
185
185
|
*
|
|
186
|
-
* const hash = await
|
|
186
|
+
* const hash = await Actions.policy.setAdmin(client, {
|
|
187
187
|
* policyId: 2n,
|
|
188
188
|
* admin: '0x...',
|
|
189
189
|
* })
|
|
@@ -219,10 +219,10 @@ export async function setAdmin(client, parameters) {
|
|
|
219
219
|
* ```ts
|
|
220
220
|
* import { createClient, http, walletActions } from 'viem'
|
|
221
221
|
* import { tempo } from 'tempo.ts/chains'
|
|
222
|
-
* import
|
|
222
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
223
223
|
*
|
|
224
224
|
* const client = createClient({
|
|
225
|
-
* chain: tempo
|
|
225
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
226
226
|
* transport: http(),
|
|
227
227
|
* }).extend(walletActions)
|
|
228
228
|
*
|
|
@@ -279,16 +279,16 @@ export async function setAdmin(client, parameters) {
|
|
|
279
279
|
* ```ts
|
|
280
280
|
* import { createClient, http } from 'viem'
|
|
281
281
|
* import { tempo } from 'tempo.ts/chains'
|
|
282
|
-
* import
|
|
282
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
283
283
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
284
284
|
*
|
|
285
285
|
* const client = createClient({
|
|
286
286
|
* account: privateKeyToAccount('0x...'),
|
|
287
|
-
* chain: tempo
|
|
287
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
288
288
|
* transport: http(),
|
|
289
289
|
* })
|
|
290
290
|
*
|
|
291
|
-
* const result = await
|
|
291
|
+
* const result = await Actions.policy.setAdminSync(client, {
|
|
292
292
|
* policyId: 2n,
|
|
293
293
|
* admin: '0x...',
|
|
294
294
|
* })
|
|
@@ -317,16 +317,16 @@ export async function setAdminSync(client, parameters) {
|
|
|
317
317
|
* ```ts
|
|
318
318
|
* import { createClient, http } from 'viem'
|
|
319
319
|
* import { tempo } from 'tempo.ts/chains'
|
|
320
|
-
* import
|
|
320
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
321
321
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
322
322
|
*
|
|
323
323
|
* const client = createClient({
|
|
324
324
|
* account: privateKeyToAccount('0x...'),
|
|
325
|
-
* chain: tempo
|
|
325
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
326
326
|
* transport: http(),
|
|
327
327
|
* })
|
|
328
328
|
*
|
|
329
|
-
* const hash = await
|
|
329
|
+
* const hash = await Actions.policy.modifyWhitelist(client, {
|
|
330
330
|
* policyId: 2n,
|
|
331
331
|
* account: '0x...',
|
|
332
332
|
* allowed: true,
|
|
@@ -367,10 +367,10 @@ export async function modifyWhitelist(client, parameters) {
|
|
|
367
367
|
* ```ts
|
|
368
368
|
* import { createClient, http, walletActions } from 'viem'
|
|
369
369
|
* import { tempo } from 'tempo.ts/chains'
|
|
370
|
-
* import
|
|
370
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
371
371
|
*
|
|
372
372
|
* const client = createClient({
|
|
373
|
-
* chain: tempo
|
|
373
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
374
374
|
* transport: http(),
|
|
375
375
|
* }).extend(walletActions)
|
|
376
376
|
*
|
|
@@ -429,16 +429,16 @@ export async function modifyWhitelist(client, parameters) {
|
|
|
429
429
|
* ```ts
|
|
430
430
|
* import { createClient, http } from 'viem'
|
|
431
431
|
* import { tempo } from 'tempo.ts/chains'
|
|
432
|
-
* import
|
|
432
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
433
433
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
434
434
|
*
|
|
435
435
|
* const client = createClient({
|
|
436
436
|
* account: privateKeyToAccount('0x...'),
|
|
437
|
-
* chain: tempo
|
|
437
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
438
438
|
* transport: http(),
|
|
439
439
|
* })
|
|
440
440
|
*
|
|
441
|
-
* const result = await
|
|
441
|
+
* const result = await Actions.policy.modifyWhitelistSync(client, {
|
|
442
442
|
* policyId: 2n,
|
|
443
443
|
* account: '0x...',
|
|
444
444
|
* allowed: true,
|
|
@@ -468,16 +468,16 @@ export async function modifyWhitelistSync(client, parameters) {
|
|
|
468
468
|
* ```ts
|
|
469
469
|
* import { createClient, http } from 'viem'
|
|
470
470
|
* import { tempo } from 'tempo.ts/chains'
|
|
471
|
-
* import
|
|
471
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
472
472
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
473
473
|
*
|
|
474
474
|
* const client = createClient({
|
|
475
475
|
* account: privateKeyToAccount('0x...'),
|
|
476
|
-
* chain: tempo
|
|
476
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
477
477
|
* transport: http(),
|
|
478
478
|
* })
|
|
479
479
|
*
|
|
480
|
-
* const hash = await
|
|
480
|
+
* const hash = await Actions.policy.modifyBlacklist(client, {
|
|
481
481
|
* policyId: 2n,
|
|
482
482
|
* account: '0x...',
|
|
483
483
|
* restricted: true,
|
|
@@ -518,10 +518,10 @@ export async function modifyBlacklist(client, parameters) {
|
|
|
518
518
|
* ```ts
|
|
519
519
|
* import { createClient, http, walletActions } from 'viem'
|
|
520
520
|
* import { tempo } from 'tempo.ts/chains'
|
|
521
|
-
* import
|
|
521
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
522
522
|
*
|
|
523
523
|
* const client = createClient({
|
|
524
|
-
* chain: tempo
|
|
524
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
525
525
|
* transport: http(),
|
|
526
526
|
* }).extend(walletActions)
|
|
527
527
|
*
|
|
@@ -580,16 +580,16 @@ export async function modifyBlacklist(client, parameters) {
|
|
|
580
580
|
* ```ts
|
|
581
581
|
* import { createClient, http } from 'viem'
|
|
582
582
|
* import { tempo } from 'tempo.ts/chains'
|
|
583
|
-
* import
|
|
583
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
584
584
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
585
585
|
*
|
|
586
586
|
* const client = createClient({
|
|
587
587
|
* account: privateKeyToAccount('0x...'),
|
|
588
|
-
* chain: tempo
|
|
588
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
589
589
|
* transport: http(),
|
|
590
590
|
* })
|
|
591
591
|
*
|
|
592
|
-
* const result = await
|
|
592
|
+
* const result = await Actions.policy.modifyBlacklistSync(client, {
|
|
593
593
|
* policyId: 2n,
|
|
594
594
|
* account: '0x...',
|
|
595
595
|
* restricted: true,
|
|
@@ -619,14 +619,14 @@ export async function modifyBlacklistSync(client, parameters) {
|
|
|
619
619
|
* ```ts
|
|
620
620
|
* import { createClient, http } from 'viem'
|
|
621
621
|
* import { tempo } from 'tempo.ts/chains'
|
|
622
|
-
* import
|
|
622
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
623
623
|
*
|
|
624
624
|
* const client = createClient({
|
|
625
|
-
* chain: tempo
|
|
625
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
626
626
|
* transport: http(),
|
|
627
627
|
* })
|
|
628
628
|
*
|
|
629
|
-
* const data = await
|
|
629
|
+
* const data = await Actions.policy.getData(client, {
|
|
630
630
|
* policyId: 2n,
|
|
631
631
|
* })
|
|
632
632
|
* ```
|
|
@@ -671,14 +671,14 @@ export async function getData(client, parameters) {
|
|
|
671
671
|
* ```ts
|
|
672
672
|
* import { createClient, http } from 'viem'
|
|
673
673
|
* import { tempo } from 'tempo.ts/chains'
|
|
674
|
-
* import
|
|
674
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
675
675
|
*
|
|
676
676
|
* const client = createClient({
|
|
677
|
-
* chain: tempo
|
|
677
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
678
678
|
* transport: http(),
|
|
679
679
|
* })
|
|
680
680
|
*
|
|
681
|
-
* const authorized = await
|
|
681
|
+
* const authorized = await Actions.policy.isAuthorized(client, {
|
|
682
682
|
* policyId: 2n,
|
|
683
683
|
* user: '0x...',
|
|
684
684
|
* })
|
|
@@ -720,10 +720,10 @@ export async function isAuthorized(client, parameters) {
|
|
|
720
720
|
* ```ts
|
|
721
721
|
* import { createClient, http } from 'viem'
|
|
722
722
|
* import { tempo } from 'tempo.ts/chains'
|
|
723
|
-
* import
|
|
723
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
724
724
|
*
|
|
725
725
|
* const client = createClient({
|
|
726
|
-
* chain: tempo
|
|
726
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
727
727
|
* transport: http(),
|
|
728
728
|
* })
|
|
729
729
|
*
|
|
@@ -762,10 +762,10 @@ export function watchCreate(client, parameters) {
|
|
|
762
762
|
* ```ts
|
|
763
763
|
* import { createClient, http } from 'viem'
|
|
764
764
|
* import { tempo } from 'tempo.ts/chains'
|
|
765
|
-
* import
|
|
765
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
766
766
|
*
|
|
767
767
|
* const client = createClient({
|
|
768
|
-
* chain: tempo
|
|
768
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
769
769
|
* transport: http(),
|
|
770
770
|
* })
|
|
771
771
|
*
|
|
@@ -801,10 +801,10 @@ export function watchAdminUpdated(client, parameters) {
|
|
|
801
801
|
* ```ts
|
|
802
802
|
* import { createClient, http } from 'viem'
|
|
803
803
|
* import { tempo } from 'tempo.ts/chains'
|
|
804
|
-
* import
|
|
804
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
805
805
|
*
|
|
806
806
|
* const client = createClient({
|
|
807
|
-
* chain: tempo
|
|
807
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
808
808
|
* transport: http(),
|
|
809
809
|
* })
|
|
810
810
|
*
|
|
@@ -840,10 +840,10 @@ export function watchWhitelistUpdated(client, parameters) {
|
|
|
840
840
|
* ```ts
|
|
841
841
|
* import { createClient, http } from 'viem'
|
|
842
842
|
* import { tempo } from 'tempo.ts/chains'
|
|
843
|
-
* import
|
|
843
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
844
844
|
*
|
|
845
845
|
* const client = createClient({
|
|
846
|
-
* chain: tempo
|
|
846
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
847
847
|
* transport: http(),
|
|
848
848
|
* })
|
|
849
849
|
*
|