@sentio/sdk 4.6.1 → 4.6.2-rc.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.
Files changed (39) hide show
  1. package/dist/aptos/builtin/0x1.d.ts +74 -0
  2. package/dist/aptos/builtin/0x1.d.ts.map +1 -1
  3. package/dist/aptos/builtin/0x1.js +139 -1
  4. package/dist/aptos/builtin/0x1.js.map +1 -1
  5. package/dist/aptos/builtin/0x3.js +1 -1
  6. package/dist/aptos/builtin/0x4.js +1 -1
  7. package/dist/iota/builtin/0x2.js +1 -1
  8. package/dist/iota/builtin/0x2.js.map +1 -1
  9. package/dist/iota/builtin/0x3.d.ts +8 -3
  10. package/dist/iota/builtin/0x3.d.ts.map +1 -1
  11. package/dist/iota/builtin/0x3.js +2 -1
  12. package/dist/iota/builtin/0x3.js.map +1 -1
  13. package/dist/sui/builtin/0x1.d.ts +44 -0
  14. package/dist/sui/builtin/0x1.d.ts.map +1 -1
  15. package/dist/sui/builtin/0x1.js +161 -1
  16. package/dist/sui/builtin/0x1.js.map +1 -1
  17. package/dist/sui/builtin/0x2.d.ts +9 -0
  18. package/dist/sui/builtin/0x2.d.ts.map +1 -1
  19. package/dist/sui/builtin/0x2.js +76 -1
  20. package/dist/sui/builtin/0x2.js.map +1 -1
  21. package/dist/sui/to-client-types.d.ts.map +1 -1
  22. package/dist/sui/to-client-types.js +6 -2
  23. package/dist/sui/to-client-types.js.map +1 -1
  24. package/package.json +14 -11
  25. package/src/aptos/abis/0x1.json +1053 -507
  26. package/src/aptos/abis/0x3.json +12 -12
  27. package/src/aptos/abis/0x4.json +28 -28
  28. package/src/aptos/builtin/0x1.ts +261 -3
  29. package/src/aptos/builtin/0x3.ts +1 -1
  30. package/src/aptos/builtin/0x4.ts +1 -1
  31. package/src/iota/abis/0x2.json +6 -1
  32. package/src/iota/abis/0x3.json +2 -1
  33. package/src/iota/builtin/0x2.ts +1 -1
  34. package/src/iota/builtin/0x3.ts +6 -3
  35. package/src/sui/abis/0x1.json +241 -0
  36. package/src/sui/abis/0x2.json +104 -37
  37. package/src/sui/builtin/0x1.ts +247 -1
  38. package/src/sui/builtin/0x2.ts +110 -3
  39. package/src/sui/to-client-types.ts +6 -2
@@ -56,11 +56,14 @@ export async function toSuiClientObjects(rawObjects: any[]): Promise<SuiMoveObje
56
56
  // `GrpcCoreClient.getTransaction`, fed by an in-memory fake transport that hands
57
57
  // back our changes as a protobuf-ts `TransactionEffects` message.
58
58
  //
59
- // Two upstream-internal details this depends on (both asserted by
59
+ // Upstream-internal details this depends on (all asserted by
60
60
  // to-client-types.test.ts, which fails loudly if an upgrade changes them):
61
61
  // 1. `parseTransactionEffects` dereferences `effects.status.error` unguarded on
62
62
  // the non-success path, so a minimal `status: { success: true }` is required.
63
63
  // 2. `getTransaction` returns a `{ $kind: 'Transaction', Transaction }` union.
64
+ // 3. Since @mysten/sui 3, `parseGrpcTransactionResponse` throws unless
65
+ // `transaction.sender` is present. It only feeds the result's `sender`, which
66
+ // we discard, so a placeholder address is enough.
64
67
  // See https://github.com/MystenLabs/ts-sdks/blob/8588da38e0a813f87b345c348e63486a7a766a61/packages/sui/src/grpc/core.ts#L1132
65
68
  export async function toSuiClientChangedObjects(rawChanges: any[]): Promise<SuiClientTypes.ChangedObject[]> {
66
69
  if (rawChanges.length === 0) {
@@ -70,8 +73,9 @@ export async function toSuiClientChangedObjects(rawChanges: any[]): Promise<SuiC
70
73
  { status: { success: true }, changedObjects: rawChanges },
71
74
  { ignoreUnknownFields: true }
72
75
  )
76
+ const transaction = { digest: '', effects, transaction: { sender: '0x0' } }
73
77
  const core = new GrpcCoreClient({
74
- client: { ledgerService: { getTransaction: async () => ({ response: { transaction: { digest: '', effects } } }) } }
78
+ client: { ledgerService: { getTransaction: async () => ({ response: { transaction } }) } }
75
79
  } as any)
76
80
  const res: any = await core.getTransaction({ digest: '', include: { effects: true } })
77
81
  return (res.Transaction ?? res).effects.changedObjects