@sentio/sdk 4.6.2-rc.1 → 4.6.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.
- package/dist/aptos/builtin/0x1.d.ts +74 -0
- package/dist/aptos/builtin/0x1.d.ts.map +1 -1
- package/dist/aptos/builtin/0x1.js +139 -1
- package/dist/aptos/builtin/0x1.js.map +1 -1
- package/dist/aptos/builtin/0x3.js +1 -1
- package/dist/aptos/builtin/0x4.js +1 -1
- package/dist/iota/builtin/0x2.js +1 -1
- package/dist/iota/builtin/0x2.js.map +1 -1
- package/dist/iota/builtin/0x3.d.ts +8 -3
- package/dist/iota/builtin/0x3.d.ts.map +1 -1
- package/dist/iota/builtin/0x3.js +2 -1
- package/dist/iota/builtin/0x3.js.map +1 -1
- package/dist/sui/builtin/0x1.d.ts +44 -0
- package/dist/sui/builtin/0x1.d.ts.map +1 -1
- package/dist/sui/builtin/0x1.js +161 -1
- package/dist/sui/builtin/0x1.js.map +1 -1
- package/dist/sui/builtin/0x2.d.ts +9 -0
- package/dist/sui/builtin/0x2.d.ts.map +1 -1
- package/dist/sui/builtin/0x2.js +76 -1
- package/dist/sui/builtin/0x2.js.map +1 -1
- package/dist/sui/to-client-types.d.ts.map +1 -1
- package/dist/sui/to-client-types.js +6 -2
- package/dist/sui/to-client-types.js.map +1 -1
- package/package.json +10 -10
- package/src/aptos/abis/0x1.json +1053 -507
- package/src/aptos/abis/0x3.json +12 -12
- package/src/aptos/abis/0x4.json +28 -28
- package/src/aptos/builtin/0x1.ts +261 -3
- package/src/aptos/builtin/0x3.ts +1 -1
- package/src/aptos/builtin/0x4.ts +1 -1
- package/src/iota/abis/0x2.json +6 -1
- package/src/iota/abis/0x3.json +2 -1
- package/src/iota/builtin/0x2.ts +1 -1
- package/src/iota/builtin/0x3.ts +6 -3
- package/src/sui/abis/0x1.json +241 -0
- package/src/sui/abis/0x2.json +104 -37
- package/src/sui/builtin/0x1.ts +247 -1
- package/src/sui/builtin/0x2.ts +110 -3
- 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
|
-
//
|
|
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
|
|
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
|