tempo.ts 0.0.5 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chains.d.ts +244 -541
- package/dist/chains.d.ts.map +1 -1
- package/dist/chains.js +10 -23
- package/dist/chains.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/ox/SignatureEnvelope.d.ts +245 -0
- package/dist/ox/SignatureEnvelope.d.ts.map +1 -0
- package/dist/ox/SignatureEnvelope.js +437 -0
- package/dist/ox/SignatureEnvelope.js.map +1 -0
- package/dist/ox/Transaction.d.ts +61 -24
- package/dist/ox/Transaction.d.ts.map +1 -1
- package/dist/ox/Transaction.js +63 -18
- package/dist/ox/Transaction.js.map +1 -1
- package/dist/ox/TransactionEnvelopeAA.d.ts +461 -0
- package/dist/ox/TransactionEnvelopeAA.d.ts.map +1 -0
- package/dist/ox/TransactionEnvelopeAA.js +528 -0
- package/dist/ox/TransactionEnvelopeAA.js.map +1 -0
- package/dist/ox/TransactionRequest.d.ts +7 -5
- package/dist/ox/TransactionRequest.d.ts.map +1 -1
- package/dist/ox/TransactionRequest.js +21 -12
- package/dist/ox/TransactionRequest.js.map +1 -1
- package/dist/ox/index.d.ts +5 -4
- package/dist/ox/index.d.ts.map +1 -1
- package/dist/ox/index.js +5 -4
- package/dist/ox/index.js.map +1 -1
- package/dist/prool/Instance.d.ts +0 -4
- package/dist/prool/Instance.d.ts.map +1 -1
- package/dist/prool/Instance.js +7 -7
- package/dist/prool/Instance.js.map +1 -1
- package/dist/prool/index.d.ts +1 -1
- package/dist/prool/index.d.ts.map +1 -1
- package/dist/prool/index.js +1 -1
- package/dist/prool/index.js.map +1 -1
- package/dist/viem/{abis.d.ts → Abis.d.ts} +523 -9
- package/dist/viem/Abis.d.ts.map +1 -0
- package/dist/viem/{abis.js → Abis.js} +321 -9
- package/dist/viem/Abis.js.map +1 -0
- package/dist/viem/{actions → Actions}/amm.d.ts +21 -21
- package/dist/viem/Actions/amm.d.ts.map +1 -0
- package/dist/viem/{actions → Actions}/amm.js +55 -43
- package/dist/viem/Actions/amm.js.map +1 -0
- package/dist/viem/Actions/dex.d.ts +3263 -0
- package/dist/viem/Actions/dex.d.ts.map +1 -0
- package/dist/viem/Actions/dex.js +1357 -0
- package/dist/viem/Actions/dex.js.map +1 -0
- package/dist/viem/{actions → Actions}/fee.d.ts +8 -8
- package/dist/viem/Actions/fee.d.ts.map +1 -0
- package/dist/viem/{actions → Actions}/fee.js +14 -13
- package/dist/viem/Actions/fee.js.map +1 -0
- package/dist/viem/Actions/index.d.ts +6 -0
- package/dist/viem/Actions/index.d.ts.map +1 -0
- package/dist/viem/Actions/index.js +6 -0
- package/dist/viem/Actions/index.js.map +1 -0
- package/dist/viem/{actions → Actions}/policy.d.ts +19 -19
- package/dist/viem/Actions/policy.d.ts.map +1 -0
- package/dist/viem/{actions → Actions}/policy.js +59 -46
- package/dist/viem/Actions/policy.js.map +1 -0
- package/dist/viem/{actions → Actions}/token.d.ts +3251 -707
- package/dist/viem/Actions/token.d.ts.map +1 -0
- package/dist/viem/{actions → Actions}/token.js +420 -88
- package/dist/viem/Actions/token.js.map +1 -0
- package/dist/viem/Addresses.d.ts +9 -0
- package/dist/viem/Addresses.d.ts.map +1 -0
- package/dist/viem/Addresses.js +9 -0
- package/dist/viem/Addresses.js.map +1 -0
- package/dist/viem/{chain.d.ts → Chain.d.ts} +81 -57
- package/dist/viem/Chain.d.ts.map +1 -0
- package/dist/viem/{chain.js → Chain.js} +7 -7
- package/dist/viem/Chain.js.map +1 -0
- package/dist/viem/{client.d.ts → Client.d.ts} +4 -4
- package/dist/viem/Client.d.ts.map +1 -0
- package/dist/viem/{client.js → Client.js} +3 -3
- package/dist/viem/Client.js.map +1 -0
- package/dist/viem/{decorator.d.ts → Decorator.d.ts} +507 -5
- package/dist/viem/Decorator.d.ts.map +1 -0
- package/dist/viem/{decorator.js → Decorator.js} +31 -5
- package/dist/viem/Decorator.js.map +1 -0
- package/dist/viem/{formatters.d.ts → Formatters.d.ts} +2 -2
- package/dist/viem/Formatters.d.ts.map +1 -0
- package/dist/viem/{formatters.js → Formatters.js} +24 -17
- package/dist/viem/Formatters.js.map +1 -0
- package/dist/viem/Tick.d.ts +111 -0
- package/dist/viem/Tick.d.ts.map +1 -0
- package/dist/viem/Tick.js +127 -0
- package/dist/viem/Tick.js.map +1 -0
- package/dist/viem/TokenIds.d.ts +3 -0
- package/dist/viem/TokenIds.d.ts.map +1 -0
- package/dist/viem/TokenIds.js +3 -0
- package/dist/viem/TokenIds.js.map +1 -0
- package/dist/viem/Transaction.d.ts +57 -0
- package/dist/viem/Transaction.d.ts.map +1 -0
- package/dist/viem/Transaction.js +137 -0
- package/dist/viem/Transaction.js.map +1 -0
- package/dist/viem/{transport.d.ts → Transport.d.ts} +3 -3
- package/dist/viem/Transport.d.ts.map +1 -0
- package/dist/viem/{transport.js → Transport.js} +3 -3
- package/dist/viem/Transport.js.map +1 -0
- package/dist/viem/index.d.ts +13 -9
- package/dist/viem/index.d.ts.map +1 -1
- package/dist/viem/index.js +13 -9
- package/dist/viem/index.js.map +1 -1
- package/dist/viem/{types.d.ts → internal/types.d.ts} +3 -3
- package/dist/viem/internal/types.d.ts.map +1 -0
- package/dist/viem/{types.js.map → internal/types.js.map} +1 -1
- package/dist/viem/internal/utils.d.ts.map +1 -0
- package/dist/viem/internal/utils.js.map +1 -0
- package/package.json +87 -101
- package/src/chains.ts +10 -24
- package/src/ox/SignatureEnvelope.test.ts +1252 -0
- package/src/ox/SignatureEnvelope.ts +709 -0
- package/src/ox/Transaction.test.ts +144 -89
- package/src/ox/Transaction.ts +104 -29
- package/src/ox/TransactionEnvelopeAA.test.ts +1533 -0
- package/src/ox/TransactionEnvelopeAA.ts +858 -0
- package/src/ox/TransactionRequest.ts +25 -17
- package/src/ox/index.ts +2 -1
- package/src/prool/Instance.ts +6 -14
- package/src/prool/internal/chain.json +101 -27
- package/src/viem/{abis.ts → Abis.ts} +322 -8
- package/src/viem/{actions → Actions}/amm.test.ts +65 -68
- package/src/viem/{actions → Actions}/amm.ts +72 -60
- package/src/viem/Actions/dex.test.ts +1608 -0
- package/src/viem/Actions/dex.ts +2026 -0
- package/src/viem/{actions → Actions}/fee.test.ts +34 -36
- package/src/viem/{actions → Actions}/fee.ts +18 -17
- package/src/viem/{actions → Actions}/index.ts +1 -0
- package/src/viem/{actions → Actions}/policy.test.ts +2 -2
- package/src/viem/{actions → Actions}/policy.ts +77 -64
- package/src/viem/{actions → Actions}/token.test.ts +406 -67
- package/src/viem/{actions → Actions}/token.ts +675 -144
- package/src/viem/Addresses.ts +9 -0
- package/src/viem/{chain.ts → Chain.ts} +6 -6
- package/src/viem/{client.bench-d.ts → Client.bench-d.ts} +2 -2
- package/src/viem/{client.test.ts → Client.test.ts} +31 -6
- package/src/viem/{client.ts → Client.ts} +1 -1
- package/src/viem/{decorator.bench-d.ts → Decorator.bench-d.ts} +2 -2
- package/src/viem/{decorator.test.ts → Decorator.test.ts} +1 -0
- package/src/viem/{decorator.ts → Decorator.ts} +586 -4
- package/src/viem/{formatters.ts → Formatters.ts} +31 -20
- package/src/viem/Tick.test.ts +281 -0
- package/src/viem/Tick.ts +176 -0
- package/src/viem/TokenIds.ts +2 -0
- package/src/viem/Transaction.ts +303 -0
- package/src/viem/{transport.ts → Transport.ts} +5 -5
- package/src/viem/e2e.test.ts +153 -78
- package/src/viem/index.ts +13 -9
- package/src/viem/{types.ts → internal/types.ts} +3 -3
- package/dist/ox/TransactionEnvelopeFeeToken.d.ts +0 -393
- package/dist/ox/TransactionEnvelopeFeeToken.d.ts.map +0 -1
- package/dist/ox/TransactionEnvelopeFeeToken.js +0 -452
- package/dist/ox/TransactionEnvelopeFeeToken.js.map +0 -1
- package/dist/viem/abis.d.ts.map +0 -1
- package/dist/viem/abis.js.map +0 -1
- package/dist/viem/actions/amm.d.ts.map +0 -1
- package/dist/viem/actions/amm.js.map +0 -1
- package/dist/viem/actions/fee.d.ts.map +0 -1
- package/dist/viem/actions/fee.js.map +0 -1
- package/dist/viem/actions/index.d.ts +0 -5
- package/dist/viem/actions/index.d.ts.map +0 -1
- package/dist/viem/actions/index.js +0 -5
- package/dist/viem/actions/index.js.map +0 -1
- package/dist/viem/actions/policy.d.ts.map +0 -1
- package/dist/viem/actions/policy.js.map +0 -1
- package/dist/viem/actions/token.d.ts.map +0 -1
- package/dist/viem/actions/token.js.map +0 -1
- package/dist/viem/addresses.d.ts +0 -8
- package/dist/viem/addresses.d.ts.map +0 -1
- package/dist/viem/addresses.js +0 -8
- package/dist/viem/addresses.js.map +0 -1
- package/dist/viem/chain.d.ts.map +0 -1
- package/dist/viem/chain.js.map +0 -1
- package/dist/viem/client.d.ts.map +0 -1
- package/dist/viem/client.js.map +0 -1
- package/dist/viem/decorator.d.ts.map +0 -1
- package/dist/viem/decorator.js.map +0 -1
- package/dist/viem/formatters.d.ts.map +0 -1
- package/dist/viem/formatters.js.map +0 -1
- package/dist/viem/transaction.d.ts +0 -54
- package/dist/viem/transaction.d.ts.map +0 -1
- package/dist/viem/transaction.js +0 -108
- package/dist/viem/transaction.js.map +0 -1
- package/dist/viem/transport.d.ts.map +0 -1
- package/dist/viem/transport.js.map +0 -1
- package/dist/viem/types.d.ts.map +0 -1
- package/dist/viem/utils.d.ts.map +0 -1
- package/dist/viem/utils.js.map +0 -1
- package/src/ox/TransactionEnvelopeFeeToken.test.ts +0 -1119
- package/src/ox/TransactionEnvelopeFeeToken.ts +0 -717
- package/src/prool/internal/consensus.toml +0 -32
- package/src/viem/addresses.ts +0 -10
- package/src/viem/transaction.ts +0 -253
- /package/dist/viem/{types.js → internal/types.js} +0 -0
- /package/dist/viem/{utils.d.ts → internal/utils.d.ts} +0 -0
- /package/dist/viem/{utils.js → internal/utils.js} +0 -0
- /package/src/viem/{utils.ts → internal/utils.ts} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const accountImplementation =
|
|
2
|
+
'0x7702c00000000000000000000000000000000000'
|
|
3
|
+
export const accountRegistrar = '0x7702ac0000000000000000000000000000000000'
|
|
4
|
+
export const feeManager = '0xfeec000000000000000000000000000000000000'
|
|
5
|
+
export const stablecoinExchange = '0xdec0000000000000000000000000000000000000'
|
|
6
|
+
export const tip20Factory = '0x20fc000000000000000000000000000000000000'
|
|
7
|
+
export const tip403Registry = '0x403c000000000000000000000000000000000000'
|
|
8
|
+
export const defaultFeeToken = '0x20c0000000000000000000000000000000000001'
|
|
9
|
+
export const defaultQuoteToken = '0x20c0000000000000000000000000000000000000'
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
defineTransaction,
|
|
5
5
|
defineTransactionRequest,
|
|
6
6
|
} from 'viem'
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import * as Formatters from './Formatters.js'
|
|
8
|
+
import * as Transaction from './Transaction.js'
|
|
9
9
|
|
|
10
|
-
export const
|
|
10
|
+
export const config = {
|
|
11
11
|
blockTime: 1_000,
|
|
12
12
|
contracts: {
|
|
13
13
|
multicall3: {
|
|
@@ -16,12 +16,12 @@ export const chainConfig = {
|
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
formatters: {
|
|
19
|
-
transaction: defineTransaction({ format: formatTransaction }),
|
|
19
|
+
transaction: defineTransaction({ format: Formatters.formatTransaction }),
|
|
20
20
|
transactionRequest: defineTransactionRequest({
|
|
21
|
-
format: formatTransactionRequest,
|
|
21
|
+
format: Formatters.formatTransactionRequest,
|
|
22
22
|
}),
|
|
23
23
|
},
|
|
24
24
|
serializers: {
|
|
25
|
-
transaction:
|
|
25
|
+
transaction: Transaction.serialize,
|
|
26
26
|
},
|
|
27
27
|
} satisfies Pick<Chain, 'blockTime' | 'contracts'> & ChainConfig
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { attest } from '@ark/attest'
|
|
2
2
|
import { test } from 'vitest'
|
|
3
|
-
import { createTempoClient } from './
|
|
3
|
+
import { createTempoClient } from './Client.js'
|
|
4
4
|
|
|
5
5
|
test('createTempoClient', () => {
|
|
6
6
|
createTempoClient()
|
|
7
|
-
attest.instantiations([
|
|
7
|
+
attest.instantiations([49581, 'instantiations'])
|
|
8
8
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { expect, test } from 'vitest'
|
|
2
|
-
import { createTempoClient } from './
|
|
2
|
+
import { createTempoClient } from './Client.js'
|
|
3
3
|
|
|
4
4
|
test('createTempoClient', () => {
|
|
5
5
|
const client = createTempoClient()
|
|
@@ -46,17 +46,17 @@ test('createTempoClient', () => {
|
|
|
46
46
|
"type": "transactionRequest",
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
|
-
"id":
|
|
50
|
-
"name": "Tempo",
|
|
49
|
+
"id": 42427,
|
|
50
|
+
"name": "Tempo Andante",
|
|
51
51
|
"nativeCurrency": {
|
|
52
|
-
"decimals":
|
|
52
|
+
"decimals": 6,
|
|
53
53
|
"name": "USD",
|
|
54
54
|
"symbol": "USD",
|
|
55
55
|
},
|
|
56
56
|
"rpcUrls": {
|
|
57
57
|
"default": {
|
|
58
58
|
"http": [
|
|
59
|
-
"https://rpc-
|
|
59
|
+
"https://rpc-andante.tempoxyz.dev",
|
|
60
60
|
],
|
|
61
61
|
},
|
|
62
62
|
},
|
|
@@ -64,6 +64,31 @@ test('createTempoClient', () => {
|
|
|
64
64
|
"transaction": [Function],
|
|
65
65
|
},
|
|
66
66
|
},
|
|
67
|
+
"dex": {
|
|
68
|
+
"buy": [Function],
|
|
69
|
+
"buySync": [Function],
|
|
70
|
+
"cancel": [Function],
|
|
71
|
+
"cancelSync": [Function],
|
|
72
|
+
"createPair": [Function],
|
|
73
|
+
"createPairSync": [Function],
|
|
74
|
+
"getBalance": [Function],
|
|
75
|
+
"getBuyQuote": [Function],
|
|
76
|
+
"getOrder": [Function],
|
|
77
|
+
"getPriceLevel": [Function],
|
|
78
|
+
"getSellQuote": [Function],
|
|
79
|
+
"place": [Function],
|
|
80
|
+
"placeFlip": [Function],
|
|
81
|
+
"placeFlipSync": [Function],
|
|
82
|
+
"placeSync": [Function],
|
|
83
|
+
"sell": [Function],
|
|
84
|
+
"sellSync": [Function],
|
|
85
|
+
"watchFlipOrderPlaced": [Function],
|
|
86
|
+
"watchOrderCancelled": [Function],
|
|
87
|
+
"watchOrderFilled": [Function],
|
|
88
|
+
"watchOrderPlaced": [Function],
|
|
89
|
+
"withdraw": [Function],
|
|
90
|
+
"withdrawSync": [Function],
|
|
91
|
+
},
|
|
67
92
|
"extend": [Function],
|
|
68
93
|
"fee": {
|
|
69
94
|
"getUserToken": [Function],
|
|
@@ -144,7 +169,7 @@ test('createTempoClient', () => {
|
|
|
144
169
|
"retryDelay": 150,
|
|
145
170
|
"timeout": 10000,
|
|
146
171
|
"type": "http",
|
|
147
|
-
"url": "https://rpc-
|
|
172
|
+
"url": "https://rpc-andante.tempoxyz.dev",
|
|
148
173
|
},
|
|
149
174
|
"type": "base",
|
|
150
175
|
"uid": null,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from 'viem'
|
|
13
13
|
import { tempo } from '../chains.js'
|
|
14
14
|
import type { PartialBy } from '../internal/types.js'
|
|
15
|
-
import * as actions from './
|
|
15
|
+
import * as actions from './Decorator.js'
|
|
16
16
|
|
|
17
17
|
export type Client<
|
|
18
18
|
transport extends Transport = Transport,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { attest } from '@ark/attest'
|
|
2
2
|
import { createClient, http } from 'viem'
|
|
3
3
|
import { test } from 'vitest'
|
|
4
|
-
import { decorator } from './
|
|
4
|
+
import { decorator } from './Decorator.js'
|
|
5
5
|
|
|
6
6
|
test('decorator', () => {
|
|
7
7
|
createClient({
|
|
8
8
|
transport: http('https://cloudflare-eth.com'),
|
|
9
9
|
}).extend(decorator())
|
|
10
|
-
attest.instantiations([
|
|
10
|
+
attest.instantiations([32084, 'instantiations'])
|
|
11
11
|
})
|