tapimo 0.4.3 → 0.5.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.
Files changed (192) hide show
  1. package/dist/App.d.ts +7222 -6316
  2. package/dist/App.d.ts.map +1 -1
  3. package/dist/App.js +4 -0
  4. package/dist/App.js.map +1 -1
  5. package/dist/Scope.d.ts +18 -1
  6. package/dist/Scope.d.ts.map +1 -1
  7. package/dist/Scope.js +24 -3
  8. package/dist/Scope.js.map +1 -1
  9. package/dist/admin/apps/verified-tokens.d.ts +116 -116
  10. package/dist/apps/data/App.d.ts +2541 -2607
  11. package/dist/apps/data/App.d.ts.map +1 -1
  12. package/dist/apps/data/App.js +135 -44
  13. package/dist/apps/data/App.js.map +1 -1
  14. package/dist/apps/data/FundingQuoteProviders.d.ts +36 -0
  15. package/dist/apps/data/FundingQuoteProviders.d.ts.map +1 -0
  16. package/dist/apps/data/FundingQuoteProviders.js +190 -0
  17. package/dist/apps/data/FundingQuoteProviders.js.map +1 -0
  18. package/dist/apps/data/index.d.ts +1 -1
  19. package/dist/apps/data/index.js +1 -1
  20. package/dist/apps/data/routes/activities.d.ts +242 -242
  21. package/dist/apps/data/routes/addresses.d.ts +227 -227
  22. package/dist/apps/data/routes/balances.d.ts +12 -12
  23. package/dist/apps/data/routes/balances.d.ts.map +1 -1
  24. package/dist/apps/data/routes/balances.js +67 -149
  25. package/dist/apps/data/routes/balances.js.map +1 -1
  26. package/dist/apps/data/routes/blocks.d.ts +125 -126
  27. package/dist/apps/data/routes/blocks.d.ts.map +1 -1
  28. package/dist/apps/data/routes/blocks.js +3 -5
  29. package/dist/apps/data/routes/blocks.js.map +1 -1
  30. package/dist/apps/data/routes/coingecko.d.ts +55 -54
  31. package/dist/apps/data/routes/coingecko.d.ts.map +1 -1
  32. package/dist/apps/data/routes/coingecko.js +3 -8
  33. package/dist/apps/data/routes/coingecko.js.map +1 -1
  34. package/dist/apps/data/routes/exchanges.d.ts +455 -455
  35. package/dist/apps/data/routes/fee-amm.d.ts +92 -92
  36. package/dist/apps/data/routes/funding.d.ts +91 -864
  37. package/dist/apps/data/routes/funding.d.ts.map +1 -1
  38. package/dist/apps/data/routes/funding.js +138 -450
  39. package/dist/apps/data/routes/funding.js.map +1 -1
  40. package/dist/apps/data/routes/rpc.d.ts.map +1 -1
  41. package/dist/apps/data/routes/rpc.js +86 -16
  42. package/dist/apps/data/routes/rpc.js.map +1 -1
  43. package/dist/apps/data/routes/tokenlist.d.ts +36 -36
  44. package/dist/apps/data/routes/webhooks.d.ts +340 -0
  45. package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
  46. package/dist/apps/data/routes/webhooks.js +13 -1
  47. package/dist/apps/data/routes/webhooks.js.map +1 -1
  48. package/dist/apps/index.d.ts +1 -1
  49. package/dist/apps/index.js +1 -1
  50. package/dist/apps/management/App.d.ts +1843 -861
  51. package/dist/apps/management/App.d.ts.map +1 -1
  52. package/dist/apps/management/App.js +4 -0
  53. package/dist/apps/management/App.js.map +1 -1
  54. package/dist/apps/management/routes/api-keys.d.ts +121 -121
  55. package/dist/apps/management/routes/api-keys.js +2 -2
  56. package/dist/apps/management/routes/api-keys.js.map +1 -1
  57. package/dist/apps/management/routes/billing.d.ts +2 -2
  58. package/dist/apps/management/routes/invite-links.d.ts +1100 -0
  59. package/dist/apps/management/routes/invite-links.d.ts.map +1 -0
  60. package/dist/apps/management/routes/invite-links.js +411 -0
  61. package/dist/apps/management/routes/invite-links.js.map +1 -0
  62. package/dist/apps/management/routes/me.d.ts +13 -13
  63. package/dist/apps/management/routes/members.d.ts +77 -77
  64. package/dist/apps/management/routes/orgs.d.ts +96 -96
  65. package/dist/apps/management/routes/projects.d.ts +62 -62
  66. package/dist/apps/management/routes/scopes.d.ts +11 -11
  67. package/dist/apps/management/routes/scopes.d.ts.map +1 -1
  68. package/dist/apps/management/routes/scopes.js +2 -2
  69. package/dist/apps/management/routes/scopes.js.map +1 -1
  70. package/dist/apps/management/routes/usage.d.ts +79 -79
  71. package/dist/apps/mcp.d.ts.map +1 -1
  72. package/dist/apps/mcp.js +3 -1
  73. package/dist/apps/mcp.js.map +1 -1
  74. package/dist/apps/relay/App.d.ts.map +1 -1
  75. package/dist/apps/relay/App.js +42 -4
  76. package/dist/apps/relay/App.js.map +1 -1
  77. package/dist/cloudflare.d.ts +2 -0
  78. package/dist/cloudflare.d.ts.map +1 -1
  79. package/dist/cloudflare.js +4 -0
  80. package/dist/cloudflare.js.map +1 -1
  81. package/dist/db/Db.d.ts +3 -0
  82. package/dist/db/Db.d.ts.map +1 -1
  83. package/dist/db/Db.js +57 -0
  84. package/dist/db/Db.js.map +1 -1
  85. package/dist/db/Schema.d.ts +31 -0
  86. package/dist/db/Schema.d.ts.map +1 -1
  87. package/dist/db/Schema.js +31 -0
  88. package/dist/db/Schema.js.map +1 -1
  89. package/dist/db/tables/inviteLinks.d.ts +42 -0
  90. package/dist/db/tables/inviteLinks.d.ts.map +1 -0
  91. package/dist/db/tables/inviteLinks.js +148 -0
  92. package/dist/db/tables/inviteLinks.js.map +1 -0
  93. package/dist/db/tables/organizations.d.ts.map +1 -1
  94. package/dist/db/tables/organizations.js +2 -0
  95. package/dist/db/tables/organizations.js.map +1 -1
  96. package/dist/handlers/relay.d.ts.map +1 -1
  97. package/dist/handlers/relay.js +13 -3
  98. package/dist/handlers/relay.js.map +1 -1
  99. package/dist/internal/Auth.d.ts +42 -23
  100. package/dist/internal/Auth.d.ts.map +1 -1
  101. package/dist/internal/Auth.js +169 -20
  102. package/dist/internal/Auth.js.map +1 -1
  103. package/dist/internal/EdgeCache.d.ts +3 -1
  104. package/dist/internal/EdgeCache.d.ts.map +1 -1
  105. package/dist/internal/EdgeCache.js +17 -2
  106. package/dist/internal/EdgeCache.js.map +1 -1
  107. package/dist/internal/Errors.d.ts +6 -0
  108. package/dist/internal/Errors.d.ts.map +1 -0
  109. package/dist/internal/Errors.js +16 -0
  110. package/dist/internal/Errors.js.map +1 -0
  111. package/dist/internal/FundingQuotes.d.ts +644 -0
  112. package/dist/internal/FundingQuotes.d.ts.map +1 -0
  113. package/dist/internal/{FundingRoutes.js → FundingQuotes.js} +93 -289
  114. package/dist/internal/FundingQuotes.js.map +1 -0
  115. package/dist/internal/Store.d.ts +61 -16
  116. package/dist/internal/Store.d.ts.map +1 -1
  117. package/dist/internal/Store.js +72 -17
  118. package/dist/internal/Store.js.map +1 -1
  119. package/dist/internal/Viem.d.ts +2 -0
  120. package/dist/internal/Viem.d.ts.map +1 -1
  121. package/dist/internal/Viem.js +11 -2
  122. package/dist/internal/Viem.js.map +1 -1
  123. package/dist/internal/index.d.ts +27 -0
  124. package/dist/internal/index.d.ts.map +1 -0
  125. package/dist/internal/index.js +27 -0
  126. package/dist/internal/index.js.map +1 -0
  127. package/package.json +8 -3
  128. package/src/ApiKeys.test.ts +23 -0
  129. package/src/App.test-d.ts +2 -0
  130. package/src/App.test.ts +60 -4
  131. package/src/App.ts +6 -0
  132. package/src/Client.test-d.ts +16 -54
  133. package/src/Scope.test.ts +1 -0
  134. package/src/Scope.ts +30 -4
  135. package/src/apps/data/App.test.ts +354 -0
  136. package/src/apps/data/App.ts +159 -52
  137. package/src/apps/data/FundingQuoteProviders.test.ts +151 -0
  138. package/src/apps/data/FundingQuoteProviders.ts +251 -0
  139. package/src/apps/data/index.ts +1 -1
  140. package/src/apps/data/routes/balances.test.ts +64 -18
  141. package/src/apps/data/routes/balances.ts +76 -177
  142. package/src/apps/data/routes/blocks.ts +3 -5
  143. package/src/apps/data/routes/coingecko.ts +3 -8
  144. package/src/apps/data/routes/funding.test.ts +149 -306
  145. package/src/apps/data/routes/funding.ts +154 -604
  146. package/src/apps/data/routes/indexer.test.ts +99 -3
  147. package/src/apps/data/routes/rpc.test.ts +219 -0
  148. package/src/apps/data/routes/rpc.ts +92 -17
  149. package/src/apps/data/routes/webhooks.test.ts +23 -2
  150. package/src/apps/data/routes/webhooks.ts +13 -1
  151. package/src/apps/index.ts +1 -1
  152. package/src/apps/management/App.ts +4 -0
  153. package/src/apps/management/routes/api-keys.test.ts +47 -3
  154. package/src/apps/management/routes/api-keys.ts +2 -2
  155. package/src/apps/management/routes/invite-links.test.ts +385 -0
  156. package/src/apps/management/routes/invite-links.ts +570 -0
  157. package/src/apps/management/routes/scopes.test.ts +3 -2
  158. package/src/apps/management/routes/scopes.ts +4 -2
  159. package/src/apps/mcp.test.ts +55 -14
  160. package/src/apps/mcp.ts +3 -1
  161. package/src/apps/relay/App.test.ts +324 -4
  162. package/src/apps/relay/App.ts +40 -4
  163. package/src/cloudflare.ts +5 -0
  164. package/src/db/Db.ts +65 -0
  165. package/src/db/Schema.ts +39 -0
  166. package/src/db/tables/inviteLinks.ts +187 -0
  167. package/src/db/tables/organizations.ts +2 -0
  168. package/src/handlers/relay.ts +16 -4
  169. package/src/internal/Auth.test.ts +528 -37
  170. package/src/internal/Auth.ts +246 -45
  171. package/src/internal/EdgeCache.test.ts +24 -3
  172. package/src/internal/EdgeCache.ts +18 -2
  173. package/src/internal/FundingQuotes.test.ts +174 -0
  174. package/src/internal/FundingQuotes.ts +735 -0
  175. package/src/internal/Log.test.ts +4 -4
  176. package/src/internal/Store.test-d.ts +15 -0
  177. package/src/internal/Store.test.ts +153 -2
  178. package/src/internal/Store.ts +157 -41
  179. package/src/internal/Viem.ts +14 -5
  180. package/src/internal/index.test.ts +34 -0
  181. package/src/internal/index.ts +26 -0
  182. package/dist/apps/data/FundingRouteProviders.d.ts +0 -143
  183. package/dist/apps/data/FundingRouteProviders.d.ts.map +0 -1
  184. package/dist/apps/data/FundingRouteProviders.js +0 -546
  185. package/dist/apps/data/FundingRouteProviders.js.map +0 -1
  186. package/dist/internal/FundingRoutes.d.ts +0 -1085
  187. package/dist/internal/FundingRoutes.d.ts.map +0 -1
  188. package/dist/internal/FundingRoutes.js.map +0 -1
  189. package/src/apps/data/FundingRouteProviders.test.ts +0 -485
  190. package/src/apps/data/FundingRouteProviders.ts +0 -744
  191. package/src/internal/FundingRoutes.test.ts +0 -239
  192. package/src/internal/FundingRoutes.ts +0 -1067
package/src/db/Schema.ts CHANGED
@@ -81,6 +81,45 @@ export const Invitation = z.object({
81
81
  /** Columns of the `invitations` table. */
82
82
  export type Invitation = z.output<typeof Invitation>
83
83
 
84
+ /** A reusable bearer link granting organization membership. */
85
+ export const InviteLink = z.object({
86
+ createdAt: z.string().check(z.describe('When the link was created (ISO 8601).')),
87
+ createdBy: z.string().check(z.describe('User id that created the link, or `super_admin`.')),
88
+ deletedAt: z.nullable(z.string()).check(z.describe('When the link was soft deleted, or null.')),
89
+ enabled: z.boolean().check(z.describe('Whether the link is enabled.')),
90
+ expiresAt: z.nullable(z.string()).check(z.describe('When the link expires, or null.')),
91
+ id: z.string().check(z.describe('Opaque invite-link resource id (`iln_…`).')),
92
+ lastUsedAt: z
93
+ .nullable(z.string())
94
+ .check(z.describe('When the link last created a membership, or null.')),
95
+ maxUses: z
96
+ .nullable(z.number().check(z.int(), z.positive()))
97
+ .check(z.describe('Maximum redemptions, or null.')),
98
+ name: z.string().check(z.describe('Link name.')),
99
+ orgId: z.string().check(z.describe('Organization id (`org_…`).')),
100
+ role: z.literal('member').check(z.describe('Non-privileged role granted by the link.')),
101
+ token: z.string().check(z.describe('Opaque invite-link bearer token (`lnk_…`).')),
102
+ updatedAt: z.string().check(z.describe('When the link was last changed (ISO 8601).')),
103
+ useCount: z.number().check(z.int(), z.nonnegative(), z.describe('Successful redemption count.')),
104
+ })
105
+
106
+ /** Columns of the `invite_links` table. */
107
+ export type InviteLink = z.output<typeof InviteLink>
108
+
109
+ /** An audit record for one membership created through an invite link. */
110
+ export const InviteLinkRedemption = z.object({
111
+ createdAt: z.string().check(z.describe('When the link was redeemed (ISO 8601).')),
112
+ email: z.string().check(z.describe('Verified email used for redemption.')),
113
+ id: z.string().check(z.describe('Opaque redemption id (`ilr_…`).')),
114
+ inviteLinkId: z.string().check(z.describe('Invite-link id.')),
115
+ inviteLinkName: z.string().check(z.describe('Invite-link name at redemption time.')),
116
+ orgId: z.string().check(z.describe('Organization id.')),
117
+ userId: z.string().check(z.describe('Redeeming user id.')),
118
+ })
119
+
120
+ /** Columns of the `invite_link_redemptions` table. */
121
+ export type InviteLinkRedemption = z.output<typeof InviteLinkRedemption>
122
+
84
123
  /** A user's role within an organization. */
85
124
  export const Membership = z.object({
86
125
  createdAt: z.string().check(z.describe('When the membership was created (ISO 8601).')),
@@ -0,0 +1,187 @@
1
+ import type { Selectable } from 'kysely'
2
+
3
+ import * as Id from '../../internal/Id.js'
4
+ import type * as Db from '../Db.js'
5
+ import type * as db_Schema from '../Schema.js'
6
+
7
+ /** Columns of the `invite_links` table. */
8
+ export type Table = db_Schema.InviteLink
9
+ /** Columns of the `invite_link_redemptions` table. */
10
+ export type RedemptionTable = db_Schema.InviteLinkRedemption
11
+ /** A stored invite link. */
12
+ export type Record = Selectable<Table>
13
+ /** A stored redemption. */
14
+ export type Redemption = Selectable<RedemptionTable>
15
+ /** Derived link availability. */
16
+ export type Status = 'active' | 'deleted' | 'disabled' | 'exhausted' | 'expired'
17
+
18
+ /** Derives current availability from persisted controls and count. */
19
+ export function status(record: Record, now = new Date().toISOString()): Status {
20
+ if (record.deletedAt) return 'deleted'
21
+ if (!record.enabled) return 'disabled'
22
+ if (record.expiresAt && record.expiresAt <= now) return 'expired'
23
+ if (record.maxUses !== null && record.useCount >= record.maxUses) return 'exhausted'
24
+ return 'active'
25
+ }
26
+
27
+ /** Creates a reusable invite link. */
28
+ export function create(
29
+ db: Db.Db,
30
+ input: {
31
+ createdBy: string
32
+ expiresAt: string | null
33
+ maxUses: number | null
34
+ name?: string | undefined
35
+ orgId: string
36
+ role: 'member'
37
+ },
38
+ ): Promise<Record> {
39
+ const now = new Date().toISOString()
40
+ return db.kysely
41
+ .insertInto('invite_links')
42
+ .values({
43
+ createdAt: now,
44
+ createdBy: input.createdBy,
45
+ deletedAt: null,
46
+ enabled: true,
47
+ expiresAt: input.expiresAt,
48
+ id: Id.generate('iln'),
49
+ lastUsedAt: null,
50
+ maxUses: input.maxUses,
51
+ name: input.name ?? 'Untitled link',
52
+ orgId: input.orgId,
53
+ role: input.role,
54
+ token: Id.generate('lnk'),
55
+ updatedAt: now,
56
+ useCount: 0,
57
+ })
58
+ .returningAll()
59
+ .executeTakeFirstOrThrow()
60
+ }
61
+
62
+ /** Lists non-deleted links in an organization. */
63
+ export function list(db: Db.Db, orgId: string): Promise<Record[]> {
64
+ return db.kysely
65
+ .selectFrom('invite_links')
66
+ .selectAll()
67
+ .where('orgId', '=', orgId)
68
+ .where('deletedAt', 'is', null)
69
+ .orderBy('createdAt', 'desc')
70
+ .execute()
71
+ }
72
+
73
+ /** Gets an invite link by its management id, including deleted links. */
74
+ export function get(db: Db.Db, id: string): Promise<Record | undefined> {
75
+ return db.kysely.selectFrom('invite_links').selectAll().where('id', '=', id).executeTakeFirst()
76
+ }
77
+
78
+ /** Gets an invite link by its bearer token, including deleted links. */
79
+ export function getByToken(db: Db.Db, token: string): Promise<Record | undefined> {
80
+ return db.kysely
81
+ .selectFrom('invite_links')
82
+ .selectAll()
83
+ .where('token', '=', token)
84
+ .executeTakeFirst()
85
+ }
86
+
87
+ /** Updates an org-scoped non-deleted link. */
88
+ export function update(
89
+ db: Db.Db,
90
+ orgId: string,
91
+ id: string,
92
+ enabled: boolean,
93
+ ): Promise<Record | undefined> {
94
+ return db.kysely
95
+ .updateTable('invite_links')
96
+ .set({ enabled, updatedAt: new Date().toISOString() })
97
+ .where('id', '=', id)
98
+ .where('orgId', '=', orgId)
99
+ .where('deletedAt', 'is', null)
100
+ .returningAll()
101
+ .executeTakeFirst()
102
+ }
103
+
104
+ /** Soft deletes an org-scoped link. */
105
+ export function remove(db: Db.Db, orgId: string, id: string): Promise<Record | undefined> {
106
+ const now = new Date().toISOString()
107
+ return db.kysely
108
+ .updateTable('invite_links')
109
+ .set({ deletedAt: now, updatedAt: now })
110
+ .where('id', '=', id)
111
+ .where('orgId', '=', orgId)
112
+ .where('deletedAt', 'is', null)
113
+ .returningAll()
114
+ .executeTakeFirst()
115
+ }
116
+
117
+ /** Lists redemption audit records, newest first. */
118
+ export function listRedemptions(
119
+ db: Db.Db,
120
+ orgId: string,
121
+ inviteLinkId: string,
122
+ ): Promise<Redemption[]> {
123
+ return db.kysely
124
+ .selectFrom('invite_link_redemptions')
125
+ .selectAll()
126
+ .where('orgId', '=', orgId)
127
+ .where('inviteLinkId', '=', inviteLinkId)
128
+ .orderBy('createdAt', 'desc')
129
+ .execute()
130
+ }
131
+
132
+ /** Atomically joins through an active link, consuming only a newly inserted membership. */
133
+ export function accept(
134
+ db: Db.Db,
135
+ token: string,
136
+ userId: string,
137
+ email: string,
138
+ ): Promise<{ link: Record; consumed: boolean } | undefined> {
139
+ return db.kysely.transaction().execute(async (trx) => {
140
+ const now = new Date().toISOString()
141
+ const link = await trx
142
+ .selectFrom('invite_links')
143
+ .selectAll()
144
+ .where('token', '=', token)
145
+ .forUpdate()
146
+ .executeTakeFirst()
147
+ if (!link) return undefined
148
+ // Existing membership is already the desired end state, so retries remain
149
+ // successful after the link becomes unavailable and never consume capacity.
150
+ const existing = await trx
151
+ .selectFrom('memberships')
152
+ .select('userId')
153
+ .where('orgId', '=', link.orgId)
154
+ .where('userId', '=', userId)
155
+ .executeTakeFirst()
156
+ if (existing) return { consumed: false, link }
157
+ if (status(link, now) !== 'active') return undefined
158
+ const inserted = await trx
159
+ .insertInto('memberships')
160
+ .values({ createdAt: now, orgId: link.orgId, role: 'member', updatedAt: now, userId })
161
+ .onConflict((oc) => oc.columns(['orgId', 'userId']).doNothing())
162
+ .returning('userId')
163
+ .executeTakeFirst()
164
+ if (!inserted) return { consumed: false, link }
165
+ await trx
166
+ .updateTable('invite_links')
167
+ .set({ lastUsedAt: now, updatedAt: now, useCount: link.useCount + 1 })
168
+ .where('id', '=', link.id)
169
+ .execute()
170
+ await trx
171
+ .insertInto('invite_link_redemptions')
172
+ .values({
173
+ createdAt: now,
174
+ email: email.toLowerCase(),
175
+ id: Id.generate('ilr'),
176
+ inviteLinkId: link.id,
177
+ inviteLinkName: link.name,
178
+ orgId: link.orgId,
179
+ userId,
180
+ })
181
+ .execute()
182
+ return {
183
+ consumed: true,
184
+ link: { ...link, lastUsedAt: now, updatedAt: now, useCount: link.useCount + 1 },
185
+ }
186
+ })
187
+ }
@@ -112,6 +112,8 @@ export function deleteOrganization(db: Db.Db, id: string): Promise<boolean> {
112
112
  .execute()
113
113
  await trx.deleteFrom('billing_settings').where('orgId', '=', id).execute()
114
114
  await trx.deleteFrom('invitations').where('orgId', '=', id).execute()
115
+ await trx.deleteFrom('invite_link_redemptions').where('orgId', '=', id).execute()
116
+ await trx.deleteFrom('invite_links').where('orgId', '=', id).execute()
115
117
  await trx.deleteFrom('memberships').where('orgId', '=', id).execute()
116
118
  await trx.deleteFrom('projects').where('orgId', '=', id).execute()
117
119
  await trx.deleteFrom('request_usage_buckets').where('orgId', '=', id).execute()
@@ -116,15 +116,27 @@ export function relay(options: relay.Options = {}): Handler {
116
116
  ) {
117
117
  await onRequest?.(request)
118
118
 
119
- // Resolve chainId from: 1) explicit option (URL path), 2) first param object, 3) default chain.
120
119
  const params = 'params' in request && Array.isArray(request.params) ? request.params : []
121
120
  const first =
122
121
  typeof params[0] === 'object' && params[0]
123
122
  ? (params[0] as Record<string, unknown>)
124
123
  : undefined
125
- const chainId =
126
- Utils.resolveChainId(first?.['chainId']) ?? options?.chainId ?? getClient().chain?.id
127
- const client = getClient(chainId)
124
+ const chainId_body = Utils.resolveChainId(first?.['chainId'])
125
+ const chainId_path = options?.chainId
126
+ if (chainId_body !== undefined && chainId_path !== undefined && chainId_body !== chainId_path)
127
+ return Utils.rpcErrorJson(
128
+ request,
129
+ new RpcResponse.InvalidParamsError({ message: 'Conflicting chain ids.' }),
130
+ )
131
+
132
+ let chainId: number | undefined
133
+ let client: Client
134
+ try {
135
+ chainId = chainId_path ?? chainId_body ?? getClient().chain?.id
136
+ client = getClient(chainId)
137
+ } catch (error) {
138
+ return Utils.rpcErrorJson(request, error)
139
+ }
128
140
 
129
141
  switch (request.method) {
130
142
  case 'eth_fillTransaction': {