tempo.ts 0.0.1 → 0.0.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.
@@ -1,5 +1,6 @@
1
1
  export * from "./abis.js";
2
2
  export * as actions from "./actions/index.js";
3
+ export * from "./addresses.js";
3
4
  export * from "./chain.js";
4
5
  export * from "./client.js";
5
6
  export { decorator as tempoActions } from "./decorator.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/viem/index.ts"],"names":[],"mappings":"AAAA,0BAAyB;AACzB,OAAO,KAAK,OAAO,2BAA0B;AAC7C,2BAA0B;AAC1B,4BAA2B;AAC3B,OAAO,EAAE,SAAS,IAAI,YAAY,EAAE,uBAAsB;AAC1D,gCAA+B;AAC/B,iCAAgC;AAChC,+BAA8B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/viem/index.ts"],"names":[],"mappings":"AAAA,0BAAyB;AACzB,OAAO,KAAK,OAAO,2BAA0B;AAC7C,+BAA8B;AAC9B,2BAA0B;AAC1B,4BAA2B;AAC3B,OAAO,EAAE,SAAS,IAAI,YAAY,EAAE,uBAAsB;AAC1D,gCAA+B;AAC/B,iCAAgC;AAChC,+BAA8B"}
@@ -1,5 +1,6 @@
1
1
  export * from "./abis.js";
2
2
  export * as actions from "./actions/index.js";
3
+ export * from "./addresses.js";
3
4
  export * from "./chain.js";
4
5
  export * from "./client.js";
5
6
  export { decorator as tempoActions } from "./decorator.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/viem/index.ts"],"names":[],"mappings":"AAAA,0BAAyB;AACzB,OAAO,KAAK,OAAO,2BAA0B;AAC7C,2BAA0B;AAC1B,4BAA2B;AAC3B,OAAO,EAAE,SAAS,IAAI,YAAY,EAAE,uBAAsB;AAC1D,gCAA+B;AAC/B,iCAAgC;AAChC,+BAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/viem/index.ts"],"names":[],"mappings":"AAAA,0BAAyB;AACzB,OAAO,KAAK,OAAO,2BAA0B;AAC7C,+BAA8B;AAC9B,2BAA0B;AAC1B,4BAA2B;AAC3B,OAAO,EAAE,SAAS,IAAI,YAAY,EAAE,uBAAsB;AAC1D,gCAA+B;AAC/B,iCAAgC;AAChC,+BAA8B"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tempo.ts",
3
3
  "type": "module",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "scripts": {
6
6
  "build": "zshy --project ./tsconfig.build.json",
7
7
  "changeset:publish": "bun run build && changeset publish",
@@ -1,4 +1,3 @@
1
- import { setTimeout } from 'node:timers/promises'
2
1
  import { Authorization, Hex, Rlp, RpcTransport, Secp256k1, Value } from 'ox'
3
2
  import { TransactionEnvelopeFeeToken } from 'tempo.ts/ox'
4
3
  import { Instance } from 'tempo.ts/prool'
@@ -1091,110 +1090,16 @@ describe('e2e', () => {
1091
1090
  },
1092
1091
  )
1093
1092
 
1094
- const hash = await transport.request({
1095
- method: 'eth_sendRawTransaction',
1093
+ const receipt = await transport.request({
1094
+ method: 'eth_sendRawTransactionSync',
1096
1095
  params: [serialized_signed],
1097
1096
  })
1098
1097
 
1099
- expect(hash).toBeDefined()
1100
- {
1101
- const response = await transport.request({
1102
- method: 'eth_getTransactionByHash',
1103
- params: [hash],
1104
- })
1105
-
1106
- expect(response).toMatchInlineSnapshot(`
1107
- {
1108
- "accessList": [],
1109
- "authorizationList": [],
1110
- "blockHash": null,
1111
- "blockNumber": null,
1112
- "chainId": "0x539",
1113
- "feePayerSignature": {
1114
- "r": "0xffc8a1a6c9e4f8cb7e796ff0521d9172d29c87664365f25bb3fb599aee562040",
1115
- "s": "0x47f505ea8cf3ad98dc20864119c160bf3c5f706c13e0f13283d9dec869b3cb8e",
1116
- "v": "0x1",
1117
- "yParity": "0x1",
1118
- },
1119
- "feeToken": null,
1120
- "from": "0x0a275bee91b39092dfd57089dee0eb0539020b90",
1121
- "gas": "0x5208",
1122
- "gasPrice": "0x59",
1123
- "hash": "0x872e61efb1d53706b955f7a0dfc14de5a060bffb1237b32ca7ace529329d3ffd",
1124
- "input": "0x",
1125
- "maxFeePerGas": "0x59",
1126
- "maxPriorityFeePerGas": "0x59",
1127
- "nonce": "0x0",
1128
- "r": "0xefe01851e57c9cb6401daced9013773302816a3c9280153c3ec1839650ac24d8",
1129
- "s": "0xa06f8aa8dce5f90da82f528c9c9e7f427ee40896427509f9f734b6b63fb59bc",
1130
- "to": "0x0000000000000000000000000000000000000000",
1131
- "transactionIndex": null,
1132
- "type": "0x77",
1133
- "v": "0x1",
1134
- "value": "0x0",
1135
- "yParity": "0x1",
1136
- }
1137
- `)
1138
- }
1139
-
1140
- // Wait for inclusion.
1141
- await setTimeout(4)
1142
-
1143
- {
1144
- const response = await transport.request({
1145
- method: 'eth_getTransactionByHash',
1146
- params: [hash],
1147
- })
1148
- if (!response) throw new Error()
1149
-
1150
- const { blockNumber, blockHash, ...rest } = response
1151
-
1152
- expect(blockNumber).toBeDefined()
1153
- expect(blockHash).toBeDefined()
1154
- expect(rest).toMatchInlineSnapshot(`
1155
- {
1156
- "accessList": [],
1157
- "authorizationList": [],
1158
- "chainId": "0x539",
1159
- "feePayerSignature": {
1160
- "r": "0xffc8a1a6c9e4f8cb7e796ff0521d9172d29c87664365f25bb3fb599aee562040",
1161
- "s": "0x47f505ea8cf3ad98dc20864119c160bf3c5f706c13e0f13283d9dec869b3cb8e",
1162
- "v": "0x1",
1163
- "yParity": "0x1",
1164
- },
1165
- "feeToken": null,
1166
- "from": "0x0a275bee91b39092dfd57089dee0eb0539020b90",
1167
- "gas": "0x5208",
1168
- "gasPrice": "0x59",
1169
- "hash": "0x872e61efb1d53706b955f7a0dfc14de5a060bffb1237b32ca7ace529329d3ffd",
1170
- "input": "0x",
1171
- "maxFeePerGas": "0x59",
1172
- "maxPriorityFeePerGas": "0x59",
1173
- "nonce": "0x0",
1174
- "r": "0xefe01851e57c9cb6401daced9013773302816a3c9280153c3ec1839650ac24d8",
1175
- "s": "0xa06f8aa8dce5f90da82f528c9c9e7f427ee40896427509f9f734b6b63fb59bc",
1176
- "to": "0x0000000000000000000000000000000000000000",
1177
- "transactionIndex": "0x0",
1178
- "type": "0x77",
1179
- "v": "0x1",
1180
- "value": "0x0",
1181
- "yParity": "0x1",
1182
- }
1183
- `)
1184
- }
1185
-
1186
- {
1187
- const receipt = await transport.request({
1188
- method: 'eth_getTransactionReceipt',
1189
- params: [hash],
1190
- })
1191
- if (!receipt) throw new Error()
1192
-
1193
- const { blockNumber, blockHash, ...rest } = receipt
1098
+ const { blockNumber, blockHash, ...rest } = receipt
1194
1099
 
1195
- expect(blockNumber).toBeDefined()
1196
- expect(blockHash).toBeDefined()
1197
- expect(rest).toMatchInlineSnapshot(`
1100
+ expect(blockNumber).toBeDefined()
1101
+ expect(blockHash).toBeDefined()
1102
+ expect(rest).toMatchInlineSnapshot(`
1198
1103
  {
1199
1104
  "contractAddress": null,
1200
1105
  "cumulativeGasUsed": "0x5208",
@@ -1210,6 +1115,5 @@ describe('e2e', () => {
1210
1115
  "type": "0x77",
1211
1116
  }
1212
1117
  `)
1213
- }
1214
1118
  })
1215
1119
  })
package/src/viem/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './abis.js'
2
2
  export * as actions from './actions/index.js'
3
+ export * from './addresses.js'
3
4
  export * from './chain.js'
4
5
  export * from './client.js'
5
6
  export { decorator as tempoActions } from './decorator.js'