@mysten/sui 1.41.0 → 1.42.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/CHANGELOG.md +6 -0
- package/dist/cjs/grpc/client.d.ts +7 -7
- package/dist/cjs/grpc/client.js +7 -7
- package/dist/cjs/grpc/client.js.map +2 -2
- package/dist/cjs/grpc/core.d.ts +1 -1
- package/dist/cjs/grpc/core.js +14 -19
- package/dist/cjs/grpc/core.js.map +2 -2
- package/dist/cjs/grpc/proto/google/protobuf/any.d.ts +6 -6
- package/dist/cjs/grpc/proto/google/protobuf/any.js +20 -20
- package/dist/cjs/grpc/proto/google/protobuf/any.js.map +2 -2
- package/dist/cjs/grpc/proto/google/protobuf/duration.d.ts +4 -4
- package/dist/cjs/grpc/proto/google/protobuf/duration.js +12 -8
- package/dist/cjs/grpc/proto/google/protobuf/duration.js.map +2 -2
- package/dist/cjs/grpc/proto/google/protobuf/empty.d.ts +1 -1
- package/dist/cjs/grpc/proto/google/protobuf/empty.js.map +2 -2
- package/dist/cjs/grpc/proto/google/protobuf/field_mask.d.ts +4 -4
- package/dist/cjs/grpc/proto/google/protobuf/field_mask.js +7 -8
- package/dist/cjs/grpc/proto/google/protobuf/field_mask.js.map +2 -2
- package/dist/cjs/grpc/proto/google/protobuf/struct.d.ts +10 -10
- package/dist/cjs/grpc/proto/google/protobuf/struct.js +17 -29
- package/dist/cjs/grpc/proto/google/protobuf/struct.js.map +2 -2
- package/dist/cjs/grpc/proto/google/protobuf/timestamp.d.ts +4 -4
- package/dist/cjs/grpc/proto/google/protobuf/timestamp.js +18 -21
- package/dist/cjs/grpc/proto/google/protobuf/timestamp.js.map +2 -2
- package/dist/cjs/grpc/proto/google/rpc/error_details.d.ts +2 -2
- package/dist/cjs/grpc/proto/google/rpc/error_details.js +11 -40
- package/dist/cjs/grpc/proto/google/rpc/error_details.js.map +2 -2
- package/dist/cjs/grpc/proto/google/rpc/status.d.ts +2 -2
- package/dist/cjs/grpc/proto/google/rpc/status.js +1 -1
- package/dist/cjs/grpc/proto/google/rpc/status.js.map +2 -2
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/argument.d.ts +5 -5
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/argument.js +2 -8
- package/dist/cjs/grpc/proto/sui/rpc/v2/argument.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/balance_change.d.ts +3 -3
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/balance_change.js +1 -1
- package/dist/cjs/grpc/proto/sui/rpc/v2/balance_change.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/bcs.d.ts +3 -3
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/bcs.js +1 -1
- package/dist/cjs/grpc/proto/sui/rpc/v2/bcs.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint.d.ts +68 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/checkpoint.js +9 -12
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/checkpoint_contents.d.ts +10 -10
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/checkpoint_contents.js +6 -18
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_contents.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/checkpoint_summary.d.ts +19 -19
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/checkpoint_summary.js +16 -38
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_summary.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/effects.d.ts +33 -28
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/effects.js +23 -61
- package/dist/cjs/grpc/proto/sui/rpc/v2/effects.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/epoch.d.ts +10 -10
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/epoch.js +9 -5
- package/dist/cjs/grpc/proto/sui/rpc/v2/epoch.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/error_reason.d.ts +1 -1
- package/dist/cjs/grpc/proto/sui/rpc/v2/error_reason.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/event.d.ts +10 -10
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/event.js +4 -4
- package/dist/cjs/grpc/proto/sui/rpc/v2/event.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/executed_transaction.d.ts +19 -24
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/executed_transaction.js +12 -36
- package/dist/cjs/grpc/proto/sui/rpc/v2/executed_transaction.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/execution_status.d.ts +56 -56
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/execution_status.js +29 -87
- package/dist/cjs/grpc/proto/sui/rpc/v2/execution_status.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/gas_cost_summary.d.ts +3 -3
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/gas_cost_summary.js +5 -1
- package/dist/cjs/grpc/proto/sui/rpc/v2/gas_cost_summary.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/input.d.ts +6 -6
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/input.js +4 -9
- package/dist/cjs/grpc/proto/sui/rpc/v2/input.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.d.ts +70 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.js +88 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.client.d.ts +95 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/ledger_service.client.js +15 -57
- package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.client.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/ledger_service.d.ts +58 -58
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/ledger_service.js +37 -58
- package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/move_package.d.ts +49 -49
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package.js +31 -140
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.client.d.ts +61 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package_service.client.js +9 -33
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.client.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package_service.d.ts +28 -28
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package_service.js +16 -26
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.client.d.ts +14 -14
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.client.js +5 -17
- package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.client.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.d.ts +17 -17
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.js +13 -24
- package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/object.d.ts +31 -11
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/object.js +19 -6
- package/dist/cjs/grpc/proto/sui/rpc/v2/object.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/object_reference.d.ts +3 -3
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/object_reference.js +2 -1
- package/dist/cjs/grpc/proto/sui/rpc/v2/object_reference.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/owner.d.ts +5 -5
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/owner.js +3 -8
- package/dist/cjs/grpc/proto/sui/rpc/v2/owner.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/protocol_config.d.ts +3 -3
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/protocol_config.js +12 -23
- package/dist/cjs/grpc/proto/sui/rpc/v2/protocol_config.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/signature.d.ts +85 -72
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/signature.js +44 -95
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/signature_scheme.d.ts +1 -1
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_scheme.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_verification_service.client.d.ts +10 -10
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_verification_service.client.js +3 -9
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.client.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/signature_verification_service.d.ts +14 -14
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_verification_service.js +8 -9
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.d.ts +71 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.js +69 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2/live_data_service.d.ts → cjs/grpc/proto/sui/rpc/v2/state_service.d.ts} +70 -188
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2/live_data_service.js → v2/state_service.js} +43 -195
- package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/subscription_service.client.d.ts +12 -12
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/subscription_service.client.js +4 -10
- package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.client.js.map +7 -0
- package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/subscription_service.d.ts +11 -11
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/subscription_service.js +7 -12
- package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/system_state.d.ts +39 -39
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/system_state.js +68 -35
- package/dist/cjs/grpc/proto/sui/rpc/v2/system_state.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/transaction.d.ts +308 -288
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/transaction.js +144 -339
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.ts +41 -0
- package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/transaction_execution_service.client.js +10 -12
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js.map +7 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.d.ts +184 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.js +113 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.js.map +7 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/grpc/client.d.ts +7 -7
- package/dist/esm/grpc/client.js +7 -7
- package/dist/esm/grpc/client.js.map +2 -2
- package/dist/esm/grpc/core.d.ts +1 -1
- package/dist/esm/grpc/core.js +14 -19
- package/dist/esm/grpc/core.js.map +2 -2
- package/dist/esm/grpc/proto/google/protobuf/any.d.ts +6 -6
- package/dist/esm/grpc/proto/google/protobuf/any.js +20 -20
- package/dist/esm/grpc/proto/google/protobuf/any.js.map +2 -2
- package/dist/esm/grpc/proto/google/protobuf/duration.d.ts +4 -4
- package/dist/esm/grpc/proto/google/protobuf/duration.js +12 -8
- package/dist/esm/grpc/proto/google/protobuf/duration.js.map +2 -2
- package/dist/esm/grpc/proto/google/protobuf/empty.d.ts +1 -1
- package/dist/esm/grpc/proto/google/protobuf/empty.js.map +2 -2
- package/dist/esm/grpc/proto/google/protobuf/field_mask.d.ts +4 -4
- package/dist/esm/grpc/proto/google/protobuf/field_mask.js +7 -8
- package/dist/esm/grpc/proto/google/protobuf/field_mask.js.map +2 -2
- package/dist/esm/grpc/proto/google/protobuf/struct.d.ts +10 -10
- package/dist/esm/grpc/proto/google/protobuf/struct.js +17 -29
- package/dist/esm/grpc/proto/google/protobuf/struct.js.map +2 -2
- package/dist/esm/grpc/proto/google/protobuf/timestamp.d.ts +4 -4
- package/dist/esm/grpc/proto/google/protobuf/timestamp.js +18 -21
- package/dist/esm/grpc/proto/google/protobuf/timestamp.js.map +2 -2
- package/dist/esm/grpc/proto/google/rpc/error_details.d.ts +2 -2
- package/dist/esm/grpc/proto/google/rpc/error_details.js +11 -40
- package/dist/esm/grpc/proto/google/rpc/error_details.js.map +2 -2
- package/dist/esm/grpc/proto/google/rpc/status.d.ts +2 -2
- package/dist/esm/grpc/proto/google/rpc/status.js +1 -1
- package/dist/esm/grpc/proto/google/rpc/status.js.map +2 -2
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/argument.d.ts +5 -5
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/argument.js +2 -8
- package/dist/esm/grpc/proto/sui/rpc/v2/argument.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/balance_change.d.ts +3 -3
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/balance_change.js +1 -1
- package/dist/esm/grpc/proto/sui/rpc/v2/balance_change.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/bcs.d.ts +3 -3
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/bcs.js +1 -1
- package/dist/esm/grpc/proto/sui/rpc/v2/bcs.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint.d.ts +68 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/checkpoint.js +9 -12
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/checkpoint_contents.d.ts +10 -10
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/checkpoint_contents.js +6 -18
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_contents.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/checkpoint_summary.d.ts +19 -19
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/checkpoint_summary.js +16 -38
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_summary.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/effects.d.ts +33 -28
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/effects.js +23 -61
- package/dist/esm/grpc/proto/sui/rpc/v2/effects.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/epoch.d.ts +10 -10
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/epoch.js +9 -5
- package/dist/esm/grpc/proto/sui/rpc/v2/epoch.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/error_reason.d.ts +1 -1
- package/dist/esm/grpc/proto/sui/rpc/v2/error_reason.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/event.d.ts +10 -10
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/event.js +4 -4
- package/dist/esm/grpc/proto/sui/rpc/v2/event.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/executed_transaction.d.ts +19 -24
- package/dist/esm/grpc/proto/sui/rpc/v2/executed_transaction.js +43 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/executed_transaction.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/execution_status.d.ts +56 -56
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/execution_status.js +29 -87
- package/dist/esm/grpc/proto/sui/rpc/v2/execution_status.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/gas_cost_summary.d.ts +3 -3
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/gas_cost_summary.js +5 -1
- package/dist/esm/grpc/proto/sui/rpc/v2/gas_cost_summary.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/input.d.ts +6 -6
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/input.js +4 -9
- package/dist/esm/grpc/proto/sui/rpc/v2/input.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/jwk.d.ts +70 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/jwk.js +68 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/jwk.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.d.ts +95 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.js +65 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/ledger_service.d.ts +58 -58
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/ledger_service.js +37 -58
- package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/move_package.d.ts +49 -49
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package.js +31 -140
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.client.d.ts +61 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package_service.client.js +9 -33
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.client.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package_service.d.ts +28 -28
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package_service.js +16 -26
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.client.d.ts +14 -14
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.client.js +5 -17
- package/dist/esm/grpc/proto/sui/rpc/v2/name_service.client.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.d.ts +17 -17
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.js +13 -24
- package/dist/esm/grpc/proto/sui/rpc/v2/name_service.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/object.d.ts +31 -11
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/object.js +19 -6
- package/dist/esm/grpc/proto/sui/rpc/v2/object.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/object_reference.d.ts +3 -3
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/object_reference.js +2 -1
- package/dist/esm/grpc/proto/sui/rpc/v2/object_reference.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/owner.d.ts +5 -5
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/owner.js +3 -8
- package/dist/esm/grpc/proto/sui/rpc/v2/owner.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/protocol_config.d.ts +3 -3
- package/dist/esm/grpc/proto/sui/rpc/v2/protocol_config.js +31 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/protocol_config.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/signature.d.ts +85 -72
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/signature.js +44 -95
- package/dist/esm/grpc/proto/sui/rpc/v2/signature.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/signature_scheme.d.ts +1 -1
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_scheme.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_verification_service.client.d.ts +10 -10
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_verification_service.client.js +3 -9
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.client.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/signature_verification_service.d.ts +14 -14
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_verification_service.js +8 -9
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.d.ts +71 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.js +49 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2/live_data_service.d.ts → esm/grpc/proto/sui/rpc/v2/state_service.d.ts} +70 -188
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2/live_data_service.js → v2/state_service.js} +40 -192
- package/dist/esm/grpc/proto/sui/rpc/v2/state_service.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/subscription_service.client.d.ts +12 -12
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/subscription_service.client.js +4 -10
- package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.client.js.map +7 -0
- package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/subscription_service.d.ts +11 -11
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/subscription_service.js +7 -12
- package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/system_state.d.ts +39 -39
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/system_state.js +68 -35
- package/dist/esm/grpc/proto/sui/rpc/v2/system_state.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/transaction.d.ts +308 -288
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/transaction.js +142 -337
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.ts +41 -0
- package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/transaction_execution_service.client.js +10 -12
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js.map +7 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.d.ts +184 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.js +93 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.js.map +7 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/grpc/client.ts +8 -8
- package/src/grpc/core.ts +20 -26
- package/src/grpc/proto/google/protobuf/any.ts +144 -159
- package/src/grpc/proto/google/protobuf/duration.ts +74 -77
- package/src/grpc/proto/google/protobuf/empty.ts +6 -5
- package/src/grpc/proto/google/protobuf/field_mask.ts +47 -59
- package/src/grpc/proto/google/protobuf/struct.ts +201 -223
- package/src/grpc/proto/google/protobuf/timestamp.ts +100 -121
- package/src/grpc/proto/google/rpc/error_details.ts +352 -388
- package/src/grpc/proto/google/rpc/status.ts +32 -32
- package/src/grpc/proto/sui/rpc/v2/argument.ts +84 -0
- package/src/grpc/proto/sui/rpc/v2/balance_change.ts +51 -0
- package/src/grpc/proto/sui/rpc/v2/bcs.ts +46 -0
- package/src/grpc/proto/sui/rpc/v2/checkpoint.ts +89 -0
- package/src/grpc/proto/sui/rpc/v2/checkpoint_contents.ts +99 -0
- package/src/grpc/proto/sui/rpc/v2/checkpoint_summary.ts +234 -0
- package/src/grpc/proto/sui/rpc/v2/effects.ts +391 -0
- package/src/grpc/proto/sui/rpc/v2/epoch.ts +85 -0
- package/src/grpc/proto/sui/rpc/v2/error_reason.ts +28 -0
- package/src/grpc/proto/sui/rpc/v2/event.ts +115 -0
- package/src/grpc/proto/sui/rpc/v2/executed_transaction.ts +103 -0
- package/src/grpc/proto/sui/rpc/v2/execution_status.ts +946 -0
- package/src/grpc/proto/sui/rpc/v2/gas_cost_summary.ts +59 -0
- package/src/grpc/proto/sui/rpc/v2/input.ts +119 -0
- package/src/grpc/proto/sui/rpc/v2/jwk.ts +94 -0
- package/src/grpc/proto/sui/rpc/v2/ledger_service.client.ts +127 -0
- package/src/grpc/proto/sui/rpc/v2/ledger_service.ts +533 -0
- package/src/grpc/proto/sui/rpc/v2/move_package.ts +678 -0
- package/src/grpc/proto/sui/rpc/v2/move_package_service.client.ts +84 -0
- package/src/grpc/proto/sui/rpc/v2/move_package_service.ts +297 -0
- package/src/grpc/proto/sui/rpc/v2/name_service.client.ts +58 -0
- package/src/grpc/proto/sui/rpc/v2/name_service.ts +187 -0
- package/src/grpc/proto/sui/rpc/v2/object.ts +159 -0
- package/src/grpc/proto/sui/rpc/v2/object_reference.ts +51 -0
- package/src/grpc/proto/sui/rpc/v2/owner.ts +78 -0
- package/src/grpc/proto/sui/rpc/v2/protocol_config.ts +47 -0
- package/src/grpc/proto/sui/rpc/v2/signature.ts +771 -0
- package/src/grpc/proto/sui/rpc/v2/signature_scheme.ts +51 -0
- package/src/grpc/proto/sui/rpc/v2/signature_verification_service.client.ts +49 -0
- package/src/grpc/proto/sui/rpc/v2/signature_verification_service.ts +105 -0
- package/src/grpc/proto/sui/rpc/v2/state_service.client.ts +97 -0
- package/src/grpc/proto/sui/rpc/v2/state_service.ts +820 -0
- package/src/grpc/proto/sui/rpc/v2/subscription_service.client.ts +69 -0
- package/src/grpc/proto/sui/rpc/v2/subscription_service.ts +80 -0
- package/src/grpc/proto/sui/rpc/v2/system_state.ts +818 -0
- package/src/grpc/proto/sui/rpc/v2/transaction.ts +1549 -0
- package/src/grpc/proto/sui/rpc/v2/transaction_execution_service.client.ts +58 -0
- package/src/grpc/proto/sui/rpc/v2/transaction_execution_service.ts +236 -0
- package/src/version.ts +1 -1
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/argument.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/balance_change.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/bcs.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/checkpoint.d.ts +0 -55
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/checkpoint.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/checkpoint_contents.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/checkpoint_summary.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/effects.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/epoch.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/error_reason.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/event.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/executed_transaction.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/execution_status.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/gas_cost_summary.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/input.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/ledger_service.client.d.ts +0 -95
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/ledger_service.client.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/ledger_service.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/live_data_service.client.d.ts +0 -81
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/live_data_service.client.js +0 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/live_data_service.client.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/live_data_service.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/move_package.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/move_package_service.client.d.ts +0 -61
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/move_package_service.client.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/move_package_service.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/name_service.client.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/name_service.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/object.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/object_reference.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/owner.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/protocol_config.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/signature.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/signature_scheme.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/signature_verification_service.client.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/signature_verification_service.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/subscription_service.client.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/subscription_service.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/system_state.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/transaction.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.client.d.ts +0 -37
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.client.js.map +0 -7
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.d.ts +0 -115
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.js +0 -94
- package/dist/cjs/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/argument.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/balance_change.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/bcs.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/checkpoint.d.ts +0 -55
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/checkpoint.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/checkpoint_contents.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/checkpoint_summary.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/effects.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/epoch.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/error_reason.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/event.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/executed_transaction.js +0 -67
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/executed_transaction.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/execution_status.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/gas_cost_summary.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/input.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/ledger_service.client.d.ts +0 -95
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/ledger_service.client.js +0 -107
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/ledger_service.client.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/ledger_service.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/live_data_service.client.d.ts +0 -81
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/live_data_service.client.js +0 -92
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/live_data_service.client.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/live_data_service.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/move_package.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/move_package_service.client.d.ts +0 -61
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/move_package_service.client.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/move_package_service.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/name_service.client.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/name_service.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/object.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/object_reference.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/owner.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/protocol_config.js +0 -42
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/protocol_config.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/signature.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/signature_scheme.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/signature_verification_service.client.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/signature_verification_service.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/subscription_service.client.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/subscription_service.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/system_state.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/transaction.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.client.d.ts +0 -37
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.client.js.map +0 -7
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.d.ts +0 -115
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.js +0 -74
- package/dist/esm/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.js.map +0 -7
- package/src/grpc/proto/sui/rpc/v2beta2/argument.ts +0 -90
- package/src/grpc/proto/sui/rpc/v2beta2/balance_change.ts +0 -51
- package/src/grpc/proto/sui/rpc/v2beta2/bcs.ts +0 -46
- package/src/grpc/proto/sui/rpc/v2beta2/checkpoint.ts +0 -88
- package/src/grpc/proto/sui/rpc/v2beta2/checkpoint_contents.ts +0 -111
- package/src/grpc/proto/sui/rpc/v2beta2/checkpoint_summary.ts +0 -295
- package/src/grpc/proto/sui/rpc/v2beta2/effects.ts +0 -479
- package/src/grpc/proto/sui/rpc/v2beta2/epoch.ts +0 -113
- package/src/grpc/proto/sui/rpc/v2beta2/error_reason.ts +0 -28
- package/src/grpc/proto/sui/rpc/v2beta2/event.ts +0 -115
- package/src/grpc/proto/sui/rpc/v2beta2/executed_transaction.ts +0 -140
- package/src/grpc/proto/sui/rpc/v2beta2/execution_status.ts +0 -1079
- package/src/grpc/proto/sui/rpc/v2beta2/gas_cost_summary.ts +0 -87
- package/src/grpc/proto/sui/rpc/v2beta2/input.ts +0 -132
- package/src/grpc/proto/sui/rpc/v2beta2/ledger_service.client.ts +0 -217
- package/src/grpc/proto/sui/rpc/v2beta2/ledger_service.ts +0 -625
- package/src/grpc/proto/sui/rpc/v2beta2/live_data_service.client.ts +0 -187
- package/src/grpc/proto/sui/rpc/v2beta2/live_data_service.ts +0 -1066
- package/src/grpc/proto/sui/rpc/v2beta2/move_package.ts +0 -803
- package/src/grpc/proto/sui/rpc/v2beta2/move_package_service.client.ts +0 -135
- package/src/grpc/proto/sui/rpc/v2beta2/move_package_service.ts +0 -315
- package/src/grpc/proto/sui/rpc/v2beta2/name_service.client.ts +0 -83
- package/src/grpc/proto/sui/rpc/v2beta2/name_service.ts +0 -198
- package/src/grpc/proto/sui/rpc/v2beta2/object.ts +0 -161
- package/src/grpc/proto/sui/rpc/v2beta2/object_reference.ts +0 -58
- package/src/grpc/proto/sui/rpc/v2beta2/owner.ts +0 -91
- package/src/grpc/proto/sui/rpc/v2beta2/protocol_config.ts +0 -66
- package/src/grpc/proto/sui/rpc/v2beta2/signature.ts +0 -861
- package/src/grpc/proto/sui/rpc/v2beta2/signature_scheme.ts +0 -51
- package/src/grpc/proto/sui/rpc/v2beta2/signature_verification_service.client.ts +0 -63
- package/src/grpc/proto/sui/rpc/v2beta2/signature_verification_service.ts +0 -106
- package/src/grpc/proto/sui/rpc/v2beta2/subscription_service.client.ts +0 -81
- package/src/grpc/proto/sui/rpc/v2beta2/subscription_service.ts +0 -93
- package/src/grpc/proto/sui/rpc/v2beta2/system_state.ts +0 -1184
- package/src/grpc/proto/sui/rpc/v2beta2/transaction.ts +0 -2012
- package/src/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.client.ts +0 -65
- package/src/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.ts +0 -178
- /package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/error_reason.js +0 -0
- /package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_scheme.js +0 -0
- /package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/error_reason.js +0 -0
- /package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_scheme.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { GrpcWebOptions } from '@protobuf-ts/grpcweb-transport';
|
|
2
|
-
import { TransactionExecutionServiceClient } from './proto/sui/rpc/
|
|
3
|
-
import { LedgerServiceClient } from './proto/sui/rpc/
|
|
4
|
-
import { MovePackageServiceClient } from './proto/sui/rpc/
|
|
5
|
-
import { SignatureVerificationServiceClient } from './proto/sui/rpc/
|
|
2
|
+
import { TransactionExecutionServiceClient } from './proto/sui/rpc/v2/transaction_execution_service.client.js';
|
|
3
|
+
import { LedgerServiceClient } from './proto/sui/rpc/v2/ledger_service.client.js';
|
|
4
|
+
import { MovePackageServiceClient } from './proto/sui/rpc/v2/move_package_service.client.js';
|
|
5
|
+
import { SignatureVerificationServiceClient } from './proto/sui/rpc/v2/signature_verification_service.client.js';
|
|
6
6
|
import type { RpcTransport } from '@protobuf-ts/runtime-rpc';
|
|
7
|
-
import {
|
|
8
|
-
import { SubscriptionServiceClient } from './proto/sui/rpc/
|
|
7
|
+
import { StateServiceClient } from './proto/sui/rpc/v2/state_service.client.js';
|
|
8
|
+
import { SubscriptionServiceClient } from './proto/sui/rpc/v2/subscription_service.client.js';
|
|
9
9
|
import { GrpcCoreClient } from './core.js';
|
|
10
10
|
import type { Experimental_SuiClientTypes } from '../experimental/index.js';
|
|
11
11
|
import { Experimental_BaseClient } from '../experimental/index.js';
|
|
@@ -22,7 +22,7 @@ export declare class SuiGrpcClient extends Experimental_BaseClient {
|
|
|
22
22
|
core: GrpcCoreClient;
|
|
23
23
|
transactionExecutionService: TransactionExecutionServiceClient;
|
|
24
24
|
ledgerService: LedgerServiceClient;
|
|
25
|
-
|
|
25
|
+
stateService: StateServiceClient;
|
|
26
26
|
subscriptionService: SubscriptionServiceClient;
|
|
27
27
|
movePackageService: MovePackageServiceClient;
|
|
28
28
|
signatureVerificationService: SignatureVerificationServiceClient;
|
package/dist/cjs/grpc/client.js
CHANGED
|
@@ -22,12 +22,12 @@ __export(client_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(client_exports);
|
|
24
24
|
var import_grpcweb_transport = require("@protobuf-ts/grpcweb-transport");
|
|
25
|
-
var import_transaction_execution_service_client = require("./proto/sui/rpc/
|
|
26
|
-
var import_ledger_service_client = require("./proto/sui/rpc/
|
|
27
|
-
var import_move_package_service_client = require("./proto/sui/rpc/
|
|
28
|
-
var import_signature_verification_service_client = require("./proto/sui/rpc/
|
|
29
|
-
var
|
|
30
|
-
var import_subscription_service_client = require("./proto/sui/rpc/
|
|
25
|
+
var import_transaction_execution_service_client = require("./proto/sui/rpc/v2/transaction_execution_service.client.js");
|
|
26
|
+
var import_ledger_service_client = require("./proto/sui/rpc/v2/ledger_service.client.js");
|
|
27
|
+
var import_move_package_service_client = require("./proto/sui/rpc/v2/move_package_service.client.js");
|
|
28
|
+
var import_signature_verification_service_client = require("./proto/sui/rpc/v2/signature_verification_service.client.js");
|
|
29
|
+
var import_state_service_client = require("./proto/sui/rpc/v2/state_service.client.js");
|
|
30
|
+
var import_subscription_service_client = require("./proto/sui/rpc/v2/subscription_service.client.js");
|
|
31
31
|
var import_core = require("./core.js");
|
|
32
32
|
var import_experimental = require("../experimental/index.js");
|
|
33
33
|
class SuiGrpcClient extends import_experimental.Experimental_BaseClient {
|
|
@@ -36,7 +36,7 @@ class SuiGrpcClient extends import_experimental.Experimental_BaseClient {
|
|
|
36
36
|
const transport = options.transport ?? new import_grpcweb_transport.GrpcWebFetchTransport({ baseUrl: options.baseUrl, fetchInit: options.fetchInit });
|
|
37
37
|
this.transactionExecutionService = new import_transaction_execution_service_client.TransactionExecutionServiceClient(transport);
|
|
38
38
|
this.ledgerService = new import_ledger_service_client.LedgerServiceClient(transport);
|
|
39
|
-
this.
|
|
39
|
+
this.stateService = new import_state_service_client.StateServiceClient(transport);
|
|
40
40
|
this.subscriptionService = new import_subscription_service_client.SubscriptionServiceClient(transport);
|
|
41
41
|
this.movePackageService = new import_move_package_service_client.MovePackageServiceClient(transport);
|
|
42
42
|
this.signatureVerificationService = new import_signature_verification_service_client.SignatureVerificationServiceClient(transport);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/grpc/client.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { GrpcWebOptions } from '@protobuf-ts/grpcweb-transport';\nimport { GrpcWebFetchTransport } from '@protobuf-ts/grpcweb-transport';\nimport { TransactionExecutionServiceClient } from './proto/sui/rpc/
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,+BAAsC;AACtC,kDAAkD;AAClD,mCAAoC;AACpC,yCAAyC;AACzC,mDAAmD;AAEnD,
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { GrpcWebOptions } from '@protobuf-ts/grpcweb-transport';\nimport { GrpcWebFetchTransport } from '@protobuf-ts/grpcweb-transport';\nimport { TransactionExecutionServiceClient } from './proto/sui/rpc/v2/transaction_execution_service.client.js';\nimport { LedgerServiceClient } from './proto/sui/rpc/v2/ledger_service.client.js';\nimport { MovePackageServiceClient } from './proto/sui/rpc/v2/move_package_service.client.js';\nimport { SignatureVerificationServiceClient } from './proto/sui/rpc/v2/signature_verification_service.client.js';\nimport type { RpcTransport } from '@protobuf-ts/runtime-rpc';\nimport { StateServiceClient } from './proto/sui/rpc/v2/state_service.client.js';\nimport { SubscriptionServiceClient } from './proto/sui/rpc/v2/subscription_service.client.js';\nimport { GrpcCoreClient } from './core.js';\nimport type { Experimental_SuiClientTypes } from '../experimental/index.js';\nimport { Experimental_BaseClient } from '../experimental/index.js';\n\ninterface SuiGrpcTransportOptions extends GrpcWebOptions {\n\ttransport?: never;\n}\n\nexport type SuiGrpcClientOptions = {\n\tnetwork: Experimental_SuiClientTypes.Network;\n\tmvr?: Experimental_SuiClientTypes.MvrOptions;\n} & (\n\t| {\n\t\t\ttransport: RpcTransport;\n\t }\n\t| SuiGrpcTransportOptions\n);\n\nexport class SuiGrpcClient extends Experimental_BaseClient {\n\tcore: GrpcCoreClient;\n\ttransactionExecutionService: TransactionExecutionServiceClient;\n\tledgerService: LedgerServiceClient;\n\tstateService: StateServiceClient;\n\tsubscriptionService: SubscriptionServiceClient;\n\tmovePackageService: MovePackageServiceClient;\n\tsignatureVerificationService: SignatureVerificationServiceClient;\n\n\tconstructor(options: SuiGrpcClientOptions) {\n\t\tsuper({ network: options.network });\n\t\tconst transport =\n\t\t\toptions.transport ??\n\t\t\tnew GrpcWebFetchTransport({ baseUrl: options.baseUrl, fetchInit: options.fetchInit });\n\t\tthis.transactionExecutionService = new TransactionExecutionServiceClient(transport);\n\t\tthis.ledgerService = new LedgerServiceClient(transport);\n\t\tthis.stateService = new StateServiceClient(transport);\n\t\tthis.subscriptionService = new SubscriptionServiceClient(transport);\n\t\tthis.movePackageService = new MovePackageServiceClient(transport);\n\t\tthis.signatureVerificationService = new SignatureVerificationServiceClient(transport);\n\n\t\tthis.core = new GrpcCoreClient({\n\t\t\tclient: this,\n\t\t\tbase: this,\n\t\t\tnetwork: options.network,\n\t\t\tmvr: options.mvr,\n\t\t});\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,+BAAsC;AACtC,kDAAkD;AAClD,mCAAoC;AACpC,yCAAyC;AACzC,mDAAmD;AAEnD,kCAAmC;AACnC,yCAA0C;AAC1C,kBAA+B;AAE/B,0BAAwC;AAgBjC,MAAM,sBAAsB,4CAAwB;AAAA,EAS1D,YAAY,SAA+B;AAC1C,UAAM,EAAE,SAAS,QAAQ,QAAQ,CAAC;AAClC,UAAM,YACL,QAAQ,aACR,IAAI,+CAAsB,EAAE,SAAS,QAAQ,SAAS,WAAW,QAAQ,UAAU,CAAC;AACrF,SAAK,8BAA8B,IAAI,8EAAkC,SAAS;AAClF,SAAK,gBAAgB,IAAI,iDAAoB,SAAS;AACtD,SAAK,eAAe,IAAI,+CAAmB,SAAS;AACpD,SAAK,sBAAsB,IAAI,6DAA0B,SAAS;AAClE,SAAK,qBAAqB,IAAI,4DAAyB,SAAS;AAChE,SAAK,+BAA+B,IAAI,gFAAmC,SAAS;AAEpF,SAAK,OAAO,IAAI,2BAAe;AAAA,MAC9B,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,SAAS,QAAQ;AAAA,MACjB,KAAK,QAAQ;AAAA,IACd,CAAC;AAAA,EACF;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/grpc/core.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Experimental_CoreClientOptions, Experimental_SuiClientTypes } from '../experimental/index.js';
|
|
2
2
|
import { Experimental_CoreClient } from '../experimental/index.js';
|
|
3
3
|
import type { SuiGrpcClient } from './client.js';
|
|
4
|
-
import type { TransactionEffects } from './proto/sui/rpc/
|
|
4
|
+
import type { TransactionEffects } from './proto/sui/rpc/v2/effects.js';
|
|
5
5
|
export interface GrpcCoreClientOptions extends Experimental_CoreClientOptions {
|
|
6
6
|
client: SuiGrpcClient;
|
|
7
7
|
}
|
package/dist/cjs/grpc/core.js
CHANGED
|
@@ -30,13 +30,13 @@ __export(core_exports, {
|
|
|
30
30
|
});
|
|
31
31
|
module.exports = __toCommonJS(core_exports);
|
|
32
32
|
var import_experimental = require("../experimental/index.js");
|
|
33
|
-
var import_owner = require("./proto/sui/rpc/
|
|
33
|
+
var import_owner = require("./proto/sui/rpc/v2/owner.js");
|
|
34
34
|
var import_utils = require("@mysten/utils");
|
|
35
|
-
var import_effects = require("./proto/sui/rpc/
|
|
36
|
-
var import_effects2 = require("./proto/sui/rpc/
|
|
35
|
+
var import_effects = require("./proto/sui/rpc/v2/effects.js");
|
|
36
|
+
var import_effects2 = require("./proto/sui/rpc/v2/effects.js");
|
|
37
37
|
var import_transactions = require("../transactions/index.js");
|
|
38
38
|
var import_bcs = require("../bcs/index.js");
|
|
39
|
-
var import_move_package = require("./proto/sui/rpc/
|
|
39
|
+
var import_move_package = require("./proto/sui/rpc/v2/move_package.js");
|
|
40
40
|
var _client;
|
|
41
41
|
class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
|
|
42
42
|
constructor({ client, ...options }) {
|
|
@@ -90,7 +90,7 @@ class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
|
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
async getOwnedObjects(options) {
|
|
93
|
-
const response = await __privateGet(this, _client).
|
|
93
|
+
const response = await __privateGet(this, _client).stateService.listOwnedObjects({
|
|
94
94
|
owner: options.address,
|
|
95
95
|
objectType: options.type ? (await this.mvr.resolveType({ type: options.type })).type : void 0,
|
|
96
96
|
pageToken: options.cursor ? (0, import_utils.fromBase64)(options.cursor) : void 0,
|
|
@@ -129,7 +129,7 @@ class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
|
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
async getCoins(options) {
|
|
132
|
-
const response = await __privateGet(this, _client).
|
|
132
|
+
const response = await __privateGet(this, _client).stateService.listOwnedObjects({
|
|
133
133
|
owner: options.address,
|
|
134
134
|
objectType: `0x2::coin::Coin<${(await this.mvr.resolveType({ type: options.coinType })).type}>`,
|
|
135
135
|
pageToken: options.cursor ? (0, import_utils.fromBase64)(options.cursor) : void 0,
|
|
@@ -169,7 +169,7 @@ class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
|
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
171
|
async getBalance(options) {
|
|
172
|
-
const result = await __privateGet(this, _client).
|
|
172
|
+
const result = await __privateGet(this, _client).stateService.getBalance({
|
|
173
173
|
owner: options.address,
|
|
174
174
|
coinType: (await this.mvr.resolveType({ type: options.coinType })).type
|
|
175
175
|
});
|
|
@@ -181,7 +181,7 @@ class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
|
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
183
|
async getAllBalances(options) {
|
|
184
|
-
const result = await __privateGet(this, _client).
|
|
184
|
+
const result = await __privateGet(this, _client).stateService.listBalances({
|
|
185
185
|
owner: options.address,
|
|
186
186
|
pageToken: options.cursor ? (0, import_utils.fromBase64)(options.cursor) : void 0,
|
|
187
187
|
pageSize: options.limit
|
|
@@ -236,7 +236,7 @@ class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
|
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
238
|
async dryRunTransaction(options) {
|
|
239
|
-
const { response } = await __privateGet(this, _client).
|
|
239
|
+
const { response } = await __privateGet(this, _client).transactionExecutionService.simulateTransaction({
|
|
240
240
|
transaction: {
|
|
241
241
|
bcs: {
|
|
242
242
|
value: options.transaction
|
|
@@ -263,7 +263,7 @@ class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
|
|
|
263
263
|
};
|
|
264
264
|
}
|
|
265
265
|
async getDynamicFields(options) {
|
|
266
|
-
const response = await __privateGet(this, _client).
|
|
266
|
+
const response = await __privateGet(this, _client).stateService.listDynamicFields({
|
|
267
267
|
parent: options.parentId,
|
|
268
268
|
pageToken: options.cursor ? (0, import_utils.fromBase64)(options.cursor) : void 0
|
|
269
269
|
});
|
|
@@ -271,10 +271,10 @@ class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
|
|
|
271
271
|
dynamicFields: response.response.dynamicFields.map((field) => ({
|
|
272
272
|
id: field.fieldId,
|
|
273
273
|
name: {
|
|
274
|
-
type: field.
|
|
275
|
-
bcs: field.
|
|
274
|
+
type: field.name?.name,
|
|
275
|
+
bcs: field.name?.value
|
|
276
276
|
},
|
|
277
|
-
type: field.
|
|
277
|
+
type: field.fieldObject ? `0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${field.name?.name}>,0x2::object::ID>` : `0x2::dynamic_field::Field<${field.name?.value},${field.valueType}>`
|
|
278
278
|
})),
|
|
279
279
|
cursor: response.response.nextPageToken ? (0, import_utils.toBase64)(response.response.nextPageToken) : null,
|
|
280
280
|
hasNextPage: response.response.nextPageToken !== void 0
|
|
@@ -550,12 +550,7 @@ function parseTransaction(transaction) {
|
|
|
550
550
|
commands: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction.commands
|
|
551
551
|
});
|
|
552
552
|
const objectTypes = {};
|
|
553
|
-
transaction.
|
|
554
|
-
if (object.objectId && object.objectType) {
|
|
555
|
-
objectTypes[object.objectId] = object.objectType;
|
|
556
|
-
}
|
|
557
|
-
});
|
|
558
|
-
transaction.outputObjects.forEach((object) => {
|
|
553
|
+
transaction.objects?.objects.forEach((object) => {
|
|
559
554
|
if (object.objectId && object.objectType) {
|
|
560
555
|
objectTypes[object.objectId] = object.objectType;
|
|
561
556
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/grpc/core.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tExperimental_CoreClientOptions,\n\tExperimental_SuiClientTypes,\n} from '../experimental/index.js';\nimport { Experimental_CoreClient } from '../experimental/index.js';\nimport type { SuiGrpcClient } from './client.js';\nimport type { Owner } from './proto/sui/rpc/v2beta2/owner.js';\nimport { Owner_OwnerKind } from './proto/sui/rpc/v2beta2/owner.js';\nimport { chunk, fromBase64, toBase64 } from '@mysten/utils';\nimport type { ExecutedTransaction } from './proto/sui/rpc/v2beta2/executed_transaction.js';\nimport type { TransactionEffects } from './proto/sui/rpc/v2beta2/effects.js';\nimport { UnchangedConsensusObject_UnchangedConsensusObjectKind } from './proto/sui/rpc/v2beta2/effects.js';\nimport {\n\tChangedObject_IdOperation,\n\tChangedObject_InputObjectState,\n\tChangedObject_OutputObjectState,\n} from './proto/sui/rpc/v2beta2/effects.js';\nimport { TransactionDataBuilder } from '../transactions/index.js';\nimport { bcs } from '../bcs/index.js';\nimport type { OpenSignature, OpenSignatureBody } from './proto/sui/rpc/v2beta2/move_package.js';\nimport {\n\tAbility,\n\tFunctionDescriptor_Visibility,\n\tOpenSignature_Reference,\n\tOpenSignatureBody_Type,\n} from './proto/sui/rpc/v2beta2/move_package.js';\nexport interface GrpcCoreClientOptions extends Experimental_CoreClientOptions {\n\tclient: SuiGrpcClient;\n}\nexport class GrpcCoreClient extends Experimental_CoreClient {\n\t#client: SuiGrpcClient;\n\tconstructor({ client, ...options }: GrpcCoreClientOptions) {\n\t\tsuper(options);\n\t\tthis.#client = client;\n\t}\n\n\tasync getObjects(\n\t\toptions: Experimental_SuiClientTypes.GetObjectsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetObjectsResponse> {\n\t\tconst batches = chunk(options.objectIds, 50);\n\t\tconst results: Experimental_SuiClientTypes.GetObjectsResponse['objects'] = [];\n\n\t\tfor (const batch of batches) {\n\t\t\tconst response = await this.#client.ledgerService.batchGetObjects({\n\t\t\t\trequests: batch.map((id) => ({ objectId: id })),\n\t\t\t\treadMask: {\n\t\t\t\t\tpaths: [\n\t\t\t\t\t\t'owner',\n\t\t\t\t\t\t'object_type',\n\t\t\t\t\t\t'bcs',\n\t\t\t\t\t\t'digest',\n\t\t\t\t\t\t'version',\n\t\t\t\t\t\t'object_id',\n\t\t\t\t\t\t'previous_transaction',\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tresults.push(\n\t\t\t\t...response.response.objects.map(\n\t\t\t\t\t(object): Experimental_SuiClientTypes.ObjectResponse | Error => {\n\t\t\t\t\t\tif (object.result.oneofKind === 'error') {\n\t\t\t\t\t\t\t// TODO: improve error handling\n\t\t\t\t\t\t\treturn new Error(object.result.error.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (object.result.oneofKind !== 'object') {\n\t\t\t\t\t\t\treturn new Error('Unexpected result type');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid: object.result.object.objectId!,\n\t\t\t\t\t\t\tversion: object.result.object.version?.toString()!,\n\t\t\t\t\t\t\tdigest: object.result.object.digest!,\n\t\t\t\t\t\t\t// TODO: bcs content is not returned in all cases\n\t\t\t\t\t\t\tcontent: Promise.resolve(object.result.object.bcs?.value!),\n\t\t\t\t\t\t\towner: mapOwner(object.result.object.owner)!,\n\t\t\t\t\t\t\ttype: object.result.object.objectType!,\n\t\t\t\t\t\t\tpreviousTransaction: object.result.object.previousTransaction ?? null,\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\treturn {\n\t\t\tobjects: results,\n\t\t};\n\t}\n\tasync getOwnedObjects(\n\t\toptions: Experimental_SuiClientTypes.GetOwnedObjectsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetOwnedObjectsResponse> {\n\t\tconst response = await this.#client.liveDataService.listOwnedObjects({\n\t\t\towner: options.address,\n\t\t\tobjectType: options.type\n\t\t\t\t? (await this.mvr.resolveType({ type: options.type })).type\n\t\t\t\t: undefined,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'owner',\n\t\t\t\t\t'object_type',\n\t\t\t\t\t'bcs',\n\t\t\t\t\t'digest',\n\t\t\t\t\t'version',\n\t\t\t\t\t'object_id',\n\t\t\t\t\t'previous_transaction',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\n\t\tconst objects = response.response.objects.map(\n\t\t\t(object): Experimental_SuiClientTypes.ObjectResponse => ({\n\t\t\t\tid: object.objectId!,\n\t\t\t\tversion: object.version?.toString()!,\n\t\t\t\tdigest: object.digest!,\n\t\t\t\t// TODO: List owned objects doesn't return content right now\n\t\t\t\tget content() {\n\t\t\t\t\treturn Promise.reject(\n\t\t\t\t\t\tnew Error('GRPC does not return object contents when listing owned objects'),\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\towner: mapOwner(object.owner)!,\n\t\t\t\ttype: object.objectType!,\n\t\t\t\tpreviousTransaction: object.previousTransaction ?? null,\n\t\t\t}),\n\t\t);\n\n\t\treturn {\n\t\t\tobjects,\n\t\t\tcursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,\n\t\t\thasNextPage: response.response.nextPageToken !== undefined,\n\t\t};\n\t}\n\tasync getCoins(\n\t\toptions: Experimental_SuiClientTypes.GetCoinsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetCoinsResponse> {\n\t\tconst response = await this.#client.liveDataService.listOwnedObjects({\n\t\t\towner: options.address,\n\t\t\tobjectType: `0x2::coin::Coin<${(await this.mvr.resolveType({ type: options.coinType })).type}>`,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'owner',\n\t\t\t\t\t'object_type',\n\t\t\t\t\t'bcs',\n\t\t\t\t\t'digest',\n\t\t\t\t\t'version',\n\t\t\t\t\t'object_id',\n\t\t\t\t\t'balance',\n\t\t\t\t\t'previous_transaction',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\n\t\treturn {\n\t\t\tobjects: response.response.objects.map(\n\t\t\t\t(object): Experimental_SuiClientTypes.CoinResponse => ({\n\t\t\t\t\tid: object.objectId!,\n\t\t\t\t\tversion: object.version?.toString()!,\n\t\t\t\t\tdigest: object.digest!,\n\t\t\t\t\t// TODO: List owned objects doesn't return content right now\n\t\t\t\t\tget content() {\n\t\t\t\t\t\treturn Promise.reject(\n\t\t\t\t\t\t\tnew Error('GRPC does not return object contents when listing owned objects'),\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\towner: mapOwner(object.owner)!,\n\t\t\t\t\ttype: object.objectType!,\n\t\t\t\t\tbalance: object.balance?.toString()!,\n\t\t\t\t\tpreviousTransaction: object.previousTransaction ?? null,\n\t\t\t\t}),\n\t\t\t),\n\t\t\tcursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,\n\t\t\thasNextPage: response.response.nextPageToken !== undefined,\n\t\t};\n\t}\n\n\tasync getBalance(\n\t\toptions: Experimental_SuiClientTypes.GetBalanceOptions,\n\t): Promise<Experimental_SuiClientTypes.GetBalanceResponse> {\n\t\tconst result = await this.#client.liveDataService.getBalance({\n\t\t\towner: options.address,\n\t\t\tcoinType: (await this.mvr.resolveType({ type: options.coinType })).type,\n\t\t});\n\n\t\treturn {\n\t\t\tbalance: {\n\t\t\t\tbalance: result.response.balance?.balance?.toString() ?? '0',\n\t\t\t\tcoinType: result.response.balance?.coinType ?? options.coinType,\n\t\t\t},\n\t\t};\n\t}\n\n\tasync getAllBalances(\n\t\toptions: Experimental_SuiClientTypes.GetAllBalancesOptions,\n\t): Promise<Experimental_SuiClientTypes.GetAllBalancesResponse> {\n\t\tconst result = await this.#client.liveDataService.listBalances({\n\t\t\towner: options.address,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t\tpageSize: options.limit,\n\t\t});\n\n\t\treturn {\n\t\t\thasNextPage: !!result.response.nextPageToken,\n\t\t\tcursor: result.response.nextPageToken ? toBase64(result.response.nextPageToken) : null,\n\t\t\tbalances: result.response.balances.map((balance) => ({\n\t\t\t\tbalance: balance.balance?.toString() ?? '0',\n\t\t\t\tcoinType: balance.coinType!,\n\t\t\t})),\n\t\t};\n\t}\n\tasync getTransaction(\n\t\toptions: Experimental_SuiClientTypes.GetTransactionOptions,\n\t): Promise<Experimental_SuiClientTypes.GetTransactionResponse> {\n\t\tconst { response } = await this.#client.ledgerService.getTransaction({\n\t\t\tdigest: options.digest,\n\t\t\treadMask: {\n\t\t\t\tpaths: ['digest', 'transaction', 'effects', 'signatures', 'balance_changes'],\n\t\t\t},\n\t\t});\n\n\t\treturn {\n\t\t\ttransaction: parseTransaction(response.transaction!),\n\t\t};\n\t}\n\tasync executeTransaction(\n\t\toptions: Experimental_SuiClientTypes.ExecuteTransactionOptions,\n\t): Promise<Experimental_SuiClientTypes.ExecuteTransactionResponse> {\n\t\tconst { response } = await this.#client.transactionExecutionService.executeTransaction({\n\t\t\ttransaction: {\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: options.transaction,\n\t\t\t\t},\n\t\t\t},\n\t\t\tsignatures: options.signatures.map((signature) => ({\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: fromBase64(signature),\n\t\t\t\t},\n\t\t\t\tsignature: {\n\t\t\t\t\toneofKind: undefined,\n\t\t\t\t},\n\t\t\t})),\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'transaction.digest',\n\t\t\t\t\t'transaction.transaction',\n\t\t\t\t\t'transaction.effects',\n\t\t\t\t\t'transaction.signatures',\n\t\t\t\t\t'transaction.balance_changes',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\t\treturn {\n\t\t\ttransaction: parseTransaction(response.transaction!),\n\t\t};\n\t}\n\tasync dryRunTransaction(\n\t\toptions: Experimental_SuiClientTypes.DryRunTransactionOptions,\n\t): Promise<Experimental_SuiClientTypes.DryRunTransactionResponse> {\n\t\tconst { response } = await this.#client.liveDataService.simulateTransaction({\n\t\t\ttransaction: {\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: options.transaction,\n\t\t\t\t},\n\t\t\t},\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'transaction.digest',\n\t\t\t\t\t'transaction.transaction',\n\t\t\t\t\t'transaction.effects',\n\t\t\t\t\t'transaction.signatures',\n\t\t\t\t\t'transaction.balance_changes',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\n\t\treturn {\n\t\t\ttransaction: parseTransaction(response.transaction!),\n\t\t};\n\t}\n\tasync getReferenceGasPrice(): Promise<Experimental_SuiClientTypes.GetReferenceGasPriceResponse> {\n\t\tconst response = await this.#client.ledgerService.getEpoch({});\n\n\t\treturn {\n\t\t\treferenceGasPrice: response.response.epoch?.referenceGasPrice?.toString()!,\n\t\t};\n\t}\n\n\tasync getDynamicFields(\n\t\toptions: Experimental_SuiClientTypes.GetDynamicFieldsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetDynamicFieldsResponse> {\n\t\tconst response = await this.#client.liveDataService.listDynamicFields({\n\t\t\tparent: options.parentId,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t});\n\n\t\treturn {\n\t\t\tdynamicFields: response.response.dynamicFields.map((field) => ({\n\t\t\t\tid: field.fieldId!,\n\t\t\t\tname: {\n\t\t\t\t\ttype: field.nameType!,\n\t\t\t\t\tbcs: field.nameValue!,\n\t\t\t\t},\n\t\t\t\ttype: field.dynamicObjectId\n\t\t\t\t\t? `0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${field.nameType!}>,0x2::object::ID>`\n\t\t\t\t\t: `0x2::dynamic_field::Field<${field.nameType!},${field.valueType!}>`,\n\t\t\t})),\n\t\t\tcursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,\n\t\t\thasNextPage: response.response.nextPageToken !== undefined,\n\t\t};\n\t}\n\n\tasync verifyZkLoginSignature(\n\t\toptions: Experimental_SuiClientTypes.VerifyZkLoginSignatureOptions,\n\t): Promise<Experimental_SuiClientTypes.ZkLoginVerifyResponse> {\n\t\tconst { response } = await this.#client.signatureVerificationService.verifySignature({\n\t\t\tmessage: {\n\t\t\t\tname: options.intentScope,\n\t\t\t\tvalue: fromBase64(options.bytes),\n\t\t\t},\n\t\t\tsignature: {\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: fromBase64(options.signature),\n\t\t\t\t},\n\t\t\t\tsignature: {\n\t\t\t\t\toneofKind: undefined,\n\t\t\t\t},\n\t\t\t},\n\t\t\tjwks: [],\n\t\t});\n\n\t\treturn {\n\t\t\tsuccess: response.isValid ?? false,\n\t\t\terrors: response.reason ? [response.reason] : [],\n\t\t};\n\t}\n\n\tasync getMoveFunction(\n\t\toptions: Experimental_SuiClientTypes.GetMoveFunctionOptions,\n\t): Promise<Experimental_SuiClientTypes.GetMoveFunctionResponse> {\n\t\tconst { response } = await this.#client.movePackageService.getFunction({\n\t\t\tpackageId: (await this.mvr.resolvePackage({ package: options.packageId })).package,\n\t\t\tmoduleName: options.moduleName,\n\t\t\tname: options.name,\n\t\t});\n\n\t\tlet visibility: 'public' | 'private' | 'friend' | 'unknown' = 'unknown';\n\n\t\tswitch (response.function?.visibility) {\n\t\t\tcase FunctionDescriptor_Visibility.PUBLIC:\n\t\t\t\tvisibility = 'public';\n\t\t\t\tbreak;\n\t\t\tcase FunctionDescriptor_Visibility.PRIVATE:\n\t\t\t\tvisibility = 'private';\n\t\t\t\tbreak;\n\t\t\tcase FunctionDescriptor_Visibility.FRIEND:\n\t\t\t\tvisibility = 'friend';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn {\n\t\t\tfunction: {\n\t\t\t\tpackageId: options.packageId,\n\t\t\t\tmoduleName: options.moduleName,\n\t\t\t\tname: response.function?.name!,\n\t\t\t\tvisibility,\n\t\t\t\tisEntry: response.function?.isEntry ?? false,\n\t\t\t\ttypeParameters:\n\t\t\t\t\tresponse.function?.typeParameters?.map(({ constraints }) => ({\n\t\t\t\t\t\tisPhantom: false,\n\t\t\t\t\t\tconstraints:\n\t\t\t\t\t\t\tconstraints.map((constraint) => {\n\t\t\t\t\t\t\t\tswitch (constraint) {\n\t\t\t\t\t\t\t\t\tcase Ability.COPY:\n\t\t\t\t\t\t\t\t\t\treturn 'copy';\n\t\t\t\t\t\t\t\t\tcase Ability.DROP:\n\t\t\t\t\t\t\t\t\t\treturn 'drop';\n\t\t\t\t\t\t\t\t\tcase Ability.STORE:\n\t\t\t\t\t\t\t\t\t\treturn 'store';\n\t\t\t\t\t\t\t\t\tcase Ability.KEY:\n\t\t\t\t\t\t\t\t\t\treturn 'key';\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\treturn 'unknown';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}) ?? [],\n\t\t\t\t\t})) ?? [],\n\t\t\t\tparameters:\n\t\t\t\t\tresponse.function?.parameters?.map((param) => parseNormalizedSuiMoveType(param)) ?? [],\n\t\t\t\treturns: response.function?.returns?.map((ret) => parseNormalizedSuiMoveType(ret)) ?? [],\n\t\t\t},\n\t\t};\n\t}\n\n\tresolveTransactionPlugin(): never {\n\t\tthrow new Error('GRPC client does not support transaction resolution yet');\n\t}\n}\n\nfunction mapOwner(owner: Owner | null | undefined): Experimental_SuiClientTypes.ObjectOwner | null {\n\tif (!owner) {\n\t\treturn null;\n\t}\n\tif (owner.kind === Owner_OwnerKind.IMMUTABLE) {\n\t\treturn {\n\t\t\t$kind: 'Immutable',\n\t\t\tImmutable: true,\n\t\t};\n\t}\n\tif (owner.kind === Owner_OwnerKind.ADDRESS) {\n\t\treturn {\n\t\t\tAddressOwner: owner.address!,\n\t\t\t$kind: 'AddressOwner',\n\t\t};\n\t}\n\tif (owner.kind === Owner_OwnerKind.OBJECT) {\n\t\treturn {\n\t\t\t$kind: 'ObjectOwner',\n\t\t\tObjectOwner: owner.address!,\n\t\t};\n\t}\n\n\tif (owner.kind === Owner_OwnerKind.SHARED) {\n\t\tif (owner.address) {\n\t\t\treturn {\n\t\t\t\t$kind: 'ConsensusAddressOwner',\n\t\t\t\tConsensusAddressOwner: {\n\t\t\t\t\towner: owner.address,\n\t\t\t\t\tstartVersion: owner.version?.toString()!,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t$kind: 'Shared',\n\t\t\tShared: {\n\t\t\t\tinitialSharedVersion: owner.version?.toString()!,\n\t\t\t},\n\t\t};\n\t}\n\n\tthrow new Error('Unknown owner kind');\n}\n\nfunction mapIdOperation(\n\toperation: ChangedObject_IdOperation | undefined,\n): null | 'Created' | 'Deleted' | 'Unknown' | 'None' {\n\tif (operation == null) {\n\t\treturn null;\n\t}\n\tswitch (operation) {\n\t\tcase ChangedObject_IdOperation.CREATED:\n\t\t\treturn 'Created';\n\t\tcase ChangedObject_IdOperation.DELETED:\n\t\t\treturn 'Deleted';\n\t\tcase ChangedObject_IdOperation.NONE:\n\t\tcase ChangedObject_IdOperation.ID_OPERATION_UNKNOWN:\n\t\t\treturn 'None';\n\t\tdefault:\n\t\t\toperation satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nfunction mapInputObjectState(\n\tstate: ChangedObject_InputObjectState | undefined,\n): null | 'Exists' | 'DoesNotExist' | 'Unknown' {\n\tif (state == null) {\n\t\treturn null;\n\t}\n\tswitch (state) {\n\t\tcase ChangedObject_InputObjectState.EXISTS:\n\t\t\treturn 'Exists';\n\t\tcase ChangedObject_InputObjectState.DOES_NOT_EXIST:\n\t\t\treturn 'DoesNotExist';\n\t\tcase ChangedObject_InputObjectState.UNKNOWN:\n\t\t\treturn 'Unknown';\n\t\tdefault:\n\t\t\tstate satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nfunction mapOutputObjectState(\n\tstate: ChangedObject_OutputObjectState | undefined,\n): null | 'ObjectWrite' | 'PackageWrite' | 'DoesNotExist' | 'Unknown' {\n\tif (state == null) {\n\t\treturn null;\n\t}\n\tswitch (state) {\n\t\tcase ChangedObject_OutputObjectState.OBJECT_WRITE:\n\t\t\treturn 'ObjectWrite';\n\t\tcase ChangedObject_OutputObjectState.PACKAGE_WRITE:\n\t\t\treturn 'PackageWrite';\n\t\tcase ChangedObject_OutputObjectState.DOES_NOT_EXIST:\n\t\t\treturn 'DoesNotExist';\n\t\tcase ChangedObject_OutputObjectState.UNKNOWN:\n\t\t\treturn 'Unknown';\n\t\tdefault:\n\t\t\tstate satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nfunction mapUnchangedConsensusObjectKind(\n\tkind: UnchangedConsensusObject_UnchangedConsensusObjectKind | undefined,\n): null | Experimental_SuiClientTypes.UnchangedConsensusObject['kind'] {\n\tif (kind == null) {\n\t\treturn null;\n\t}\n\tswitch (kind) {\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.UNCHANGED_CONSENSUS_OBJECT_KIND_UNKNOWN:\n\t\t\treturn 'Unknown';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.READ_ONLY_ROOT:\n\t\t\treturn 'ReadOnlyRoot';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.MUTATE_CONSENSUS_STREAM_ENDED:\n\t\t\treturn 'MutateConsensusStreamEnded';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.READ_CONSENSUS_STREAM_ENDED:\n\t\t\treturn 'ReadConsensusStreamEnded';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.CANCELED:\n\t\t\treturn 'Cancelled';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.PER_EPOCH_CONFIG:\n\t\t\treturn 'PerEpochConfig';\n\t\tdefault:\n\t\t\tkind satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nexport function parseTransactionEffects({\n\teffects,\n}: {\n\teffects: TransactionEffects | undefined;\n}): Experimental_SuiClientTypes.TransactionEffects | null {\n\tif (!effects) {\n\t\treturn null;\n\t}\n\n\tconst changedObjects = effects.changedObjects.map(\n\t\t(change): Experimental_SuiClientTypes.ChangedObject => {\n\t\t\treturn {\n\t\t\t\tid: change.objectId!,\n\t\t\t\tinputState: mapInputObjectState(change.inputState)!,\n\t\t\t\tinputVersion: change.inputVersion?.toString() ?? null,\n\t\t\t\tinputDigest: change.inputDigest ?? null,\n\t\t\t\tinputOwner: mapOwner(change.inputOwner),\n\t\t\t\toutputState: mapOutputObjectState(change.outputState)!,\n\t\t\t\toutputVersion: change.outputVersion?.toString() ?? null,\n\t\t\t\toutputDigest: change.outputDigest ?? null,\n\t\t\t\toutputOwner: mapOwner(change.outputOwner),\n\t\t\t\tidOperation: mapIdOperation(change.idOperation)!,\n\t\t\t};\n\t\t},\n\t);\n\n\treturn {\n\t\tbcs: effects.bcs?.value!,\n\t\tdigest: effects.digest!,\n\t\tversion: 2,\n\t\tstatus: effects.status?.success\n\t\t\t? {\n\t\t\t\t\tsuccess: true,\n\t\t\t\t\terror: null,\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\tsuccess: false,\n\t\t\t\t\t// TODO: parse errors properly\n\t\t\t\t\terror: JSON.stringify(effects.status?.error),\n\t\t\t\t},\n\t\tgasUsed: {\n\t\t\tcomputationCost: effects.gasUsed?.computationCost?.toString()!,\n\t\t\tstorageCost: effects.gasUsed?.storageCost?.toString()!,\n\t\t\tstorageRebate: effects.gasUsed?.storageRebate?.toString()!,\n\t\t\tnonRefundableStorageFee: effects.gasUsed?.nonRefundableStorageFee?.toString()!,\n\t\t},\n\t\ttransactionDigest: effects.transactionDigest!,\n\t\tgasObject: {\n\t\t\tid: effects.gasObject?.objectId!,\n\t\t\tinputState: mapInputObjectState(effects.gasObject?.inputState)!,\n\t\t\tinputVersion: effects.gasObject?.inputVersion?.toString() ?? null,\n\t\t\tinputDigest: effects.gasObject?.inputDigest ?? null,\n\t\t\tinputOwner: mapOwner(effects.gasObject?.inputOwner),\n\t\t\toutputState: mapOutputObjectState(effects.gasObject?.outputState)!,\n\t\t\toutputVersion: effects.gasObject?.outputVersion?.toString() ?? null,\n\t\t\toutputDigest: effects.gasObject?.outputDigest ?? null,\n\t\t\toutputOwner: mapOwner(effects.gasObject?.outputOwner),\n\t\t\tidOperation: mapIdOperation(effects.gasObject?.idOperation)!,\n\t\t},\n\t\teventsDigest: effects.eventsDigest ?? null,\n\t\tdependencies: effects.dependencies,\n\t\tlamportVersion: effects.lamportVersion?.toString() ?? null,\n\t\tchangedObjects,\n\t\tunchangedConsensusObjects: effects.unchangedConsensusObjects.map(\n\t\t\t(object): Experimental_SuiClientTypes.UnchangedConsensusObject => {\n\t\t\t\treturn {\n\t\t\t\t\tkind: mapUnchangedConsensusObjectKind(object.kind)!,\n\t\t\t\t\t// TODO: we are inconsistent about id vs objectId\n\t\t\t\t\tobjectId: object.objectId!,\n\t\t\t\t\tversion: object.version?.toString() ?? null,\n\t\t\t\t\tdigest: object.digest ?? null,\n\t\t\t\t};\n\t\t\t},\n\t\t),\n\t\tauxiliaryDataDigest: effects.auxiliaryDataDigest ?? null,\n\t};\n}\n\nfunction parseTransaction(\n\ttransaction: ExecutedTransaction,\n): Experimental_SuiClientTypes.TransactionResponse {\n\tconst parsedTx = bcs.SenderSignedData.parse(transaction.transaction?.bcs?.value!)[0];\n\tconst bytes = bcs.TransactionData.serialize(parsedTx.intentMessage.value).toBytes();\n\tconst data = TransactionDataBuilder.restore({\n\t\tversion: 2,\n\t\tsender: parsedTx.intentMessage.value.V1.sender,\n\t\texpiration: parsedTx.intentMessage.value.V1.expiration,\n\t\tgasData: parsedTx.intentMessage.value.V1.gasData,\n\t\tinputs: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction!.inputs,\n\t\tcommands: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction!.commands,\n\t});\n\n\tconst objectTypes: Record<string, string> = {};\n\ttransaction.inputObjects.forEach((object) => {\n\t\tif (object.objectId && object.objectType) {\n\t\t\tobjectTypes[object.objectId] = object.objectType;\n\t\t}\n\t});\n\n\ttransaction.outputObjects.forEach((object) => {\n\t\tif (object.objectId && object.objectType) {\n\t\t\tobjectTypes[object.objectId] = object.objectType;\n\t\t}\n\t});\n\n\tconst effects = parseTransactionEffects({\n\t\teffects: transaction.effects,\n\t})!;\n\n\treturn {\n\t\tdigest: transaction.digest!,\n\t\tepoch: transaction.effects?.epoch?.toString() ?? null,\n\t\teffects,\n\t\tobjectTypes: Promise.resolve(objectTypes),\n\t\ttransaction: {\n\t\t\tgasData: data.gasData,\n\t\t\tsender: data.sender,\n\t\t\texpiration: data.expiration,\n\t\t\tcommands: data.commands,\n\t\t\tinputs: data.inputs,\n\t\t\tversion: data.version,\n\t\t\tbcs: bytes,\n\t\t},\n\t\tsignatures: parsedTx.txSignatures,\n\t\tbalanceChanges:\n\t\t\ttransaction.balanceChanges?.map((change) => ({\n\t\t\t\tcoinType: change.coinType!,\n\t\t\t\taddress: change.address!,\n\t\t\t\tamount: change.amount!,\n\t\t\t})) ?? [],\n\t};\n}\n\nfunction parseNormalizedSuiMoveType(\n\ttype: OpenSignature,\n): Experimental_SuiClientTypes.OpenSignature {\n\tlet reference: 'mutable' | 'immutable' | null = null;\n\n\tif (type.reference === OpenSignature_Reference.IMMUTABLE) {\n\t\treference = 'immutable';\n\t} else if (type.reference === OpenSignature_Reference.MUTABLE) {\n\t\treference = 'mutable';\n\t}\n\n\treturn {\n\t\treference,\n\t\tbody: parseNormalizedSuiMoveTypeBody(type.body!),\n\t};\n}\n\nfunction parseNormalizedSuiMoveTypeBody(\n\ttype: OpenSignatureBody,\n): Experimental_SuiClientTypes.OpenSignatureBody {\n\tswitch (type.type) {\n\t\tcase OpenSignatureBody_Type.TYPE_UNKNOWN:\n\t\t\treturn { $kind: 'unknown' };\n\t\tcase OpenSignatureBody_Type.ADDRESS:\n\t\t\treturn { $kind: 'address' };\n\t\tcase OpenSignatureBody_Type.BOOL:\n\t\t\treturn { $kind: 'bool' };\n\t\tcase OpenSignatureBody_Type.U8:\n\t\t\treturn { $kind: 'u8' };\n\t\tcase OpenSignatureBody_Type.U16:\n\t\t\treturn { $kind: 'u16' };\n\t\tcase OpenSignatureBody_Type.U32:\n\t\t\treturn { $kind: 'u32' };\n\t\tcase OpenSignatureBody_Type.U64:\n\t\t\treturn { $kind: 'u64' };\n\t\tcase OpenSignatureBody_Type.U128:\n\t\t\treturn { $kind: 'u128' };\n\t\tcase OpenSignatureBody_Type.U256:\n\t\t\treturn { $kind: 'u256' };\n\t\tcase OpenSignatureBody_Type.VECTOR:\n\t\t\treturn {\n\t\t\t\t$kind: 'vector',\n\t\t\t\tvector: parseNormalizedSuiMoveTypeBody(type.typeParameterInstantiation[0]),\n\t\t\t};\n\t\tcase OpenSignatureBody_Type.DATATYPE:\n\t\t\treturn {\n\t\t\t\t$kind: 'datatype',\n\t\t\t\tdatatype: {\n\t\t\t\t\ttypeName: type.typeName!,\n\t\t\t\t\ttypeParameters: type.typeParameterInstantiation.map((t) =>\n\t\t\t\t\t\tparseNormalizedSuiMoveTypeBody(t),\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t};\n\t\tcase OpenSignatureBody_Type.TYPE_PARAMETER:\n\t\t\treturn {\n\t\t\t\t$kind: 'typeParameter',\n\t\t\t\tindex: type.typeParameter!,\n\t\t\t};\n\t\tdefault:\n\t\t\treturn { $kind: 'unknown' };\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,0BAAwC;AAGxC,mBAAgC;AAChC,mBAA4C;AAG5C,qBAAsE;AACtE,IAAAA,kBAIO;AACP,0BAAuC;AACvC,iBAAoB;AAEpB,0BAKO;AA5BP;AAgCO,MAAM,uBAAuB,4CAAwB;AAAA,EAE3D,YAAY,EAAE,QAAQ,GAAG,QAAQ,GAA0B;AAC1D,UAAM,OAAO;AAFd;AAGC,uBAAK,SAAU;AAAA,EAChB;AAAA,EAEA,MAAM,WACL,SAC0D;AAC1D,UAAM,cAAU,oBAAM,QAAQ,WAAW,EAAE;AAC3C,UAAM,UAAqE,CAAC;AAE5E,eAAW,SAAS,SAAS;AAC5B,YAAM,WAAW,MAAM,mBAAK,SAAQ,cAAc,gBAAgB;AAAA,QACjE,UAAU,MAAM,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,EAAE;AAAA,QAC9C,UAAU;AAAA,UACT,OAAO;AAAA,YACN;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACD;AAAA,QACD;AAAA,MACD,CAAC;AAED,cAAQ;AAAA,QACP,GAAG,SAAS,SAAS,QAAQ;AAAA,UAC5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A,MACD;AAAA,IACD,KAAK,2CAAuB;AAC3B,aAAO;AAAA,QACN,OAAO;AAAA,QACP,OAAO,KAAK;AAAA,MACb;AAAA,IACD;AACC,aAAO,EAAE,OAAO,UAAU;AAAA,EAC5B;AACD;",
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tExperimental_CoreClientOptions,\n\tExperimental_SuiClientTypes,\n} from '../experimental/index.js';\nimport { Experimental_CoreClient } from '../experimental/index.js';\nimport type { SuiGrpcClient } from './client.js';\nimport type { Owner } from './proto/sui/rpc/v2/owner.js';\nimport { Owner_OwnerKind } from './proto/sui/rpc/v2/owner.js';\nimport { chunk, fromBase64, toBase64 } from '@mysten/utils';\nimport type { ExecutedTransaction } from './proto/sui/rpc/v2/executed_transaction.js';\nimport type { TransactionEffects } from './proto/sui/rpc/v2/effects.js';\nimport { UnchangedConsensusObject_UnchangedConsensusObjectKind } from './proto/sui/rpc/v2/effects.js';\nimport {\n\tChangedObject_IdOperation,\n\tChangedObject_InputObjectState,\n\tChangedObject_OutputObjectState,\n} from './proto/sui/rpc/v2/effects.js';\nimport { TransactionDataBuilder } from '../transactions/index.js';\nimport { bcs } from '../bcs/index.js';\nimport type { OpenSignature, OpenSignatureBody } from './proto/sui/rpc/v2/move_package.js';\nimport {\n\tAbility,\n\tFunctionDescriptor_Visibility,\n\tOpenSignature_Reference,\n\tOpenSignatureBody_Type,\n} from './proto/sui/rpc/v2/move_package.js';\nexport interface GrpcCoreClientOptions extends Experimental_CoreClientOptions {\n\tclient: SuiGrpcClient;\n}\nexport class GrpcCoreClient extends Experimental_CoreClient {\n\t#client: SuiGrpcClient;\n\tconstructor({ client, ...options }: GrpcCoreClientOptions) {\n\t\tsuper(options);\n\t\tthis.#client = client;\n\t}\n\n\tasync getObjects(\n\t\toptions: Experimental_SuiClientTypes.GetObjectsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetObjectsResponse> {\n\t\tconst batches = chunk(options.objectIds, 50);\n\t\tconst results: Experimental_SuiClientTypes.GetObjectsResponse['objects'] = [];\n\n\t\tfor (const batch of batches) {\n\t\t\tconst response = await this.#client.ledgerService.batchGetObjects({\n\t\t\t\trequests: batch.map((id) => ({ objectId: id })),\n\t\t\t\treadMask: {\n\t\t\t\t\tpaths: [\n\t\t\t\t\t\t'owner',\n\t\t\t\t\t\t'object_type',\n\t\t\t\t\t\t'bcs',\n\t\t\t\t\t\t'digest',\n\t\t\t\t\t\t'version',\n\t\t\t\t\t\t'object_id',\n\t\t\t\t\t\t'previous_transaction',\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tresults.push(\n\t\t\t\t...response.response.objects.map(\n\t\t\t\t\t(object): Experimental_SuiClientTypes.ObjectResponse | Error => {\n\t\t\t\t\t\tif (object.result.oneofKind === 'error') {\n\t\t\t\t\t\t\t// TODO: improve error handling\n\t\t\t\t\t\t\treturn new Error(object.result.error.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (object.result.oneofKind !== 'object') {\n\t\t\t\t\t\t\treturn new Error('Unexpected result type');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid: object.result.object.objectId!,\n\t\t\t\t\t\t\tversion: object.result.object.version?.toString()!,\n\t\t\t\t\t\t\tdigest: object.result.object.digest!,\n\t\t\t\t\t\t\t// TODO: bcs content is not returned in all cases\n\t\t\t\t\t\t\tcontent: Promise.resolve(object.result.object.bcs?.value!),\n\t\t\t\t\t\t\towner: mapOwner(object.result.object.owner)!,\n\t\t\t\t\t\t\ttype: object.result.object.objectType!,\n\t\t\t\t\t\t\tpreviousTransaction: object.result.object.previousTransaction ?? null,\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\treturn {\n\t\t\tobjects: results,\n\t\t};\n\t}\n\tasync getOwnedObjects(\n\t\toptions: Experimental_SuiClientTypes.GetOwnedObjectsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetOwnedObjectsResponse> {\n\t\tconst response = await this.#client.stateService.listOwnedObjects({\n\t\t\towner: options.address,\n\t\t\tobjectType: options.type\n\t\t\t\t? (await this.mvr.resolveType({ type: options.type })).type\n\t\t\t\t: undefined,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'owner',\n\t\t\t\t\t'object_type',\n\t\t\t\t\t'bcs',\n\t\t\t\t\t'digest',\n\t\t\t\t\t'version',\n\t\t\t\t\t'object_id',\n\t\t\t\t\t'previous_transaction',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\n\t\tconst objects = response.response.objects.map(\n\t\t\t(object): Experimental_SuiClientTypes.ObjectResponse => ({\n\t\t\t\tid: object.objectId!,\n\t\t\t\tversion: object.version?.toString()!,\n\t\t\t\tdigest: object.digest!,\n\t\t\t\t// TODO: List owned objects doesn't return content right now\n\t\t\t\tget content() {\n\t\t\t\t\treturn Promise.reject(\n\t\t\t\t\t\tnew Error('GRPC does not return object contents when listing owned objects'),\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\towner: mapOwner(object.owner)!,\n\t\t\t\ttype: object.objectType!,\n\t\t\t\tpreviousTransaction: object.previousTransaction ?? null,\n\t\t\t}),\n\t\t);\n\n\t\treturn {\n\t\t\tobjects,\n\t\t\tcursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,\n\t\t\thasNextPage: response.response.nextPageToken !== undefined,\n\t\t};\n\t}\n\tasync getCoins(\n\t\toptions: Experimental_SuiClientTypes.GetCoinsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetCoinsResponse> {\n\t\tconst response = await this.#client.stateService.listOwnedObjects({\n\t\t\towner: options.address,\n\t\t\tobjectType: `0x2::coin::Coin<${(await this.mvr.resolveType({ type: options.coinType })).type}>`,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'owner',\n\t\t\t\t\t'object_type',\n\t\t\t\t\t'bcs',\n\t\t\t\t\t'digest',\n\t\t\t\t\t'version',\n\t\t\t\t\t'object_id',\n\t\t\t\t\t'balance',\n\t\t\t\t\t'previous_transaction',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\n\t\treturn {\n\t\t\tobjects: response.response.objects.map(\n\t\t\t\t(object): Experimental_SuiClientTypes.CoinResponse => ({\n\t\t\t\t\tid: object.objectId!,\n\t\t\t\t\tversion: object.version?.toString()!,\n\t\t\t\t\tdigest: object.digest!,\n\t\t\t\t\t// TODO: List owned objects doesn't return content right now\n\t\t\t\t\tget content() {\n\t\t\t\t\t\treturn Promise.reject(\n\t\t\t\t\t\t\tnew Error('GRPC does not return object contents when listing owned objects'),\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\towner: mapOwner(object.owner)!,\n\t\t\t\t\ttype: object.objectType!,\n\t\t\t\t\tbalance: object.balance?.toString()!,\n\t\t\t\t\tpreviousTransaction: object.previousTransaction ?? null,\n\t\t\t\t}),\n\t\t\t),\n\t\t\tcursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,\n\t\t\thasNextPage: response.response.nextPageToken !== undefined,\n\t\t};\n\t}\n\n\tasync getBalance(\n\t\toptions: Experimental_SuiClientTypes.GetBalanceOptions,\n\t): Promise<Experimental_SuiClientTypes.GetBalanceResponse> {\n\t\tconst result = await this.#client.stateService.getBalance({\n\t\t\towner: options.address,\n\t\t\tcoinType: (await this.mvr.resolveType({ type: options.coinType })).type,\n\t\t});\n\n\t\treturn {\n\t\t\tbalance: {\n\t\t\t\tbalance: result.response.balance?.balance?.toString() ?? '0',\n\t\t\t\tcoinType: result.response.balance?.coinType ?? options.coinType,\n\t\t\t},\n\t\t};\n\t}\n\n\tasync getAllBalances(\n\t\toptions: Experimental_SuiClientTypes.GetAllBalancesOptions,\n\t): Promise<Experimental_SuiClientTypes.GetAllBalancesResponse> {\n\t\tconst result = await this.#client.stateService.listBalances({\n\t\t\towner: options.address,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t\tpageSize: options.limit,\n\t\t});\n\n\t\treturn {\n\t\t\thasNextPage: !!result.response.nextPageToken,\n\t\t\tcursor: result.response.nextPageToken ? toBase64(result.response.nextPageToken) : null,\n\t\t\tbalances: result.response.balances.map((balance) => ({\n\t\t\t\tbalance: balance.balance?.toString() ?? '0',\n\t\t\t\tcoinType: balance.coinType!,\n\t\t\t})),\n\t\t};\n\t}\n\tasync getTransaction(\n\t\toptions: Experimental_SuiClientTypes.GetTransactionOptions,\n\t): Promise<Experimental_SuiClientTypes.GetTransactionResponse> {\n\t\tconst { response } = await this.#client.ledgerService.getTransaction({\n\t\t\tdigest: options.digest,\n\t\t\treadMask: {\n\t\t\t\tpaths: ['digest', 'transaction', 'effects', 'signatures', 'balance_changes'],\n\t\t\t},\n\t\t});\n\n\t\treturn {\n\t\t\ttransaction: parseTransaction(response.transaction!),\n\t\t};\n\t}\n\tasync executeTransaction(\n\t\toptions: Experimental_SuiClientTypes.ExecuteTransactionOptions,\n\t): Promise<Experimental_SuiClientTypes.ExecuteTransactionResponse> {\n\t\tconst { response } = await this.#client.transactionExecutionService.executeTransaction({\n\t\t\ttransaction: {\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: options.transaction,\n\t\t\t\t},\n\t\t\t},\n\t\t\tsignatures: options.signatures.map((signature) => ({\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: fromBase64(signature),\n\t\t\t\t},\n\t\t\t\tsignature: {\n\t\t\t\t\toneofKind: undefined,\n\t\t\t\t},\n\t\t\t})),\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'transaction.digest',\n\t\t\t\t\t'transaction.transaction',\n\t\t\t\t\t'transaction.effects',\n\t\t\t\t\t'transaction.signatures',\n\t\t\t\t\t'transaction.balance_changes',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\t\treturn {\n\t\t\ttransaction: parseTransaction(response.transaction!),\n\t\t};\n\t}\n\tasync dryRunTransaction(\n\t\toptions: Experimental_SuiClientTypes.DryRunTransactionOptions,\n\t): Promise<Experimental_SuiClientTypes.DryRunTransactionResponse> {\n\t\tconst { response } = await this.#client.transactionExecutionService.simulateTransaction({\n\t\t\ttransaction: {\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: options.transaction,\n\t\t\t\t},\n\t\t\t},\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'transaction.digest',\n\t\t\t\t\t'transaction.transaction',\n\t\t\t\t\t'transaction.effects',\n\t\t\t\t\t'transaction.signatures',\n\t\t\t\t\t'transaction.balance_changes',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\n\t\treturn {\n\t\t\ttransaction: parseTransaction(response.transaction!),\n\t\t};\n\t}\n\tasync getReferenceGasPrice(): Promise<Experimental_SuiClientTypes.GetReferenceGasPriceResponse> {\n\t\tconst response = await this.#client.ledgerService.getEpoch({});\n\n\t\treturn {\n\t\t\treferenceGasPrice: response.response.epoch?.referenceGasPrice?.toString()!,\n\t\t};\n\t}\n\n\tasync getDynamicFields(\n\t\toptions: Experimental_SuiClientTypes.GetDynamicFieldsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetDynamicFieldsResponse> {\n\t\tconst response = await this.#client.stateService.listDynamicFields({\n\t\t\tparent: options.parentId,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t});\n\n\t\treturn {\n\t\t\tdynamicFields: response.response.dynamicFields.map((field) => ({\n\t\t\t\tid: field.fieldId!,\n\t\t\t\tname: {\n\t\t\t\t\ttype: field.name?.name!,\n\t\t\t\t\tbcs: field.name?.value!,\n\t\t\t\t},\n\t\t\t\ttype: field.fieldObject\n\t\t\t\t\t? `0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${field.name?.name!}>,0x2::object::ID>`\n\t\t\t\t\t: `0x2::dynamic_field::Field<${field.name?.value!},${field.valueType!}>`,\n\t\t\t})),\n\t\t\tcursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,\n\t\t\thasNextPage: response.response.nextPageToken !== undefined,\n\t\t};\n\t}\n\n\tasync verifyZkLoginSignature(\n\t\toptions: Experimental_SuiClientTypes.VerifyZkLoginSignatureOptions,\n\t): Promise<Experimental_SuiClientTypes.ZkLoginVerifyResponse> {\n\t\tconst { response } = await this.#client.signatureVerificationService.verifySignature({\n\t\t\tmessage: {\n\t\t\t\tname: options.intentScope,\n\t\t\t\tvalue: fromBase64(options.bytes),\n\t\t\t},\n\t\t\tsignature: {\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: fromBase64(options.signature),\n\t\t\t\t},\n\t\t\t\tsignature: {\n\t\t\t\t\toneofKind: undefined,\n\t\t\t\t},\n\t\t\t},\n\t\t\tjwks: [],\n\t\t});\n\n\t\treturn {\n\t\t\tsuccess: response.isValid ?? false,\n\t\t\terrors: response.reason ? [response.reason] : [],\n\t\t};\n\t}\n\n\tasync getMoveFunction(\n\t\toptions: Experimental_SuiClientTypes.GetMoveFunctionOptions,\n\t): Promise<Experimental_SuiClientTypes.GetMoveFunctionResponse> {\n\t\tconst { response } = await this.#client.movePackageService.getFunction({\n\t\t\tpackageId: (await this.mvr.resolvePackage({ package: options.packageId })).package,\n\t\t\tmoduleName: options.moduleName,\n\t\t\tname: options.name,\n\t\t});\n\n\t\tlet visibility: 'public' | 'private' | 'friend' | 'unknown' = 'unknown';\n\n\t\tswitch (response.function?.visibility) {\n\t\t\tcase FunctionDescriptor_Visibility.PUBLIC:\n\t\t\t\tvisibility = 'public';\n\t\t\t\tbreak;\n\t\t\tcase FunctionDescriptor_Visibility.PRIVATE:\n\t\t\t\tvisibility = 'private';\n\t\t\t\tbreak;\n\t\t\tcase FunctionDescriptor_Visibility.FRIEND:\n\t\t\t\tvisibility = 'friend';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn {\n\t\t\tfunction: {\n\t\t\t\tpackageId: options.packageId,\n\t\t\t\tmoduleName: options.moduleName,\n\t\t\t\tname: response.function?.name!,\n\t\t\t\tvisibility,\n\t\t\t\tisEntry: response.function?.isEntry ?? false,\n\t\t\t\ttypeParameters:\n\t\t\t\t\tresponse.function?.typeParameters?.map(({ constraints }) => ({\n\t\t\t\t\t\tisPhantom: false,\n\t\t\t\t\t\tconstraints:\n\t\t\t\t\t\t\tconstraints.map((constraint) => {\n\t\t\t\t\t\t\t\tswitch (constraint) {\n\t\t\t\t\t\t\t\t\tcase Ability.COPY:\n\t\t\t\t\t\t\t\t\t\treturn 'copy';\n\t\t\t\t\t\t\t\t\tcase Ability.DROP:\n\t\t\t\t\t\t\t\t\t\treturn 'drop';\n\t\t\t\t\t\t\t\t\tcase Ability.STORE:\n\t\t\t\t\t\t\t\t\t\treturn 'store';\n\t\t\t\t\t\t\t\t\tcase Ability.KEY:\n\t\t\t\t\t\t\t\t\t\treturn 'key';\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\treturn 'unknown';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}) ?? [],\n\t\t\t\t\t})) ?? [],\n\t\t\t\tparameters:\n\t\t\t\t\tresponse.function?.parameters?.map((param) => parseNormalizedSuiMoveType(param)) ?? [],\n\t\t\t\treturns: response.function?.returns?.map((ret) => parseNormalizedSuiMoveType(ret)) ?? [],\n\t\t\t},\n\t\t};\n\t}\n\n\tresolveTransactionPlugin(): never {\n\t\tthrow new Error('GRPC client does not support transaction resolution yet');\n\t}\n}\n\nfunction mapOwner(owner: Owner | null | undefined): Experimental_SuiClientTypes.ObjectOwner | null {\n\tif (!owner) {\n\t\treturn null;\n\t}\n\tif (owner.kind === Owner_OwnerKind.IMMUTABLE) {\n\t\treturn {\n\t\t\t$kind: 'Immutable',\n\t\t\tImmutable: true,\n\t\t};\n\t}\n\tif (owner.kind === Owner_OwnerKind.ADDRESS) {\n\t\treturn {\n\t\t\tAddressOwner: owner.address!,\n\t\t\t$kind: 'AddressOwner',\n\t\t};\n\t}\n\tif (owner.kind === Owner_OwnerKind.OBJECT) {\n\t\treturn {\n\t\t\t$kind: 'ObjectOwner',\n\t\t\tObjectOwner: owner.address!,\n\t\t};\n\t}\n\n\tif (owner.kind === Owner_OwnerKind.SHARED) {\n\t\tif (owner.address) {\n\t\t\treturn {\n\t\t\t\t$kind: 'ConsensusAddressOwner',\n\t\t\t\tConsensusAddressOwner: {\n\t\t\t\t\towner: owner.address,\n\t\t\t\t\tstartVersion: owner.version?.toString()!,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t$kind: 'Shared',\n\t\t\tShared: {\n\t\t\t\tinitialSharedVersion: owner.version?.toString()!,\n\t\t\t},\n\t\t};\n\t}\n\n\tthrow new Error('Unknown owner kind');\n}\n\nfunction mapIdOperation(\n\toperation: ChangedObject_IdOperation | undefined,\n): null | 'Created' | 'Deleted' | 'Unknown' | 'None' {\n\tif (operation == null) {\n\t\treturn null;\n\t}\n\tswitch (operation) {\n\t\tcase ChangedObject_IdOperation.CREATED:\n\t\t\treturn 'Created';\n\t\tcase ChangedObject_IdOperation.DELETED:\n\t\t\treturn 'Deleted';\n\t\tcase ChangedObject_IdOperation.NONE:\n\t\tcase ChangedObject_IdOperation.ID_OPERATION_UNKNOWN:\n\t\t\treturn 'None';\n\t\tdefault:\n\t\t\toperation satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nfunction mapInputObjectState(\n\tstate: ChangedObject_InputObjectState | undefined,\n): null | 'Exists' | 'DoesNotExist' | 'Unknown' {\n\tif (state == null) {\n\t\treturn null;\n\t}\n\tswitch (state) {\n\t\tcase ChangedObject_InputObjectState.EXISTS:\n\t\t\treturn 'Exists';\n\t\tcase ChangedObject_InputObjectState.DOES_NOT_EXIST:\n\t\t\treturn 'DoesNotExist';\n\t\tcase ChangedObject_InputObjectState.UNKNOWN:\n\t\t\treturn 'Unknown';\n\t\tdefault:\n\t\t\tstate satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nfunction mapOutputObjectState(\n\tstate: ChangedObject_OutputObjectState | undefined,\n): null | 'ObjectWrite' | 'PackageWrite' | 'DoesNotExist' | 'Unknown' {\n\tif (state == null) {\n\t\treturn null;\n\t}\n\tswitch (state) {\n\t\tcase ChangedObject_OutputObjectState.OBJECT_WRITE:\n\t\t\treturn 'ObjectWrite';\n\t\tcase ChangedObject_OutputObjectState.PACKAGE_WRITE:\n\t\t\treturn 'PackageWrite';\n\t\tcase ChangedObject_OutputObjectState.DOES_NOT_EXIST:\n\t\t\treturn 'DoesNotExist';\n\t\tcase ChangedObject_OutputObjectState.UNKNOWN:\n\t\t\treturn 'Unknown';\n\t\tdefault:\n\t\t\tstate satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nfunction mapUnchangedConsensusObjectKind(\n\tkind: UnchangedConsensusObject_UnchangedConsensusObjectKind | undefined,\n): null | Experimental_SuiClientTypes.UnchangedConsensusObject['kind'] {\n\tif (kind == null) {\n\t\treturn null;\n\t}\n\tswitch (kind) {\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.UNCHANGED_CONSENSUS_OBJECT_KIND_UNKNOWN:\n\t\t\treturn 'Unknown';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.READ_ONLY_ROOT:\n\t\t\treturn 'ReadOnlyRoot';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.MUTATE_CONSENSUS_STREAM_ENDED:\n\t\t\treturn 'MutateConsensusStreamEnded';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.READ_CONSENSUS_STREAM_ENDED:\n\t\t\treturn 'ReadConsensusStreamEnded';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.CANCELED:\n\t\t\treturn 'Cancelled';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.PER_EPOCH_CONFIG:\n\t\t\treturn 'PerEpochConfig';\n\t\tdefault:\n\t\t\tkind satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nexport function parseTransactionEffects({\n\teffects,\n}: {\n\teffects: TransactionEffects | undefined;\n}): Experimental_SuiClientTypes.TransactionEffects | null {\n\tif (!effects) {\n\t\treturn null;\n\t}\n\n\tconst changedObjects = effects.changedObjects.map(\n\t\t(change): Experimental_SuiClientTypes.ChangedObject => {\n\t\t\treturn {\n\t\t\t\tid: change.objectId!,\n\t\t\t\tinputState: mapInputObjectState(change.inputState)!,\n\t\t\t\tinputVersion: change.inputVersion?.toString() ?? null,\n\t\t\t\tinputDigest: change.inputDigest ?? null,\n\t\t\t\tinputOwner: mapOwner(change.inputOwner),\n\t\t\t\toutputState: mapOutputObjectState(change.outputState)!,\n\t\t\t\toutputVersion: change.outputVersion?.toString() ?? null,\n\t\t\t\toutputDigest: change.outputDigest ?? null,\n\t\t\t\toutputOwner: mapOwner(change.outputOwner),\n\t\t\t\tidOperation: mapIdOperation(change.idOperation)!,\n\t\t\t};\n\t\t},\n\t);\n\n\treturn {\n\t\tbcs: effects.bcs?.value!,\n\t\tdigest: effects.digest!,\n\t\tversion: 2,\n\t\tstatus: effects.status?.success\n\t\t\t? {\n\t\t\t\t\tsuccess: true,\n\t\t\t\t\terror: null,\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\tsuccess: false,\n\t\t\t\t\t// TODO: parse errors properly\n\t\t\t\t\terror: JSON.stringify(effects.status?.error),\n\t\t\t\t},\n\t\tgasUsed: {\n\t\t\tcomputationCost: effects.gasUsed?.computationCost?.toString()!,\n\t\t\tstorageCost: effects.gasUsed?.storageCost?.toString()!,\n\t\t\tstorageRebate: effects.gasUsed?.storageRebate?.toString()!,\n\t\t\tnonRefundableStorageFee: effects.gasUsed?.nonRefundableStorageFee?.toString()!,\n\t\t},\n\t\ttransactionDigest: effects.transactionDigest!,\n\t\tgasObject: {\n\t\t\tid: effects.gasObject?.objectId!,\n\t\t\tinputState: mapInputObjectState(effects.gasObject?.inputState)!,\n\t\t\tinputVersion: effects.gasObject?.inputVersion?.toString() ?? null,\n\t\t\tinputDigest: effects.gasObject?.inputDigest ?? null,\n\t\t\tinputOwner: mapOwner(effects.gasObject?.inputOwner),\n\t\t\toutputState: mapOutputObjectState(effects.gasObject?.outputState)!,\n\t\t\toutputVersion: effects.gasObject?.outputVersion?.toString() ?? null,\n\t\t\toutputDigest: effects.gasObject?.outputDigest ?? null,\n\t\t\toutputOwner: mapOwner(effects.gasObject?.outputOwner),\n\t\t\tidOperation: mapIdOperation(effects.gasObject?.idOperation)!,\n\t\t},\n\t\teventsDigest: effects.eventsDigest ?? null,\n\t\tdependencies: effects.dependencies,\n\t\tlamportVersion: effects.lamportVersion?.toString() ?? null,\n\t\tchangedObjects,\n\t\tunchangedConsensusObjects: effects.unchangedConsensusObjects.map(\n\t\t\t(object): Experimental_SuiClientTypes.UnchangedConsensusObject => {\n\t\t\t\treturn {\n\t\t\t\t\tkind: mapUnchangedConsensusObjectKind(object.kind)!,\n\t\t\t\t\t// TODO: we are inconsistent about id vs objectId\n\t\t\t\t\tobjectId: object.objectId!,\n\t\t\t\t\tversion: object.version?.toString() ?? null,\n\t\t\t\t\tdigest: object.digest ?? null,\n\t\t\t\t};\n\t\t\t},\n\t\t),\n\t\tauxiliaryDataDigest: effects.auxiliaryDataDigest ?? null,\n\t};\n}\n\nfunction parseTransaction(\n\ttransaction: ExecutedTransaction,\n): Experimental_SuiClientTypes.TransactionResponse {\n\tconst parsedTx = bcs.SenderSignedData.parse(transaction.transaction?.bcs?.value!)[0];\n\tconst bytes = bcs.TransactionData.serialize(parsedTx.intentMessage.value).toBytes();\n\tconst data = TransactionDataBuilder.restore({\n\t\tversion: 2,\n\t\tsender: parsedTx.intentMessage.value.V1.sender,\n\t\texpiration: parsedTx.intentMessage.value.V1.expiration,\n\t\tgasData: parsedTx.intentMessage.value.V1.gasData,\n\t\tinputs: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction!.inputs,\n\t\tcommands: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction!.commands,\n\t});\n\n\tconst objectTypes: Record<string, string> = {};\n\ttransaction.objects?.objects.forEach((object) => {\n\t\tif (object.objectId && object.objectType) {\n\t\t\tobjectTypes[object.objectId] = object.objectType;\n\t\t}\n\t});\n\n\tconst effects = parseTransactionEffects({\n\t\teffects: transaction.effects,\n\t})!;\n\n\treturn {\n\t\tdigest: transaction.digest!,\n\t\tepoch: transaction.effects?.epoch?.toString() ?? null,\n\t\teffects,\n\t\tobjectTypes: Promise.resolve(objectTypes),\n\t\ttransaction: {\n\t\t\tgasData: data.gasData,\n\t\t\tsender: data.sender,\n\t\t\texpiration: data.expiration,\n\t\t\tcommands: data.commands,\n\t\t\tinputs: data.inputs,\n\t\t\tversion: data.version,\n\t\t\tbcs: bytes,\n\t\t},\n\t\tsignatures: parsedTx.txSignatures,\n\t\tbalanceChanges:\n\t\t\ttransaction.balanceChanges?.map((change) => ({\n\t\t\t\tcoinType: change.coinType!,\n\t\t\t\taddress: change.address!,\n\t\t\t\tamount: change.amount!,\n\t\t\t})) ?? [],\n\t};\n}\n\nfunction parseNormalizedSuiMoveType(\n\ttype: OpenSignature,\n): Experimental_SuiClientTypes.OpenSignature {\n\tlet reference: 'mutable' | 'immutable' | null = null;\n\n\tif (type.reference === OpenSignature_Reference.IMMUTABLE) {\n\t\treference = 'immutable';\n\t} else if (type.reference === OpenSignature_Reference.MUTABLE) {\n\t\treference = 'mutable';\n\t}\n\n\treturn {\n\t\treference,\n\t\tbody: parseNormalizedSuiMoveTypeBody(type.body!),\n\t};\n}\n\nfunction parseNormalizedSuiMoveTypeBody(\n\ttype: OpenSignatureBody,\n): Experimental_SuiClientTypes.OpenSignatureBody {\n\tswitch (type.type) {\n\t\tcase OpenSignatureBody_Type.TYPE_UNKNOWN:\n\t\t\treturn { $kind: 'unknown' };\n\t\tcase OpenSignatureBody_Type.ADDRESS:\n\t\t\treturn { $kind: 'address' };\n\t\tcase OpenSignatureBody_Type.BOOL:\n\t\t\treturn { $kind: 'bool' };\n\t\tcase OpenSignatureBody_Type.U8:\n\t\t\treturn { $kind: 'u8' };\n\t\tcase OpenSignatureBody_Type.U16:\n\t\t\treturn { $kind: 'u16' };\n\t\tcase OpenSignatureBody_Type.U32:\n\t\t\treturn { $kind: 'u32' };\n\t\tcase OpenSignatureBody_Type.U64:\n\t\t\treturn { $kind: 'u64' };\n\t\tcase OpenSignatureBody_Type.U128:\n\t\t\treturn { $kind: 'u128' };\n\t\tcase OpenSignatureBody_Type.U256:\n\t\t\treturn { $kind: 'u256' };\n\t\tcase OpenSignatureBody_Type.VECTOR:\n\t\t\treturn {\n\t\t\t\t$kind: 'vector',\n\t\t\t\tvector: parseNormalizedSuiMoveTypeBody(type.typeParameterInstantiation[0]),\n\t\t\t};\n\t\tcase OpenSignatureBody_Type.DATATYPE:\n\t\t\treturn {\n\t\t\t\t$kind: 'datatype',\n\t\t\t\tdatatype: {\n\t\t\t\t\ttypeName: type.typeName!,\n\t\t\t\t\ttypeParameters: type.typeParameterInstantiation.map((t) =>\n\t\t\t\t\t\tparseNormalizedSuiMoveTypeBody(t),\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t};\n\t\tcase OpenSignatureBody_Type.TYPE_PARAMETER:\n\t\t\treturn {\n\t\t\t\t$kind: 'typeParameter',\n\t\t\t\tindex: type.typeParameter!,\n\t\t\t};\n\t\tdefault:\n\t\t\treturn { $kind: 'unknown' };\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,0BAAwC;AAGxC,mBAAgC;AAChC,mBAA4C;AAG5C,qBAAsE;AACtE,IAAAA,kBAIO;AACP,0BAAuC;AACvC,iBAAoB;AAEpB,0BAKO;AA5BP;AAgCO,MAAM,uBAAuB,4CAAwB;AAAA,EAE3D,YAAY,EAAE,QAAQ,GAAG,QAAQ,GAA0B;AAC1D,UAAM,OA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AA,IACxB,KAAK,2CAAuB;AAC3B,aAAO,EAAE,OAAO,OAAO;AAAA,IACxB,KAAK,2CAAuB;AAC3B,aAAO;AAAA,QACN,OAAO;AAAA,QACP,QAAQ,+BAA+B,KAAK,2BAA2B,CAAC,CAAC;AAAA,MAC1E;AAAA,IACD,KAAK,2CAAuB;AAC3B,aAAO;AAAA,QACN,OAAO;AAAA,QACP,UAAU;AAAA,UACT,UAAU,KAAK;AAAA,UACf,gBAAgB,KAAK,2BAA2B;AAAA,YAAI,CAAC,MACpD,+BAA+B,CAAC;AAAA,UACjC;AAAA,QACD;AAAA,MACD;AAAA,IACD,KAAK,2CAAuB;AAC3B,aAAO;AAAA,QACN,OAAO;AAAA,QACP,OAAO,KAAK;AAAA,MACb;AAAA,IACD;AACC,aAAO,EAAE,OAAO,UAAU;AAAA,EAC5B;AACD;",
|
|
6
6
|
"names": ["import_effects"]
|
|
7
7
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { JsonValue } from
|
|
2
|
-
import type { JsonReadOptions } from
|
|
3
|
-
import type { JsonWriteOptions } from
|
|
4
|
-
import type { BinaryReadOptions } from
|
|
5
|
-
import type { IMessageType } from
|
|
6
|
-
import { MessageType } from
|
|
1
|
+
import type { JsonValue } from "@protobuf-ts/runtime";
|
|
2
|
+
import type { JsonReadOptions } from "@protobuf-ts/runtime";
|
|
3
|
+
import type { JsonWriteOptions } from "@protobuf-ts/runtime";
|
|
4
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
5
|
+
import type { IMessageType } from "@protobuf-ts/runtime";
|
|
6
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
7
7
|
/**
|
|
8
8
|
* `Any` contains an arbitrary serialized protocol buffer message along with a
|
|
9
9
|
* URL that describes the type of the serialized message.
|
|
@@ -60,16 +60,15 @@ class Any$Type extends import_runtime4.MessageType {
|
|
|
60
60
|
*/
|
|
61
61
|
unpack(any, type, options) {
|
|
62
62
|
if (!this.contains(any, type))
|
|
63
|
-
throw new Error(
|
|
64
|
-
"Cannot unpack google.protobuf.Any with typeUrl '" + any.typeUrl + "' as " + type.typeName + "."
|
|
65
|
-
);
|
|
63
|
+
throw new Error("Cannot unpack google.protobuf.Any with typeUrl '" + any.typeUrl + "' as " + type.typeName + ".");
|
|
66
64
|
return type.fromBinary(any.value, options);
|
|
67
65
|
}
|
|
68
66
|
/**
|
|
69
67
|
* Does the given `Any` contain a packed message of the given type?
|
|
70
68
|
*/
|
|
71
69
|
contains(any, type) {
|
|
72
|
-
if (!any.typeUrl.length)
|
|
70
|
+
if (!any.typeUrl.length)
|
|
71
|
+
return false;
|
|
73
72
|
let wants = typeof type == "string" ? type : type.typeName;
|
|
74
73
|
let has = this.typeUrlToName(any.typeUrl);
|
|
75
74
|
return wants === has;
|
|
@@ -84,32 +83,29 @@ class Any$Type extends import_runtime4.MessageType {
|
|
|
84
83
|
* `google.protobuf.Any` from JSON format.
|
|
85
84
|
*/
|
|
86
85
|
internalJsonWrite(any, options) {
|
|
87
|
-
if (any.typeUrl === "")
|
|
86
|
+
if (any.typeUrl === "")
|
|
87
|
+
return {};
|
|
88
88
|
let typeName = this.typeUrlToName(any.typeUrl);
|
|
89
89
|
let opt = (0, import_runtime3.jsonWriteOptions)(options);
|
|
90
90
|
let type = opt.typeRegistry?.find((t) => t.typeName === typeName);
|
|
91
91
|
if (!type)
|
|
92
|
-
throw new globalThis.Error(
|
|
93
|
-
"Unable to convert google.protobuf.Any with typeUrl '" + any.typeUrl + "' to JSON. The specified type " + typeName + " is not available in the type registry."
|
|
94
|
-
);
|
|
92
|
+
throw new globalThis.Error("Unable to convert google.protobuf.Any with typeUrl '" + any.typeUrl + "' to JSON. The specified type " + typeName + " is not available in the type registry.");
|
|
95
93
|
let value = type.fromBinary(any.value, { readUnknownField: false });
|
|
96
94
|
let json = type.internalJsonWrite(value, opt);
|
|
97
|
-
if (typeName.startsWith("google.protobuf.") || !(0, import_runtime.isJsonObject)(json))
|
|
95
|
+
if (typeName.startsWith("google.protobuf.") || !(0, import_runtime.isJsonObject)(json))
|
|
96
|
+
json = { value: json };
|
|
98
97
|
json["@type"] = any.typeUrl;
|
|
99
98
|
return json;
|
|
100
99
|
}
|
|
101
100
|
internalJsonRead(json, options, target) {
|
|
102
101
|
if (!(0, import_runtime.isJsonObject)(json))
|
|
103
|
-
throw new globalThis.Error(
|
|
104
|
-
|
|
105
|
-
);
|
|
106
|
-
if (typeof json["@type"] != "string" || json["@type"] == "") return this.create();
|
|
102
|
+
throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON " + (0, import_runtime2.typeofJsonValue)(json) + ".");
|
|
103
|
+
if (typeof json["@type"] != "string" || json["@type"] == "")
|
|
104
|
+
return this.create();
|
|
107
105
|
let typeName = this.typeUrlToName(json["@type"]);
|
|
108
106
|
let type = options?.typeRegistry?.find((t) => t.typeName == typeName);
|
|
109
107
|
if (!type)
|
|
110
|
-
throw new globalThis.Error(
|
|
111
|
-
"Unable to parse google.protobuf.Any from JSON. The specified type " + typeName + " is not available in the type registry."
|
|
112
|
-
);
|
|
108
|
+
throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON. The specified type " + typeName + " is not available in the type registry.");
|
|
113
109
|
let value;
|
|
114
110
|
if (typeName.startsWith("google.protobuf.") && json.hasOwnProperty("value"))
|
|
115
111
|
value = type.fromJson(json["value"], options);
|
|
@@ -118,20 +114,24 @@ class Any$Type extends import_runtime4.MessageType {
|
|
|
118
114
|
delete copy["@type"];
|
|
119
115
|
value = type.fromJson(copy, options);
|
|
120
116
|
}
|
|
121
|
-
if (target === void 0)
|
|
117
|
+
if (target === void 0)
|
|
118
|
+
target = this.create();
|
|
122
119
|
target.typeUrl = json["@type"];
|
|
123
120
|
target.value = type.toBinary(value);
|
|
124
121
|
return target;
|
|
125
122
|
}
|
|
126
123
|
typeNameToUrl(name) {
|
|
127
|
-
if (!name.length)
|
|
124
|
+
if (!name.length)
|
|
125
|
+
throw new Error("invalid type name: " + name);
|
|
128
126
|
return "type.googleapis.com/" + name;
|
|
129
127
|
}
|
|
130
128
|
typeUrlToName(url) {
|
|
131
|
-
if (!url.length)
|
|
129
|
+
if (!url.length)
|
|
130
|
+
throw new Error("invalid type url: " + url);
|
|
132
131
|
let slash = url.lastIndexOf("/");
|
|
133
132
|
let name = slash > 0 ? url.substring(slash + 1) : url;
|
|
134
|
-
if (!name.length)
|
|
133
|
+
if (!name.length)
|
|
134
|
+
throw new Error("invalid type url: " + url);
|
|
135
135
|
return name;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/grpc/proto/google/protobuf/any.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// @generated by protobuf-ts 2.9.6 with parameter force_server_none,optimize_code_size,ts_nocheck\n// @generated from protobuf file \"google/protobuf/any.proto\" (package \"google.protobuf\", syntax proto3)\n// tslint:disable\n// @ts-nocheck\n//\n// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\nimport { isJsonObject } from '@protobuf-ts/runtime';\nimport { typeofJsonValue } from '@protobuf-ts/runtime';\nimport type { JsonValue } from '@protobuf-ts/runtime';\nimport { jsonWriteOptions } from '@protobuf-ts/runtime';\nimport type { JsonReadOptions } from '@protobuf-ts/runtime';\nimport type { JsonWriteOptions } from '@protobuf-ts/runtime';\nimport type { BinaryReadOptions } from '@protobuf-ts/runtime';\nimport type { IMessageType } from '@protobuf-ts/runtime';\nimport { MessageType } from '@protobuf-ts/runtime';\n/**\n * `Any` contains an arbitrary serialized protocol buffer message along with a\n * URL that describes the type of the serialized message.\n *\n * Protobuf library provides support to pack/unpack Any values in the form\n * of utility functions or additional generated methods of the Any type.\n *\n * Example 1: Pack and unpack a message in C++.\n *\n * Foo foo = ...;\n * Any any;\n * any.PackFrom(foo);\n * ...\n * if (any.UnpackTo(&foo)) {\n * ...\n * }\n *\n * Example 2: Pack and unpack a message in Java.\n *\n * Foo foo = ...;\n * Any any = Any.pack(foo);\n * ...\n * if (any.is(Foo.class)) {\n * foo = any.unpack(Foo.class);\n * }\n * // or ...\n * if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n * foo = any.unpack(Foo.getDefaultInstance());\n * }\n *\n * Example 3: Pack and unpack a message in Python.\n *\n * foo = Foo(...)\n * any = Any()\n * any.Pack(foo)\n * ...\n * if any.Is(Foo.DESCRIPTOR):\n * any.Unpack(foo)\n * ...\n *\n * Example 4: Pack and unpack a message in Go\n *\n * foo := &pb.Foo{...}\n * any, err := anypb.New(foo)\n * if err != nil {\n * ...\n * }\n * ...\n * foo := &pb.Foo{}\n * if err := any.UnmarshalTo(foo); err != nil {\n * ...\n * }\n *\n * The pack methods provided by protobuf library will by default use\n * 'type.googleapis.com/full.type.name' as the type URL and the unpack\n * methods only use the fully qualified type name after the last '/'\n * in the type URL, for example \"foo.bar.com/x/y.z\" will yield type\n * name \"y.z\".\n *\n * JSON\n * ====\n * The JSON representation of an `Any` value uses the regular\n * representation of the deserialized, embedded message, with an\n * additional field `@type` which contains the type URL. Example:\n *\n * package google.profile;\n * message Person {\n * string first_name = 1;\n * string last_name = 2;\n * }\n *\n * {\n * \"@type\": \"type.googleapis.com/google.profile.Person\",\n * \"firstName\": <string>,\n * \"lastName\": <string>\n * }\n *\n * If the embedded message type is well-known and has a custom JSON\n * representation, that representation will be embedded adding a field\n * `value` which holds the custom JSON in addition to the `@type`\n * field. Example (for message [google.protobuf.Duration][]):\n *\n * {\n * \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n * \"value\": \"1.212s\"\n * }\n *\n *\n * @generated from protobuf message google.protobuf.Any\n */\nexport interface Any {\n\t/**\n\t * A URL/resource name that uniquely identifies the type of the serialized\n\t * protocol buffer message. This string must contain at least\n\t * one \"/\" character. The last segment of the URL's path must represent\n\t * the fully qualified name of the type (as in\n\t * `path/google.protobuf.Duration`). The name should be in a canonical form\n\t * (e.g., leading \".\" is not accepted).\n\t *\n\t * In practice, teams usually precompile into the binary all types that they\n\t * expect it to use in the context of Any. However, for URLs which use the\n\t * scheme `http`, `https`, or no scheme, one can optionally set up a type\n\t * server that maps type URLs to message definitions as follows:\n\t *\n\t * * If no scheme is provided, `https` is assumed.\n\t * * An HTTP GET on the URL must yield a [google.protobuf.Type][]\n\t * value in binary format, or produce an error.\n\t * * Applications are allowed to cache lookup results based on the\n\t * URL, or have them precompiled into a binary to avoid any\n\t * lookup. Therefore, binary compatibility needs to be preserved\n\t * on changes to types. (Use versioned type names to manage\n\t * breaking changes.)\n\t *\n\t * Note: this functionality is not currently available in the official\n\t * protobuf release, and it is not used for type URLs beginning with\n\t * type.googleapis.com. As of May 2023, there are no widely used type server\n\t * implementations and no plans to implement one.\n\t *\n\t * Schemes other than `http`, `https` (or the empty scheme) might be\n\t * used with implementation specific semantics.\n\t *\n\t *\n\t * @generated from protobuf field: string type_url = 1;\n\t */\n\ttypeUrl: string;\n\t/**\n\t * Must be a valid serialized protocol buffer of the above specified type.\n\t *\n\t * @generated from protobuf field: bytes value = 2;\n\t */\n\tvalue: Uint8Array;\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Any$Type extends MessageType<Any> {\n\tconstructor() {\n\t\tsuper('google.protobuf.Any', [\n\t\t\t{ no: 1, name: 'type_url', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },\n\t\t\t{ no: 2, name: 'value', kind: 'scalar', T: 12 /*ScalarType.BYTES*/ },\n\t\t]);\n\t}\n\t/**\n\t * Pack the message into a new `Any`.\n\t *\n\t * Uses 'type.googleapis.com/full.type.name' as the type URL.\n\t */\n\tpack<T extends object>(message: T, type: IMessageType<T>): Any {\n\t\treturn {\n\t\t\ttypeUrl: this.typeNameToUrl(type.typeName),\n\t\t\tvalue: type.toBinary(message),\n\t\t};\n\t}\n\t/**\n\t * Unpack the message from the `Any`.\n\t */\n\tunpack<T extends object>(\n\t\tany: Any,\n\t\ttype: IMessageType<T>,\n\t\toptions?: Partial<BinaryReadOptions>,\n\t): T {\n\t\tif (!this.contains(any, type))\n\t\t\tthrow new Error(\n\t\t\t\t\"Cannot unpack google.protobuf.Any with typeUrl '\" +\n\t\t\t\t\tany.typeUrl +\n\t\t\t\t\t\"' as \" +\n\t\t\t\t\ttype.typeName +\n\t\t\t\t\t'.',\n\t\t\t);\n\t\treturn type.fromBinary(any.value, options);\n\t}\n\t/**\n\t * Does the given `Any` contain a packed message of the given type?\n\t */\n\tcontains(any: Any, type: IMessageType<any> | string): boolean {\n\t\tif (!any.typeUrl.length) return false;\n\t\tlet wants = typeof type == 'string' ? type : type.typeName;\n\t\tlet has = this.typeUrlToName(any.typeUrl);\n\t\treturn wants === has;\n\t}\n\t/**\n\t * Convert the message to canonical JSON value.\n\t *\n\t * You have to provide the `typeRegistry` option so that the\n\t * packed message can be converted to JSON.\n\t *\n\t * The `typeRegistry` option is also required to read\n\t * `google.protobuf.Any` from JSON format.\n\t */\n\tinternalJsonWrite(any: Any, options: JsonWriteOptions): JsonValue {\n\t\tif (any.typeUrl === '') return {};\n\t\tlet typeName = this.typeUrlToName(any.typeUrl);\n\t\tlet opt = jsonWriteOptions(options);\n\t\tlet type = opt.typeRegistry?.find((t) => t.typeName === typeName);\n\t\tif (!type)\n\t\t\tthrow new globalThis.Error(\n\t\t\t\t\"Unable to convert google.protobuf.Any with typeUrl '\" +\n\t\t\t\t\tany.typeUrl +\n\t\t\t\t\t\"' to JSON. The specified type \" +\n\t\t\t\t\ttypeName +\n\t\t\t\t\t' is not available in the type registry.',\n\t\t\t);\n\t\tlet value = type.fromBinary(any.value, { readUnknownField: false });\n\t\tlet json = type.internalJsonWrite(value, opt);\n\t\tif (typeName.startsWith('google.protobuf.') || !isJsonObject(json)) json = { value: json };\n\t\tjson['@type'] = any.typeUrl;\n\t\treturn json;\n\t}\n\tinternalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Any): Any {\n\t\tif (!isJsonObject(json))\n\t\t\tthrow new globalThis.Error(\n\t\t\t\t'Unable to parse google.protobuf.Any from JSON ' + typeofJsonValue(json) + '.',\n\t\t\t);\n\t\tif (typeof json['@type'] != 'string' || json['@type'] == '') return this.create();\n\t\tlet typeName = this.typeUrlToName(json['@type']);\n\t\tlet type = options?.typeRegistry?.find((t) => t.typeName == typeName);\n\t\tif (!type)\n\t\t\tthrow new globalThis.Error(\n\t\t\t\t'Unable to parse google.protobuf.Any from JSON. The specified type ' +\n\t\t\t\t\ttypeName +\n\t\t\t\t\t' is not available in the type registry.',\n\t\t\t);\n\t\tlet value;\n\t\tif (typeName.startsWith('google.protobuf.') && json.hasOwnProperty('value'))\n\t\t\tvalue = type.fromJson(json['value'], options);\n\t\telse {\n\t\t\tlet copy = Object.assign({}, json);\n\t\t\tdelete copy['@type'];\n\t\t\tvalue = type.fromJson(copy, options);\n\t\t}\n\t\tif (target === undefined) target = this.create();\n\t\ttarget.typeUrl = json['@type'];\n\t\ttarget.value = type.toBinary(value);\n\t\treturn target;\n\t}\n\ttypeNameToUrl(name: string): string {\n\t\tif (!name.length) throw new Error('invalid type name: ' + name);\n\t\treturn 'type.googleapis.com/' + name;\n\t}\n\ttypeUrlToName(url: string): string {\n\t\tif (!url.length) throw new Error('invalid type url: ' + url);\n\t\tlet slash = url.lastIndexOf('/');\n\t\tlet name = slash > 0 ? url.substring(slash + 1) : url;\n\t\tif (!name.length) throw new Error('invalid type url: ' + url);\n\t\treturn name;\n\t}\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Any\n */\nexport const Any = new Any$Type();\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCA,qBAA6B;AAC7B,IAAAA,kBAAgC;AAEhC,IAAAA,kBAAiC;AAKjC,IAAAA,kBAA4B;AAsI5B,MAAM,iBAAiB,4BAAiB;AAAA,
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// @generated by protobuf-ts 2.9.6 with parameter force_server_none,optimize_code_size,ts_nocheck\n// @generated from protobuf file \"google/protobuf/any.proto\" (package \"google.protobuf\", syntax proto3)\n// tslint:disable\n// @ts-nocheck\n//\n// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\nimport { isJsonObject } from \"@protobuf-ts/runtime\";\nimport { typeofJsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonValue } from \"@protobuf-ts/runtime\";\nimport { jsonWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { JsonReadOptions } from \"@protobuf-ts/runtime\";\nimport type { JsonWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { BinaryReadOptions } from \"@protobuf-ts/runtime\";\nimport type { IMessageType } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\n/**\n * `Any` contains an arbitrary serialized protocol buffer message along with a\n * URL that describes the type of the serialized message.\n *\n * Protobuf library provides support to pack/unpack Any values in the form\n * of utility functions or additional generated methods of the Any type.\n *\n * Example 1: Pack and unpack a message in C++.\n *\n * Foo foo = ...;\n * Any any;\n * any.PackFrom(foo);\n * ...\n * if (any.UnpackTo(&foo)) {\n * ...\n * }\n *\n * Example 2: Pack and unpack a message in Java.\n *\n * Foo foo = ...;\n * Any any = Any.pack(foo);\n * ...\n * if (any.is(Foo.class)) {\n * foo = any.unpack(Foo.class);\n * }\n * // or ...\n * if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n * foo = any.unpack(Foo.getDefaultInstance());\n * }\n *\n * Example 3: Pack and unpack a message in Python.\n *\n * foo = Foo(...)\n * any = Any()\n * any.Pack(foo)\n * ...\n * if any.Is(Foo.DESCRIPTOR):\n * any.Unpack(foo)\n * ...\n *\n * Example 4: Pack and unpack a message in Go\n *\n * foo := &pb.Foo{...}\n * any, err := anypb.New(foo)\n * if err != nil {\n * ...\n * }\n * ...\n * foo := &pb.Foo{}\n * if err := any.UnmarshalTo(foo); err != nil {\n * ...\n * }\n *\n * The pack methods provided by protobuf library will by default use\n * 'type.googleapis.com/full.type.name' as the type URL and the unpack\n * methods only use the fully qualified type name after the last '/'\n * in the type URL, for example \"foo.bar.com/x/y.z\" will yield type\n * name \"y.z\".\n *\n * JSON\n * ====\n * The JSON representation of an `Any` value uses the regular\n * representation of the deserialized, embedded message, with an\n * additional field `@type` which contains the type URL. Example:\n *\n * package google.profile;\n * message Person {\n * string first_name = 1;\n * string last_name = 2;\n * }\n *\n * {\n * \"@type\": \"type.googleapis.com/google.profile.Person\",\n * \"firstName\": <string>,\n * \"lastName\": <string>\n * }\n *\n * If the embedded message type is well-known and has a custom JSON\n * representation, that representation will be embedded adding a field\n * `value` which holds the custom JSON in addition to the `@type`\n * field. Example (for message [google.protobuf.Duration][]):\n *\n * {\n * \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n * \"value\": \"1.212s\"\n * }\n *\n *\n * @generated from protobuf message google.protobuf.Any\n */\nexport interface Any {\n /**\n * A URL/resource name that uniquely identifies the type of the serialized\n * protocol buffer message. This string must contain at least\n * one \"/\" character. The last segment of the URL's path must represent\n * the fully qualified name of the type (as in\n * `path/google.protobuf.Duration`). The name should be in a canonical form\n * (e.g., leading \".\" is not accepted).\n *\n * In practice, teams usually precompile into the binary all types that they\n * expect it to use in the context of Any. However, for URLs which use the\n * scheme `http`, `https`, or no scheme, one can optionally set up a type\n * server that maps type URLs to message definitions as follows:\n *\n * * If no scheme is provided, `https` is assumed.\n * * An HTTP GET on the URL must yield a [google.protobuf.Type][]\n * value in binary format, or produce an error.\n * * Applications are allowed to cache lookup results based on the\n * URL, or have them precompiled into a binary to avoid any\n * lookup. Therefore, binary compatibility needs to be preserved\n * on changes to types. (Use versioned type names to manage\n * breaking changes.)\n *\n * Note: this functionality is not currently available in the official\n * protobuf release, and it is not used for type URLs beginning with\n * type.googleapis.com. As of May 2023, there are no widely used type server\n * implementations and no plans to implement one.\n *\n * Schemes other than `http`, `https` (or the empty scheme) might be\n * used with implementation specific semantics.\n *\n *\n * @generated from protobuf field: string type_url = 1;\n */\n typeUrl: string;\n /**\n * Must be a valid serialized protocol buffer of the above specified type.\n *\n * @generated from protobuf field: bytes value = 2;\n */\n value: Uint8Array;\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Any$Type extends MessageType<Any> {\n constructor() {\n super(\"google.protobuf.Any\", [\n { no: 1, name: \"type_url\", kind: \"scalar\", T: 9 /*ScalarType.STRING*/ },\n { no: 2, name: \"value\", kind: \"scalar\", T: 12 /*ScalarType.BYTES*/ }\n ]);\n }\n /**\n * Pack the message into a new `Any`.\n *\n * Uses 'type.googleapis.com/full.type.name' as the type URL.\n */\n pack<T extends object>(message: T, type: IMessageType<T>): Any {\n return {\n typeUrl: this.typeNameToUrl(type.typeName), value: type.toBinary(message),\n };\n }\n /**\n * Unpack the message from the `Any`.\n */\n unpack<T extends object>(any: Any, type: IMessageType<T>, options?: Partial<BinaryReadOptions>): T {\n if (!this.contains(any, type))\n throw new Error(\"Cannot unpack google.protobuf.Any with typeUrl '\" + any.typeUrl + \"' as \" + type.typeName + \".\");\n return type.fromBinary(any.value, options);\n }\n /**\n * Does the given `Any` contain a packed message of the given type?\n */\n contains(any: Any, type: IMessageType<any> | string): boolean {\n if (!any.typeUrl.length)\n return false;\n let wants = typeof type == \"string\" ? type : type.typeName;\n let has = this.typeUrlToName(any.typeUrl);\n return wants === has;\n }\n /**\n * Convert the message to canonical JSON value.\n *\n * You have to provide the `typeRegistry` option so that the\n * packed message can be converted to JSON.\n *\n * The `typeRegistry` option is also required to read\n * `google.protobuf.Any` from JSON format.\n */\n internalJsonWrite(any: Any, options: JsonWriteOptions): JsonValue {\n if (any.typeUrl === \"\")\n return {};\n let typeName = this.typeUrlToName(any.typeUrl);\n let opt = jsonWriteOptions(options);\n let type = opt.typeRegistry?.find(t => t.typeName === typeName);\n if (!type)\n throw new globalThis.Error(\"Unable to convert google.protobuf.Any with typeUrl '\" + any.typeUrl + \"' to JSON. The specified type \" + typeName + \" is not available in the type registry.\");\n let value = type.fromBinary(any.value, { readUnknownField: false });\n let json = type.internalJsonWrite(value, opt);\n if (typeName.startsWith(\"google.protobuf.\") || !isJsonObject(json))\n json = { value: json };\n json[\"@type\"] = any.typeUrl;\n return json;\n }\n internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Any): Any {\n if (!isJsonObject(json))\n throw new globalThis.Error(\"Unable to parse google.protobuf.Any from JSON \" + typeofJsonValue(json) + \".\");\n if (typeof json[\"@type\"] != \"string\" || json[\"@type\"] == \"\")\n return this.create();\n let typeName = this.typeUrlToName(json[\"@type\"]);\n let type = options?.typeRegistry?.find(t => t.typeName == typeName);\n if (!type)\n throw new globalThis.Error(\"Unable to parse google.protobuf.Any from JSON. The specified type \" + typeName + \" is not available in the type registry.\");\n let value;\n if (typeName.startsWith(\"google.protobuf.\") && json.hasOwnProperty(\"value\"))\n value = type.fromJson(json[\"value\"], options);\n else {\n let copy = Object.assign({}, json);\n delete copy[\"@type\"];\n value = type.fromJson(copy, options);\n }\n if (target === undefined)\n target = this.create();\n target.typeUrl = json[\"@type\"];\n target.value = type.toBinary(value);\n return target;\n }\n typeNameToUrl(name: string): string {\n if (!name.length)\n throw new Error(\"invalid type name: \" + name);\n return \"type.googleapis.com/\" + name;\n }\n typeUrlToName(url: string): string {\n if (!url.length)\n throw new Error(\"invalid type url: \" + url);\n let slash = url.lastIndexOf(\"/\");\n let name = slash > 0 ? url.substring(slash + 1) : url;\n if (!name.length)\n throw new Error(\"invalid type url: \" + url);\n return name;\n }\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Any\n */\nexport const Any = new Any$Type();\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCA,qBAA6B;AAC7B,IAAAA,kBAAgC;AAEhC,IAAAA,kBAAiC;AAKjC,IAAAA,kBAA4B;AAsI5B,MAAM,iBAAiB,4BAAiB;AAAA,EACpC,cAAc;AACV,UAAM,uBAAuB;AAAA,MACzB;AAAA,QAAE,IAAI;AAAA,QAAG,MAAM;AAAA,QAAY,MAAM;AAAA,QAAU,GAAG;AAAA;AAAA,MAAwB;AAAA,MACtE;AAAA,QAAE,IAAI;AAAA,QAAG,MAAM;AAAA,QAAS,MAAM;AAAA,QAAU,GAAG;AAAA;AAAA,MAAwB;AAAA,IACvE,CAAC;AAAA,EACL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,KAAuB,SAAY,MAA4B;AAC3D,WAAO;AAAA,MACH,SAAS,KAAK,cAAc,KAAK,QAAQ;AAAA,MAAG,OAAO,KAAK,SAAS,OAAO;AAAA,IAC5E;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA,EAIA,OAAyB,KAAU,MAAuB,SAAyC;AAC/F,QAAI,CAAC,KAAK,SAAS,KAAK,IAAI;AAC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,QAAI,OAAO,SAAS,cAAc,KAAK,OAAK,EAAE,YAAY,QAAQ;AAClE,QAAI,CAAC;AACD,YAAM,IAAI,WAAW,MAAM,uEAAuE,WAAW,yCAAyC;AAC1J,QAAI;AACJ,QAAI,SAAS,WAAW,kBAAkB,KAAK,KAAK,eAAe,OAAO;AACtE,cAAQ,KAAK,SAAS,KAAK,OAAO,GAAG,OAAO;AAAA,SAC3C;AACD,UAAI,OAAO,OAAO,OAAO,CAAC,GAAG,IAAI;AACjC,aAAO,KAAK,OAAO;AACnB,cAAQ,KAAK,SAAS,MAAM,OAAO;AAAA,IACvC;AACA,QAAI,WAAW;AACX,eAAS,KAAK,OAAO;AACzB,WAAO,UAAU,KAAK,OAAO;AAC7B,WAAO,QAAQ,KAAK,SAAS,KAAK;AAClC,WAAO;AAAA,EACX;AAAA,EACA,cAAc,MAAsB;AAChC,QAAI,CAAC,KAAK;AACN,YAAM,IAAI,MAAM,wBAAwB,IAAI;AAChD,WAAO,yBAAyB;AAAA,EACpC;AAAA,EACA,cAAc,KAAqB;AAC/B,QAAI,CAAC,IAAI;AACL,YAAM,IAAI,MAAM,uBAAuB,GAAG;AAC9C,QAAI,QAAQ,IAAI,YAAY,GAAG;AAC/B,QAAI,OAAO,QAAQ,IAAI,IAAI,UAAU,QAAQ,CAAC,IAAI;AAClD,QAAI,CAAC,KAAK;AACN,YAAM,IAAI,MAAM,uBAAuB,GAAG;AAC9C,WAAO;AAAA,EACX;AACJ;AAIO,MAAM,MAAM,IAAI,SAAS;",
|
|
6
6
|
"names": ["import_runtime"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { JsonValue } from
|
|
2
|
-
import type { JsonReadOptions } from
|
|
3
|
-
import type { JsonWriteOptions } from
|
|
4
|
-
import { MessageType } from
|
|
1
|
+
import type { JsonValue } from "@protobuf-ts/runtime";
|
|
2
|
+
import type { JsonReadOptions } from "@protobuf-ts/runtime";
|
|
3
|
+
import type { JsonWriteOptions } from "@protobuf-ts/runtime";
|
|
4
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
5
5
|
/**
|
|
6
6
|
* A Duration represents a signed, fixed-length span of time represented
|
|
7
7
|
* as a count of seconds and fractions of seconds at nanosecond
|