wowok 2.1.40 → 2.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/bcs/bcs.js +1 -253
- package/dist/cjs/bcs/effects.js +1 -199
- package/dist/cjs/bcs/index.js +1 -51
- package/dist/cjs/bcs/pure.js +1 -36
- package/dist/cjs/bcs/type-tag-serializer.js +1 -104
- package/dist/cjs/bcs/types.js +1 -3
- package/dist/cjs/client/index.js +1 -4
- package/dist/cjs/client/network.js +1 -15
- package/dist/cjs/cryptography/index.js +1 -6
- package/dist/cjs/cryptography/intent.js +1 -14
- package/dist/cjs/cryptography/keypair.js +1 -74
- package/dist/cjs/cryptography/mnemonics.js +1 -20
- package/dist/cjs/cryptography/publickey.js +1 -80
- package/dist/cjs/cryptography/signature-scheme.js +1 -22
- package/dist/cjs/cryptography/signature.js +1 -41
- package/dist/cjs/experimental/cache.js +1 -58
- package/dist/cjs/experimental/client.js +1 -19
- package/dist/cjs/experimental/core.js +1 -80
- package/dist/cjs/experimental/errors.js +1 -24
- package/dist/cjs/experimental/index.js +1 -5
- package/dist/cjs/experimental/persistent-storage.js +1 -220
- package/dist/cjs/experimental/persistent-storage.test.js +1 -144
- package/dist/cjs/experimental/transports/utils.js +1 -96
- package/dist/cjs/experimental/types.js +1 -1
- package/dist/cjs/faucet/faucet.js +1 -99
- package/dist/cjs/faucet/index.js +1 -1
- package/dist/cjs/grpc/client.js +1 -42
- package/dist/cjs/grpc/core.js +1 -587
- package/dist/cjs/grpc/index.js +1 -2
- package/dist/cjs/grpc/proto/google/protobuf/any.js +1 -106
- package/dist/cjs/grpc/proto/google/protobuf/duration.js +1 -58
- package/dist/cjs/grpc/proto/google/protobuf/empty.js +1 -7
- package/dist/cjs/grpc/proto/google/protobuf/field_mask.js +1 -47
- package/dist/cjs/grpc/proto/google/protobuf/struct.js +1 -191
- package/dist/cjs/grpc/proto/google/protobuf/timestamp.js +1 -91
- package/dist/cjs/grpc/proto/google/rpc/error_details.js +1 -265
- package/dist/cjs/grpc/proto/google/rpc/status.js +1 -23
- package/dist/cjs/grpc/proto/sui/rpc/v2/argument.js +1 -46
- package/dist/cjs/grpc/proto/sui/rpc/v2/balance_change.js +1 -29
- package/dist/cjs/grpc/proto/sui/rpc/v2/bcs.js +1 -22
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint.js +1 -54
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_contents.js +1 -60
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_summary.js +1 -144
- package/dist/cjs/grpc/proto/sui/rpc/v2/effects.js +1 -271
- package/dist/cjs/grpc/proto/sui/rpc/v2/epoch.js +1 -64
- package/dist/cjs/grpc/proto/sui/rpc/v2/error_reason.js +1 -6
- package/dist/cjs/grpc/proto/sui/rpc/v2/event.js +1 -62
- package/dist/cjs/grpc/proto/sui/rpc/v2/executed_transaction.js +1 -64
- package/dist/cjs/grpc/proto/sui/rpc/v2/execution_status.js +1 -481
- package/dist/cjs/grpc/proto/sui/rpc/v2/gas_cost_summary.js +1 -40
- package/dist/cjs/grpc/proto/sui/rpc/v2/input.js +1 -61
- package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.js +1 -57
- package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.client.js +1 -39
- package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.js +1 -329
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package.js +1 -447
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.client.js +1 -27
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.js +1 -206
- package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.client.js +1 -19
- package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.js +1 -109
- package/dist/cjs/grpc/proto/sui/rpc/v2/object.js +1 -90
- package/dist/cjs/grpc/proto/sui/rpc/v2/object_reference.js +1 -30
- package/dist/cjs/grpc/proto/sui/rpc/v2/owner.js +1 -39
- package/dist/cjs/grpc/proto/sui/rpc/v2/protocol_config.js +1 -30
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature.js +1 -501
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_scheme.js +1 -10
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.client.js +1 -15
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.js +1 -62
- package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.js +1 -31
- package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.js +1 -504
- package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.client.js +1 -15
- package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.js +1 -37
- package/dist/cjs/grpc/proto/sui/rpc/v2/system_state.js +1 -709
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction.js +1 -950
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js +1 -19
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.js +1 -144
- package/dist/cjs/index.js +1 -22
- package/dist/cjs/jsonRpc/client.js +1 -516
- package/dist/cjs/jsonRpc/core.js +1 -587
- package/dist/cjs/jsonRpc/errors.js +1 -38
- package/dist/cjs/jsonRpc/http-transport.js +1 -70
- package/dist/cjs/jsonRpc/index.js +1 -3
- package/dist/cjs/jsonRpc/json-rpc-resolver.js +1 -296
- package/dist/cjs/jsonRpc/rpc-websocket-client.js +1 -155
- package/dist/cjs/jsonRpc/types/chain.js +1 -1
- package/dist/cjs/jsonRpc/types/changes.js +1 -1
- package/dist/cjs/jsonRpc/types/coins.js +1 -1
- package/dist/cjs/jsonRpc/types/common.js +1 -1
- package/dist/cjs/jsonRpc/types/generated.js +1 -1
- package/dist/cjs/jsonRpc/types/index.js +1 -1
- package/dist/cjs/jsonRpc/types/params.js +1 -1
- package/dist/cjs/keypairs/ed25519/ed25519-hd-key.js +1 -58
- package/dist/cjs/keypairs/ed25519/index.js +1 -2
- package/dist/cjs/keypairs/ed25519/keypair.js +1 -90
- package/dist/cjs/keypairs/ed25519/publickey.js +1 -50
- package/dist/cjs/keypairs/index.js +1 -4
- package/dist/cjs/keypairs/passkey/index.js +1 -2
- package/dist/cjs/keypairs/passkey/keypair.js +1 -155
- package/dist/cjs/keypairs/passkey/publickey.js +1 -117
- package/dist/cjs/keypairs/passkey/types.js +1 -1
- package/dist/cjs/keypairs/secp256k1/index.js +1 -2
- package/dist/cjs/keypairs/secp256k1/keypair.js +1 -82
- package/dist/cjs/keypairs/secp256k1/publickey.js +1 -51
- package/dist/cjs/keypairs/secp256r1/index.js +1 -2
- package/dist/cjs/keypairs/secp256r1/keypair.js +1 -78
- package/dist/cjs/keypairs/secp256r1/publickey.js +1 -52
- package/dist/cjs/multisig/index.js +1 -2
- package/dist/cjs/multisig/publickey.js +1 -201
- package/dist/cjs/multisig/signer.js +1 -58
- package/dist/cjs/transactions/Arguments.js +1 -9
- package/dist/cjs/transactions/Commands.js +1 -102
- package/dist/cjs/transactions/Inputs.js +1 -52
- package/dist/cjs/transactions/ObjectCache.js +1 -205
- package/dist/cjs/transactions/Transaction.js +1 -574
- package/dist/cjs/transactions/TransactionData.js +1 -409
- package/dist/cjs/transactions/__tests__/Transaction.test.js +1 -160
- package/dist/cjs/transactions/__tests__/bcs.test.js +1 -182
- package/dist/cjs/transactions/data/internal.js +1 -169
- package/dist/cjs/transactions/data/v1.js +1 -469
- package/dist/cjs/transactions/data/v2.js +1 -97
- package/dist/cjs/transactions/executor/caching.js +1 -65
- package/dist/cjs/transactions/executor/parallel.js +1 -347
- package/dist/cjs/transactions/executor/queue.js +1 -59
- package/dist/cjs/transactions/executor/serial.js +1 -99
- package/dist/cjs/transactions/hash.js +1 -8
- package/dist/cjs/transactions/index.js +1 -12
- package/dist/cjs/transactions/intents/CoinWithBalance.js +1 -145
- package/dist/cjs/transactions/object.js +1 -87
- package/dist/cjs/transactions/plugins/NamedPackagesPlugin.js +1 -11
- package/dist/cjs/transactions/pure.js +1 -36
- package/dist/cjs/transactions/resolve.js +1 -69
- package/dist/cjs/transactions/serializer.js +1 -167
- package/dist/cjs/transactions/utils.js +1 -121
- package/dist/cjs/utils/constants.js +1 -18
- package/dist/cjs/utils/derived-objects.js +1 -8
- package/dist/cjs/utils/dynamic-fields.js +1 -17
- package/dist/cjs/utils/format.js +1 -11
- package/dist/cjs/utils/index.js +1 -8
- package/dist/cjs/utils/move-registry.js +1 -24
- package/dist/cjs/utils/sui-types.js +1 -66
- package/dist/cjs/utils/suins.js +1 -33
- package/dist/cjs/verify/index.js +1 -1
- package/dist/cjs/verify/verify.js +1 -87
- package/dist/cjs/version.js +1 -2
- package/dist/cjs/w/call/allocation.js +1 -345
- package/dist/cjs/w/call/arb.js +1 -103
- package/dist/cjs/w/call/arbitration.js +1 -1192
- package/dist/cjs/w/call/base.js +1 -293
- package/dist/cjs/w/call/contact.js +1 -345
- package/dist/cjs/w/call/demand.js +1 -681
- package/dist/cjs/w/call/entity.js +1 -173
- package/dist/cjs/w/call/guard-ins.js +1 -4449
- package/dist/cjs/w/call/guard.d.ts +111 -0
- package/dist/cjs/w/call/guard.js +1 -1048
- package/dist/cjs/w/call/index.js +1 -22
- package/dist/cjs/w/call/machine.js +1 -1127
- package/dist/cjs/w/call/order.js +1 -337
- package/dist/cjs/w/call/passport.js +1 -220
- package/dist/cjs/w/call/payment.js +1 -178
- package/dist/cjs/w/call/permission.js +1 -1162
- package/dist/cjs/w/call/personal.js +1 -139
- package/dist/cjs/w/call/progress.js +1 -678
- package/dist/cjs/w/call/proof.js +1 -66
- package/dist/cjs/w/call/repository.js +1 -1024
- package/dist/cjs/w/call/resource.js +1 -108
- package/dist/cjs/w/call/reward.js +1 -675
- package/dist/cjs/w/call/service.js +1 -1960
- package/dist/cjs/w/call/treasury.js +1 -873
- package/dist/cjs/w/call/util.d.ts +1 -0
- package/dist/cjs/w/call/util.js +1 -566
- package/dist/cjs/w/common.js +1 -571
- package/dist/cjs/w/exception.js +1 -618
- package/dist/cjs/w/index.js +1 -8
- package/dist/cjs/w/local/account.js +1 -656
- package/dist/cjs/w/local/cache.js +1 -161
- package/dist/cjs/w/local/config.js +1 -43
- package/dist/cjs/w/local/index.js +1 -228
- package/dist/cjs/w/local/local.js +1 -574
- package/dist/cjs/w/local/storage.js +1 -185
- package/dist/cjs/w/local/token.js +1 -131
- package/dist/cjs/w/local/util.js +1 -26
- package/dist/cjs/w/local/wip.js +1 -864
- package/dist/cjs/w/messenger/crypto.js +1 -380
- package/dist/cjs/w/messenger/index.js +1 -4
- package/dist/cjs/w/messenger/messenger-api.js +1 -1154
- package/dist/cjs/w/messenger/messenger-manager.js +1 -1003
- package/dist/cjs/w/messenger/messenger.js +1 -1093
- package/dist/cjs/w/messenger/server.js +1 -343
- package/dist/cjs/w/messenger/session.js +1 -628
- package/dist/cjs/w/messenger/storage.js +1 -1023
- package/dist/cjs/w/messenger/templates/wts-html-template.js +1 -371
- package/dist/cjs/w/messenger/types.js +1 -76
- package/dist/cjs/w/messenger/utils.js +1 -12
- package/dist/cjs/w/query/bult-in.js +1 -95
- package/dist/cjs/w/query/event.js +1 -137
- package/dist/cjs/w/query/index.js +1 -5
- package/dist/cjs/w/query/object.js +1 -1550
- package/dist/cjs/w/query/received.js +1 -62
- package/dist/cjs/w/query/util.js +1 -49
- package/dist/cjs/w/util.js +1 -587
- package/dist/esm/bcs/bcs.js +1 -253
- package/dist/esm/bcs/effects.js +1 -199
- package/dist/esm/bcs/index.js +1 -51
- package/dist/esm/bcs/pure.js +1 -36
- package/dist/esm/bcs/type-tag-serializer.js +1 -104
- package/dist/esm/bcs/types.js +1 -3
- package/dist/esm/client/index.js +1 -4
- package/dist/esm/client/network.js +1 -15
- package/dist/esm/cryptography/index.js +1 -6
- package/dist/esm/cryptography/intent.js +1 -14
- package/dist/esm/cryptography/keypair.js +1 -74
- package/dist/esm/cryptography/mnemonics.js +1 -20
- package/dist/esm/cryptography/publickey.js +1 -80
- package/dist/esm/cryptography/signature-scheme.js +1 -22
- package/dist/esm/cryptography/signature.js +1 -41
- package/dist/esm/experimental/cache.js +1 -58
- package/dist/esm/experimental/client.js +1 -19
- package/dist/esm/experimental/core.js +1 -80
- package/dist/esm/experimental/errors.js +1 -24
- package/dist/esm/experimental/index.js +1 -5
- package/dist/esm/experimental/persistent-storage.js +1 -220
- package/dist/esm/experimental/persistent-storage.test.js +1 -144
- package/dist/esm/experimental/transports/utils.js +1 -96
- package/dist/esm/experimental/types.js +1 -1
- package/dist/esm/faucet/faucet.js +1 -99
- package/dist/esm/faucet/index.js +1 -1
- package/dist/esm/grpc/client.js +1 -42
- package/dist/esm/grpc/core.js +1 -587
- package/dist/esm/grpc/index.js +1 -2
- package/dist/esm/grpc/proto/google/protobuf/any.js +1 -106
- package/dist/esm/grpc/proto/google/protobuf/duration.js +1 -58
- package/dist/esm/grpc/proto/google/protobuf/empty.js +1 -7
- package/dist/esm/grpc/proto/google/protobuf/field_mask.js +1 -47
- package/dist/esm/grpc/proto/google/protobuf/struct.js +1 -191
- package/dist/esm/grpc/proto/google/protobuf/timestamp.js +1 -91
- package/dist/esm/grpc/proto/google/rpc/error_details.js +1 -265
- package/dist/esm/grpc/proto/google/rpc/status.js +1 -23
- package/dist/esm/grpc/proto/sui/rpc/v2/argument.js +1 -46
- package/dist/esm/grpc/proto/sui/rpc/v2/balance_change.js +1 -29
- package/dist/esm/grpc/proto/sui/rpc/v2/bcs.js +1 -22
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint.js +1 -54
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_contents.js +1 -60
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_summary.js +1 -144
- package/dist/esm/grpc/proto/sui/rpc/v2/effects.js +1 -271
- package/dist/esm/grpc/proto/sui/rpc/v2/epoch.js +1 -64
- package/dist/esm/grpc/proto/sui/rpc/v2/error_reason.js +1 -6
- package/dist/esm/grpc/proto/sui/rpc/v2/event.js +1 -62
- package/dist/esm/grpc/proto/sui/rpc/v2/executed_transaction.js +1 -64
- package/dist/esm/grpc/proto/sui/rpc/v2/execution_status.js +1 -481
- package/dist/esm/grpc/proto/sui/rpc/v2/gas_cost_summary.js +1 -40
- package/dist/esm/grpc/proto/sui/rpc/v2/input.js +1 -61
- package/dist/esm/grpc/proto/sui/rpc/v2/jwk.js +1 -57
- package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.js +1 -39
- package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.js +1 -329
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package.js +1 -447
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.client.js +1 -27
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.js +1 -206
- package/dist/esm/grpc/proto/sui/rpc/v2/name_service.client.js +1 -19
- package/dist/esm/grpc/proto/sui/rpc/v2/name_service.js +1 -109
- package/dist/esm/grpc/proto/sui/rpc/v2/object.js +1 -90
- package/dist/esm/grpc/proto/sui/rpc/v2/object_reference.js +1 -30
- package/dist/esm/grpc/proto/sui/rpc/v2/owner.js +1 -39
- package/dist/esm/grpc/proto/sui/rpc/v2/protocol_config.js +1 -30
- package/dist/esm/grpc/proto/sui/rpc/v2/signature.js +1 -501
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_scheme.js +1 -10
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.client.js +1 -15
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.js +1 -62
- package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.js +1 -31
- package/dist/esm/grpc/proto/sui/rpc/v2/state_service.js +1 -504
- package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.client.js +1 -15
- package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.js +1 -37
- package/dist/esm/grpc/proto/sui/rpc/v2/system_state.js +1 -709
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction.js +1 -950
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js +1 -19
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.js +1 -144
- package/dist/esm/index.js +1 -22
- package/dist/esm/jsonRpc/client.js +1 -516
- package/dist/esm/jsonRpc/core.js +1 -587
- package/dist/esm/jsonRpc/errors.js +1 -38
- package/dist/esm/jsonRpc/http-transport.js +1 -70
- package/dist/esm/jsonRpc/index.js +1 -3
- package/dist/esm/jsonRpc/json-rpc-resolver.js +1 -296
- package/dist/esm/jsonRpc/rpc-websocket-client.js +1 -155
- package/dist/esm/jsonRpc/types/chain.js +1 -1
- package/dist/esm/jsonRpc/types/changes.js +1 -1
- package/dist/esm/jsonRpc/types/coins.js +1 -1
- package/dist/esm/jsonRpc/types/common.js +1 -1
- package/dist/esm/jsonRpc/types/generated.js +1 -1
- package/dist/esm/jsonRpc/types/index.js +1 -1
- package/dist/esm/jsonRpc/types/params.js +1 -1
- package/dist/esm/keypairs/ed25519/ed25519-hd-key.js +1 -58
- package/dist/esm/keypairs/ed25519/index.js +1 -2
- package/dist/esm/keypairs/ed25519/keypair.js +1 -90
- package/dist/esm/keypairs/ed25519/publickey.js +1 -50
- package/dist/esm/keypairs/index.js +1 -4
- package/dist/esm/keypairs/passkey/index.js +1 -2
- package/dist/esm/keypairs/passkey/keypair.js +1 -155
- package/dist/esm/keypairs/passkey/publickey.js +1 -117
- package/dist/esm/keypairs/passkey/types.js +1 -1
- package/dist/esm/keypairs/secp256k1/index.js +1 -2
- package/dist/esm/keypairs/secp256k1/keypair.js +1 -82
- package/dist/esm/keypairs/secp256k1/publickey.js +1 -51
- package/dist/esm/keypairs/secp256r1/index.js +1 -2
- package/dist/esm/keypairs/secp256r1/keypair.js +1 -78
- package/dist/esm/keypairs/secp256r1/publickey.js +1 -52
- package/dist/esm/multisig/index.js +1 -2
- package/dist/esm/multisig/publickey.js +1 -201
- package/dist/esm/multisig/signer.js +1 -58
- package/dist/esm/transactions/Arguments.js +1 -9
- package/dist/esm/transactions/Commands.js +1 -102
- package/dist/esm/transactions/Inputs.js +1 -52
- package/dist/esm/transactions/ObjectCache.js +1 -205
- package/dist/esm/transactions/Transaction.js +1 -574
- package/dist/esm/transactions/TransactionData.js +1 -409
- package/dist/esm/transactions/__tests__/Transaction.test.js +1 -160
- package/dist/esm/transactions/__tests__/bcs.test.js +1 -182
- package/dist/esm/transactions/data/internal.js +1 -169
- package/dist/esm/transactions/data/v1.js +1 -469
- package/dist/esm/transactions/data/v2.js +1 -97
- package/dist/esm/transactions/executor/caching.js +1 -65
- package/dist/esm/transactions/executor/parallel.js +1 -347
- package/dist/esm/transactions/executor/queue.js +1 -59
- package/dist/esm/transactions/executor/serial.js +1 -99
- package/dist/esm/transactions/hash.js +1 -8
- package/dist/esm/transactions/index.js +1 -12
- package/dist/esm/transactions/intents/CoinWithBalance.js +1 -145
- package/dist/esm/transactions/object.js +1 -87
- package/dist/esm/transactions/plugins/NamedPackagesPlugin.js +1 -11
- package/dist/esm/transactions/pure.js +1 -36
- package/dist/esm/transactions/resolve.js +1 -69
- package/dist/esm/transactions/serializer.js +1 -167
- package/dist/esm/transactions/utils.js +1 -121
- package/dist/esm/utils/constants.js +1 -18
- package/dist/esm/utils/derived-objects.js +1 -8
- package/dist/esm/utils/dynamic-fields.js +1 -17
- package/dist/esm/utils/format.js +1 -11
- package/dist/esm/utils/index.js +1 -8
- package/dist/esm/utils/move-registry.js +1 -24
- package/dist/esm/utils/sui-types.js +1 -66
- package/dist/esm/utils/suins.js +1 -33
- package/dist/esm/verify/index.js +1 -1
- package/dist/esm/verify/verify.js +1 -87
- package/dist/esm/version.js +1 -2
- package/dist/esm/w/call/allocation.js +1 -345
- package/dist/esm/w/call/arb.js +1 -103
- package/dist/esm/w/call/arbitration.js +1 -1192
- package/dist/esm/w/call/base.js +1 -293
- package/dist/esm/w/call/contact.js +1 -345
- package/dist/esm/w/call/demand.js +1 -681
- package/dist/esm/w/call/entity.js +1 -173
- package/dist/esm/w/call/guard-ins.js +1 -4449
- package/dist/esm/w/call/guard.d.ts +111 -0
- package/dist/esm/w/call/guard.js +1 -1048
- package/dist/esm/w/call/index.js +1 -22
- package/dist/esm/w/call/machine.js +1 -1127
- package/dist/esm/w/call/order.js +1 -337
- package/dist/esm/w/call/passport.js +1 -220
- package/dist/esm/w/call/payment.js +1 -178
- package/dist/esm/w/call/permission.js +1 -1162
- package/dist/esm/w/call/personal.js +1 -139
- package/dist/esm/w/call/progress.js +1 -678
- package/dist/esm/w/call/proof.js +1 -66
- package/dist/esm/w/call/repository.js +1 -1024
- package/dist/esm/w/call/resource.js +1 -108
- package/dist/esm/w/call/reward.js +1 -675
- package/dist/esm/w/call/service.js +1 -1960
- package/dist/esm/w/call/treasury.js +1 -873
- package/dist/esm/w/call/util.d.ts +1 -0
- package/dist/esm/w/call/util.js +1 -566
- package/dist/esm/w/common.js +1 -571
- package/dist/esm/w/exception.js +1 -618
- package/dist/esm/w/index.js +1 -8
- package/dist/esm/w/local/account.js +1 -656
- package/dist/esm/w/local/cache.js +1 -161
- package/dist/esm/w/local/config.js +1 -43
- package/dist/esm/w/local/index.js +1 -228
- package/dist/esm/w/local/local.js +1 -574
- package/dist/esm/w/local/storage.js +1 -185
- package/dist/esm/w/local/token.js +1 -131
- package/dist/esm/w/local/util.js +1 -26
- package/dist/esm/w/local/wip.js +1 -864
- package/dist/esm/w/messenger/crypto.js +1 -380
- package/dist/esm/w/messenger/index.js +1 -4
- package/dist/esm/w/messenger/messenger-api.js +1 -1154
- package/dist/esm/w/messenger/messenger-manager.js +1 -1003
- package/dist/esm/w/messenger/messenger.js +1 -1093
- package/dist/esm/w/messenger/server.js +1 -343
- package/dist/esm/w/messenger/session.js +1 -628
- package/dist/esm/w/messenger/storage.js +1 -1023
- package/dist/esm/w/messenger/templates/wts-html-template.js +1 -371
- package/dist/esm/w/messenger/types.js +1 -76
- package/dist/esm/w/messenger/utils.js +1 -12
- package/dist/esm/w/query/bult-in.js +1 -95
- package/dist/esm/w/query/event.js +1 -137
- package/dist/esm/w/query/index.js +1 -5
- package/dist/esm/w/query/object.js +1 -1550
- package/dist/esm/w/query/received.js +1 -62
- package/dist/esm/w/query/util.js +1 -49
- package/dist/esm/w/util.js +1 -587
- package/package.json +5 -2
|
@@ -1,106 +1 @@
|
|
|
1
|
-
import { isJsonObject }
|
|
2
|
-
import { typeofJsonValue } from "@protobuf-ts/runtime";
|
|
3
|
-
import { jsonWriteOptions } from "@protobuf-ts/runtime";
|
|
4
|
-
import { MessageType } from "@protobuf-ts/runtime";
|
|
5
|
-
class Any$Type extends MessageType {
|
|
6
|
-
constructor() {
|
|
7
|
-
super("google.protobuf.Any", [
|
|
8
|
-
{
|
|
9
|
-
no: 1,
|
|
10
|
-
name: "type_url",
|
|
11
|
-
kind: "scalar",
|
|
12
|
-
T: 9,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
no: 2,
|
|
16
|
-
name: "value",
|
|
17
|
-
kind: "scalar",
|
|
18
|
-
T: 12,
|
|
19
|
-
},
|
|
20
|
-
]);
|
|
21
|
-
}
|
|
22
|
-
pack(message, type) {
|
|
23
|
-
return {
|
|
24
|
-
typeUrl: this.typeNameToUrl(type.typeName),
|
|
25
|
-
value: type.toBinary(message),
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
unpack(any, type, options) {
|
|
29
|
-
if (!this.contains(any, type))
|
|
30
|
-
throw new Error("Cannot unpack google.protobuf.Any with typeUrl '" +
|
|
31
|
-
any.typeUrl +
|
|
32
|
-
"' as " +
|
|
33
|
-
type.typeName +
|
|
34
|
-
".");
|
|
35
|
-
return type.fromBinary(any.value, options);
|
|
36
|
-
}
|
|
37
|
-
contains(any, type) {
|
|
38
|
-
if (!any.typeUrl.length)
|
|
39
|
-
return false;
|
|
40
|
-
let wants = typeof type == "string" ? type : type.typeName;
|
|
41
|
-
let has = this.typeUrlToName(any.typeUrl);
|
|
42
|
-
return wants === has;
|
|
43
|
-
}
|
|
44
|
-
internalJsonWrite(any, options) {
|
|
45
|
-
if (any.typeUrl === "")
|
|
46
|
-
return {};
|
|
47
|
-
let typeName = this.typeUrlToName(any.typeUrl);
|
|
48
|
-
let opt = jsonWriteOptions(options);
|
|
49
|
-
let type = opt.typeRegistry?.find((t) => t.typeName === typeName);
|
|
50
|
-
if (!type)
|
|
51
|
-
throw new globalThis.Error("Unable to convert google.protobuf.Any with typeUrl '" +
|
|
52
|
-
any.typeUrl +
|
|
53
|
-
"' to JSON. The specified type " +
|
|
54
|
-
typeName +
|
|
55
|
-
" is not available in the type registry.");
|
|
56
|
-
let value = type.fromBinary(any.value, { readUnknownField: false });
|
|
57
|
-
let json = type.internalJsonWrite(value, opt);
|
|
58
|
-
if (typeName.startsWith("google.protobuf.") || !isJsonObject(json))
|
|
59
|
-
json = { value: json };
|
|
60
|
-
json["@type"] = any.typeUrl;
|
|
61
|
-
return json;
|
|
62
|
-
}
|
|
63
|
-
internalJsonRead(json, options, target) {
|
|
64
|
-
if (!isJsonObject(json))
|
|
65
|
-
throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON " +
|
|
66
|
-
typeofJsonValue(json) +
|
|
67
|
-
".");
|
|
68
|
-
if (typeof json["@type"] != "string" || json["@type"] == "")
|
|
69
|
-
return this.create();
|
|
70
|
-
let typeName = this.typeUrlToName(json["@type"]);
|
|
71
|
-
let type = options?.typeRegistry?.find((t) => t.typeName == typeName);
|
|
72
|
-
if (!type)
|
|
73
|
-
throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON. The specified type " +
|
|
74
|
-
typeName +
|
|
75
|
-
" is not available in the type registry.");
|
|
76
|
-
let value;
|
|
77
|
-
if (typeName.startsWith("google.protobuf.") &&
|
|
78
|
-
json.hasOwnProperty("value"))
|
|
79
|
-
value = type.fromJson(json["value"], options);
|
|
80
|
-
else {
|
|
81
|
-
let copy = Object.assign({}, json);
|
|
82
|
-
delete copy["@type"];
|
|
83
|
-
value = type.fromJson(copy, options);
|
|
84
|
-
}
|
|
85
|
-
if (target === undefined)
|
|
86
|
-
target = this.create();
|
|
87
|
-
target.typeUrl = json["@type"];
|
|
88
|
-
target.value = type.toBinary(value);
|
|
89
|
-
return target;
|
|
90
|
-
}
|
|
91
|
-
typeNameToUrl(name) {
|
|
92
|
-
if (!name.length)
|
|
93
|
-
throw new Error("invalid type name: " + name);
|
|
94
|
-
return "type.googleapis.com/" + name;
|
|
95
|
-
}
|
|
96
|
-
typeUrlToName(url) {
|
|
97
|
-
if (!url.length)
|
|
98
|
-
throw new Error("invalid type url: " + url);
|
|
99
|
-
let slash = url.lastIndexOf("/");
|
|
100
|
-
let name = slash > 0 ? url.substring(slash + 1) : url;
|
|
101
|
-
if (!name.length)
|
|
102
|
-
throw new Error("invalid type url: " + url);
|
|
103
|
-
return name;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
export const Any = new Any$Type();
|
|
1
|
+
import{isJsonObject}from'@protobuf-ts/runtime';import{typeofJsonValue}from'@protobuf-ts/runtime';import{jsonWriteOptions}from'@protobuf-ts/runtime';import{MessageType}from'@protobuf-ts/runtime';class Any$Type extends MessageType{constructor(){super('google.protobuf.Any',[{'no':0x1,'name':'type_url','kind':'scalar','T':0x9},{'no':0x2,'name':'value','kind':'scalar','T':0xc}]);}['pack'](a,b){return{'typeUrl':this['typeNameToUrl'](b['typeName']),'value':b['toBinary'](a)};}['unpack'](a,b,c){if(!this['contains'](a,b))throw new Error('Cannot\x20unpack\x20google.protobuf.Any\x20with\x20typeUrl\x20\x27'+a['typeUrl']+'\x27\x20as\x20'+b['typeName']+'.');return b['fromBinary'](a['value'],c);}['contains'](a,b){if(!a['typeUrl']['length'])return![];let c=typeof b=='string'?b:b['typeName'],d=this['typeUrlToName'](a['typeUrl']);return c===d;}['internalJsonWrite'](a,b){if(a['typeUrl']==='')return{};let c=this['typeUrlToName'](a['typeUrl']),d=jsonWriteOptions(b),e=d['typeRegistry']?.['find'](h=>h['typeName']===c);if(!e)throw new globalThis['Error']('Unable\x20to\x20convert\x20google.protobuf.Any\x20with\x20typeUrl\x20\x27'+a['typeUrl']+'\x27\x20to\x20JSON.\x20The\x20specified\x20type\x20'+c+'\x20is\x20not\x20available\x20in\x20the\x20type\x20registry.');let f=e['fromBinary'](a['value'],{'readUnknownField':![]}),g=e['internalJsonWrite'](f,d);if(c['startsWith']('google.protobuf.')||!isJsonObject(g))g={'value':g};return g['@type']=a['typeUrl'],g;}['internalJsonRead'](a,b,c){if(!isJsonObject(a))throw new globalThis['Error']('Unable\x20to\x20parse\x20google.protobuf.Any\x20from\x20JSON\x20'+typeofJsonValue(a)+'.');if(typeof a['@type']!='string'||a['@type']=='')return this['create']();let d=this['typeUrlToName'](a['@type']),e=b?.['typeRegistry']?.['find'](g=>g['typeName']==d);if(!e)throw new globalThis['Error']('Unable\x20to\x20parse\x20google.protobuf.Any\x20from\x20JSON.\x20The\x20specified\x20type\x20'+d+'\x20is\x20not\x20available\x20in\x20the\x20type\x20registry.');let f;if(d['startsWith']('google.protobuf.')&&a['hasOwnProperty']('value'))f=e['fromJson'](a['value'],b);else{let g=Object['assign']({},a);delete g['@type'],f=e['fromJson'](g,b);}if(c===undefined)c=this['create']();return c['typeUrl']=a['@type'],c['value']=e['toBinary'](f),c;}['typeNameToUrl'](a){if(!a['length'])throw new Error('invalid\x20type\x20name:\x20'+a);return'type.googleapis.com/'+a;}['typeUrlToName'](a){if(!a['length'])throw new Error('invalid\x20type\x20url:\x20'+a);let b=a['lastIndexOf']('/'),c=b>0x0?a['substring'](b+0x1):a;if(!c['length'])throw new Error('invalid\x20type\x20url:\x20'+a);return c;}}export const Any=new Any$Type();
|
|
@@ -1,58 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { PbLong } from "@protobuf-ts/runtime";
|
|
3
|
-
import { MessageType } from "@protobuf-ts/runtime";
|
|
4
|
-
class Duration$Type extends MessageType {
|
|
5
|
-
constructor() {
|
|
6
|
-
super("google.protobuf.Duration", [
|
|
7
|
-
{
|
|
8
|
-
no: 1,
|
|
9
|
-
name: "seconds",
|
|
10
|
-
kind: "scalar",
|
|
11
|
-
T: 3,
|
|
12
|
-
L: 0,
|
|
13
|
-
},
|
|
14
|
-
{ no: 2, name: "nanos", kind: "scalar", T: 5 },
|
|
15
|
-
]);
|
|
16
|
-
}
|
|
17
|
-
internalJsonWrite(message, options) {
|
|
18
|
-
let s = PbLong.from(message.seconds).toNumber();
|
|
19
|
-
if (s > 315576000000 || s < -315576000000)
|
|
20
|
-
throw new Error("Duration value out of range.");
|
|
21
|
-
let text = message.seconds.toString();
|
|
22
|
-
if (s === 0 && message.nanos < 0)
|
|
23
|
-
text = "-" + text;
|
|
24
|
-
if (message.nanos !== 0) {
|
|
25
|
-
let nanosStr = Math.abs(message.nanos).toString();
|
|
26
|
-
nanosStr = "0".repeat(9 - nanosStr.length) + nanosStr;
|
|
27
|
-
if (nanosStr.substring(3) === "000000")
|
|
28
|
-
nanosStr = nanosStr.substring(0, 3);
|
|
29
|
-
else if (nanosStr.substring(6) === "000")
|
|
30
|
-
nanosStr = nanosStr.substring(0, 6);
|
|
31
|
-
text += "." + nanosStr;
|
|
32
|
-
}
|
|
33
|
-
return text + "s";
|
|
34
|
-
}
|
|
35
|
-
internalJsonRead(json, options, target) {
|
|
36
|
-
if (typeof json !== "string")
|
|
37
|
-
throw new Error("Unable to parse Duration from JSON " +
|
|
38
|
-
typeofJsonValue(json) +
|
|
39
|
-
". Expected string.");
|
|
40
|
-
let match = json.match(/^(-?)([0-9]+)(?:\.([0-9]+))?s/);
|
|
41
|
-
if (match === null)
|
|
42
|
-
throw new Error("Unable to parse Duration from JSON string. Invalid format.");
|
|
43
|
-
if (!target)
|
|
44
|
-
target = this.create();
|
|
45
|
-
let [, sign, secs, nanos] = match;
|
|
46
|
-
let longSeconds = PbLong.from(sign + secs);
|
|
47
|
-
if (longSeconds.toNumber() > 315576000000 ||
|
|
48
|
-
longSeconds.toNumber() < -315576000000)
|
|
49
|
-
throw new Error("Unable to parse Duration from JSON string. Value out of range.");
|
|
50
|
-
target.seconds = longSeconds.toBigInt();
|
|
51
|
-
if (typeof nanos == "string") {
|
|
52
|
-
let nanosStr = sign + nanos + "0".repeat(9 - nanos.length);
|
|
53
|
-
target.nanos = parseInt(nanosStr);
|
|
54
|
-
}
|
|
55
|
-
return target;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
export const Duration = new Duration$Type();
|
|
1
|
+
import{typeofJsonValue}from'@protobuf-ts/runtime';import{PbLong}from'@protobuf-ts/runtime';import{MessageType}from'@protobuf-ts/runtime';class Duration$Type extends MessageType{constructor(){super('google.protobuf.Duration',[{'no':0x1,'name':'seconds','kind':'scalar','T':0x3,'L':0x0},{'no':0x2,'name':'nanos','kind':'scalar','T':0x5}]);}['internalJsonWrite'](a,b){let c=PbLong['from'](a['seconds'])['toNumber']();if(c>0x4979cb9e00||c<-0x4979cb9e00)throw new Error('Duration\x20value\x20out\x20of\x20range.');let d=a['seconds']['toString']();if(c===0x0&&a['nanos']<0x0)d='-'+d;if(a['nanos']!==0x0){let e=Math['abs'](a['nanos'])['toString']();e='0'['repeat'](0x9-e['length'])+e;if(e['substring'](0x3)==='000000')e=e['substring'](0x0,0x3);else{if(e['substring'](0x6)==='000')e=e['substring'](0x0,0x6);}d+='.'+e;}return d+'s';}['internalJsonRead'](a,b,c){if(typeof a!=='string')throw new Error('Unable\x20to\x20parse\x20Duration\x20from\x20JSON\x20'+typeofJsonValue(a)+'.\x20Expected\x20string.');let d=a['match'](/^(-?)([0-9]+)(?:\.([0-9]+))?s/);if(d===null)throw new Error('Unable\x20to\x20parse\x20Duration\x20from\x20JSON\x20string.\x20Invalid\x20format.');if(!c)c=this['create']();let [,e,f,g]=d,h=PbLong['from'](e+f);if(h['toNumber']()>0x4979cb9e00||h['toNumber']()<-0x4979cb9e00)throw new Error('Unable\x20to\x20parse\x20Duration\x20from\x20JSON\x20string.\x20Value\x20out\x20of\x20range.');c['seconds']=h['toBigInt']();if(typeof g=='string'){let i=e+g+'0'['repeat'](0x9-g['length']);c['nanos']=parseInt(i);}return c;}}export const Duration=new Duration$Type();
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
class Empty$Type extends MessageType {
|
|
3
|
-
constructor() {
|
|
4
|
-
super("google.protobuf.Empty", []);
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
export const Empty = new Empty$Type();
|
|
1
|
+
import{MessageType}from'@protobuf-ts/runtime';class Empty$Type extends MessageType{constructor(){super('google.protobuf.Empty',[]);}}export const Empty=new Empty$Type();
|
|
@@ -1,47 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { lowerCamelCase } from "@protobuf-ts/runtime";
|
|
3
|
-
import { MessageType } from "@protobuf-ts/runtime";
|
|
4
|
-
class FieldMask$Type extends MessageType {
|
|
5
|
-
constructor() {
|
|
6
|
-
super("google.protobuf.FieldMask", [
|
|
7
|
-
{
|
|
8
|
-
no: 1,
|
|
9
|
-
name: "paths",
|
|
10
|
-
kind: "scalar",
|
|
11
|
-
repeat: 2,
|
|
12
|
-
T: 9,
|
|
13
|
-
},
|
|
14
|
-
]);
|
|
15
|
-
}
|
|
16
|
-
internalJsonWrite(message, options) {
|
|
17
|
-
const invalidFieldMaskJsonRegex = /[A-Z]|(_([.0-9_]|$))/g;
|
|
18
|
-
return message.paths
|
|
19
|
-
.map((p) => {
|
|
20
|
-
if (invalidFieldMaskJsonRegex.test(p))
|
|
21
|
-
throw new Error('Unable to encode FieldMask to JSON. lowerCamelCase of path name "' +
|
|
22
|
-
p +
|
|
23
|
-
'" is irreversible.');
|
|
24
|
-
return lowerCamelCase(p);
|
|
25
|
-
})
|
|
26
|
-
.join(",");
|
|
27
|
-
}
|
|
28
|
-
internalJsonRead(json, options, target) {
|
|
29
|
-
if (typeof json !== "string")
|
|
30
|
-
throw new Error("Unable to parse FieldMask from JSON " +
|
|
31
|
-
typeofJsonValue(json) +
|
|
32
|
-
". Expected string.");
|
|
33
|
-
if (!target)
|
|
34
|
-
target = this.create();
|
|
35
|
-
if (json === "")
|
|
36
|
-
return target;
|
|
37
|
-
let camelToSnake = (str) => {
|
|
38
|
-
if (str.includes("_"))
|
|
39
|
-
throw new Error("Unable to parse FieldMask from JSON. Path names must be lowerCamelCase.");
|
|
40
|
-
let sc = str.replace(/[A-Z]/g, (letter) => "_" + letter.toLowerCase());
|
|
41
|
-
return sc;
|
|
42
|
-
};
|
|
43
|
-
target.paths = json.split(",").map(camelToSnake);
|
|
44
|
-
return target;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
export const FieldMask = new FieldMask$Type();
|
|
1
|
+
import{typeofJsonValue}from'@protobuf-ts/runtime';import{lowerCamelCase}from'@protobuf-ts/runtime';import{MessageType}from'@protobuf-ts/runtime';class FieldMask$Type extends MessageType{constructor(){super('google.protobuf.FieldMask',[{'no':0x1,'name':'paths','kind':'scalar','repeat':0x2,'T':0x9}]);}['internalJsonWrite'](a,b){const c=/[A-Z]|(_([.0-9_]|$))/g;return a['paths']['map'](d=>{if(c['test'](d))throw new Error('Unable\x20to\x20encode\x20FieldMask\x20to\x20JSON.\x20lowerCamelCase\x20of\x20path\x20name\x20\x22'+d+'\x22\x20is\x20irreversible.');return lowerCamelCase(d);})['join'](',');}['internalJsonRead'](a,b,c){if(typeof a!=='string')throw new Error('Unable\x20to\x20parse\x20FieldMask\x20from\x20JSON\x20'+typeofJsonValue(a)+'.\x20Expected\x20string.');if(!c)c=this['create']();if(a==='')return c;let d=e=>{if(e['includes']('_'))throw new Error('Unable\x20to\x20parse\x20FieldMask\x20from\x20JSON.\x20Path\x20names\x20must\x20be\x20lowerCamelCase.');let f=e['replace'](/[A-Z]/g,g=>'_'+g['toLowerCase']());return f;};return c['paths']=a['split'](',')['map'](d),c;}}export const FieldMask=new FieldMask$Type();
|
|
@@ -1,191 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { typeofJsonValue } from "@protobuf-ts/runtime";
|
|
3
|
-
import { MessageType } from "@protobuf-ts/runtime";
|
|
4
|
-
export var NullValue;
|
|
5
|
-
(function (NullValue) {
|
|
6
|
-
NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE";
|
|
7
|
-
})(NullValue || (NullValue = {}));
|
|
8
|
-
class Struct$Type extends MessageType {
|
|
9
|
-
constructor() {
|
|
10
|
-
super("google.protobuf.Struct", [
|
|
11
|
-
{
|
|
12
|
-
no: 1,
|
|
13
|
-
name: "fields",
|
|
14
|
-
kind: "map",
|
|
15
|
-
K: 9,
|
|
16
|
-
V: { kind: "message", T: () => Value },
|
|
17
|
-
},
|
|
18
|
-
]);
|
|
19
|
-
}
|
|
20
|
-
internalJsonWrite(message, options) {
|
|
21
|
-
let json = {};
|
|
22
|
-
for (let [k, v] of Object.entries(message.fields)) {
|
|
23
|
-
json[k] = Value.toJson(v);
|
|
24
|
-
}
|
|
25
|
-
return json;
|
|
26
|
-
}
|
|
27
|
-
internalJsonRead(json, options, target) {
|
|
28
|
-
if (!isJsonObject(json))
|
|
29
|
-
throw new globalThis.Error("Unable to parse message " +
|
|
30
|
-
this.typeName +
|
|
31
|
-
" from JSON " +
|
|
32
|
-
typeofJsonValue(json) +
|
|
33
|
-
".");
|
|
34
|
-
if (!target)
|
|
35
|
-
target = this.create();
|
|
36
|
-
for (let [k, v] of globalThis.Object.entries(json)) {
|
|
37
|
-
target.fields[k] = Value.fromJson(v);
|
|
38
|
-
}
|
|
39
|
-
return target;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
export const Struct = new Struct$Type();
|
|
43
|
-
class Value$Type extends MessageType {
|
|
44
|
-
constructor() {
|
|
45
|
-
super("google.protobuf.Value", [
|
|
46
|
-
{
|
|
47
|
-
no: 1,
|
|
48
|
-
name: "null_value",
|
|
49
|
-
kind: "enum",
|
|
50
|
-
oneof: "kind",
|
|
51
|
-
T: () => ["google.protobuf.NullValue", NullValue],
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
no: 2,
|
|
55
|
-
name: "number_value",
|
|
56
|
-
kind: "scalar",
|
|
57
|
-
oneof: "kind",
|
|
58
|
-
T: 1,
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
no: 3,
|
|
62
|
-
name: "string_value",
|
|
63
|
-
kind: "scalar",
|
|
64
|
-
oneof: "kind",
|
|
65
|
-
T: 9,
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
no: 4,
|
|
69
|
-
name: "bool_value",
|
|
70
|
-
kind: "scalar",
|
|
71
|
-
oneof: "kind",
|
|
72
|
-
T: 8,
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
no: 5,
|
|
76
|
-
name: "struct_value",
|
|
77
|
-
kind: "message",
|
|
78
|
-
oneof: "kind",
|
|
79
|
-
T: () => Struct,
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
no: 6,
|
|
83
|
-
name: "list_value",
|
|
84
|
-
kind: "message",
|
|
85
|
-
oneof: "kind",
|
|
86
|
-
T: () => ListValue,
|
|
87
|
-
},
|
|
88
|
-
]);
|
|
89
|
-
}
|
|
90
|
-
internalJsonWrite(message, options) {
|
|
91
|
-
if (message.kind.oneofKind === undefined)
|
|
92
|
-
throw new globalThis.Error();
|
|
93
|
-
switch (message.kind.oneofKind) {
|
|
94
|
-
case undefined:
|
|
95
|
-
throw new globalThis.Error();
|
|
96
|
-
case "boolValue":
|
|
97
|
-
return message.kind.boolValue;
|
|
98
|
-
case "nullValue":
|
|
99
|
-
return null;
|
|
100
|
-
case "numberValue":
|
|
101
|
-
let numberValue = message.kind.numberValue;
|
|
102
|
-
if (typeof numberValue == "number" &&
|
|
103
|
-
!Number.isFinite(numberValue))
|
|
104
|
-
throw new globalThis.Error();
|
|
105
|
-
return numberValue;
|
|
106
|
-
case "stringValue":
|
|
107
|
-
return message.kind.stringValue;
|
|
108
|
-
case "listValue":
|
|
109
|
-
let listValueField = this.fields.find((f) => f.no === 6);
|
|
110
|
-
if (listValueField?.kind !== "message")
|
|
111
|
-
throw new globalThis.Error();
|
|
112
|
-
return listValueField.T().toJson(message.kind.listValue);
|
|
113
|
-
case "structValue":
|
|
114
|
-
let structValueField = this.fields.find((f) => f.no === 5);
|
|
115
|
-
if (structValueField?.kind !== "message")
|
|
116
|
-
throw new globalThis.Error();
|
|
117
|
-
return structValueField.T().toJson(message.kind.structValue);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
internalJsonRead(json, options, target) {
|
|
121
|
-
if (!target)
|
|
122
|
-
target = this.create();
|
|
123
|
-
switch (typeof json) {
|
|
124
|
-
case "number":
|
|
125
|
-
target.kind = { oneofKind: "numberValue", numberValue: json };
|
|
126
|
-
break;
|
|
127
|
-
case "string":
|
|
128
|
-
target.kind = { oneofKind: "stringValue", stringValue: json };
|
|
129
|
-
break;
|
|
130
|
-
case "boolean":
|
|
131
|
-
target.kind = { oneofKind: "boolValue", boolValue: json };
|
|
132
|
-
break;
|
|
133
|
-
case "object":
|
|
134
|
-
if (json === null) {
|
|
135
|
-
target.kind = {
|
|
136
|
-
oneofKind: "nullValue",
|
|
137
|
-
nullValue: NullValue.NULL_VALUE,
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
else if (globalThis.Array.isArray(json)) {
|
|
141
|
-
target.kind = {
|
|
142
|
-
oneofKind: "listValue",
|
|
143
|
-
listValue: ListValue.fromJson(json),
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
target.kind = {
|
|
148
|
-
oneofKind: "structValue",
|
|
149
|
-
structValue: Struct.fromJson(json),
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
break;
|
|
153
|
-
default:
|
|
154
|
-
throw new globalThis.Error("Unable to parse " +
|
|
155
|
-
this.typeName +
|
|
156
|
-
" from JSON " +
|
|
157
|
-
typeofJsonValue(json));
|
|
158
|
-
}
|
|
159
|
-
return target;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
export const Value = new Value$Type();
|
|
163
|
-
class ListValue$Type extends MessageType {
|
|
164
|
-
constructor() {
|
|
165
|
-
super("google.protobuf.ListValue", [
|
|
166
|
-
{
|
|
167
|
-
no: 1,
|
|
168
|
-
name: "values",
|
|
169
|
-
kind: "message",
|
|
170
|
-
repeat: 1,
|
|
171
|
-
T: () => Value,
|
|
172
|
-
},
|
|
173
|
-
]);
|
|
174
|
-
}
|
|
175
|
-
internalJsonWrite(message, options) {
|
|
176
|
-
return message.values.map((v) => Value.toJson(v));
|
|
177
|
-
}
|
|
178
|
-
internalJsonRead(json, options, target) {
|
|
179
|
-
if (!globalThis.Array.isArray(json))
|
|
180
|
-
throw new globalThis.Error("Unable to parse " +
|
|
181
|
-
this.typeName +
|
|
182
|
-
" from JSON " +
|
|
183
|
-
typeofJsonValue(json));
|
|
184
|
-
if (!target)
|
|
185
|
-
target = this.create();
|
|
186
|
-
let values = json.map((v) => Value.fromJson(v));
|
|
187
|
-
target.values.push(...values);
|
|
188
|
-
return target;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
export const ListValue = new ListValue$Type();
|
|
1
|
+
import{isJsonObject}from'@protobuf-ts/runtime';import{typeofJsonValue}from'@protobuf-ts/runtime';import{MessageType}from'@protobuf-ts/runtime';export var NullValue;(function(a){a[a['NULL_VALUE']=0x0]='NULL_VALUE';}(NullValue||(NullValue={})));class Struct$Type extends MessageType{constructor(){super('google.protobuf.Struct',[{'no':0x1,'name':'fields','kind':'map','K':0x9,'V':{'kind':'message','T':()=>Value}}]);}['internalJsonWrite'](a,b){let c={};for(let [d,e]of Object['entries'](a['fields'])){c[d]=Value['toJson'](e);}return c;}['internalJsonRead'](a,b,c){if(!isJsonObject(a))throw new globalThis['Error']('Unable\x20to\x20parse\x20message\x20'+this['typeName']+'\x20from\x20JSON\x20'+typeofJsonValue(a)+'.');if(!c)c=this['create']();for(let [d,e]of globalThis['Object']['entries'](a)){c['fields'][d]=Value['fromJson'](e);}return c;}}export const Struct=new Struct$Type();class Value$Type extends MessageType{constructor(){super('google.protobuf.Value',[{'no':0x1,'name':'null_value','kind':'enum','oneof':'kind','T':()=>['google.protobuf.NullValue',NullValue]},{'no':0x2,'name':'number_value','kind':'scalar','oneof':'kind','T':0x1},{'no':0x3,'name':'string_value','kind':'scalar','oneof':'kind','T':0x9},{'no':0x4,'name':'bool_value','kind':'scalar','oneof':'kind','T':0x8},{'no':0x5,'name':'struct_value','kind':'message','oneof':'kind','T':()=>Struct},{'no':0x6,'name':'list_value','kind':'message','oneof':'kind','T':()=>ListValue}]);}['internalJsonWrite'](a,b){if(a['kind']['oneofKind']===undefined)throw new globalThis['Error']();switch(a['kind']['oneofKind']){case undefined:throw new globalThis['Error']();case'boolValue':return a['kind']['boolValue'];case'nullValue':return null;case'numberValue':let c=a['kind']['numberValue'];if(typeof c=='number'&&!Number['isFinite'](c))throw new globalThis['Error']();return c;case'stringValue':return a['kind']['stringValue'];case'listValue':let d=this['fields']['find'](g=>g['no']===0x6);if(d?.['kind']!=='message')throw new globalThis['Error']();return d['T']()['toJson'](a['kind']['listValue']);case'structValue':let e=this['fields']['find'](g=>g['no']===0x5);if(e?.['kind']!=='message')throw new globalThis['Error']();return e['T']()['toJson'](a['kind']['structValue']);}}['internalJsonRead'](a,b,c){if(!c)c=this['create']();switch(typeof a){case'number':c['kind']={'oneofKind':'numberValue','numberValue':a};break;case'string':c['kind']={'oneofKind':'stringValue','stringValue':a};break;case'boolean':c['kind']={'oneofKind':'boolValue','boolValue':a};break;case'object':if(a===null)c['kind']={'oneofKind':'nullValue','nullValue':NullValue['NULL_VALUE']};else globalThis['Array']['isArray'](a)?c['kind']={'oneofKind':'listValue','listValue':ListValue['fromJson'](a)}:c['kind']={'oneofKind':'structValue','structValue':Struct['fromJson'](a)};break;default:throw new globalThis['Error']('Unable\x20to\x20parse\x20'+this['typeName']+'\x20from\x20JSON\x20'+typeofJsonValue(a));}return c;}}export const Value=new Value$Type();class ListValue$Type extends MessageType{constructor(){super('google.protobuf.ListValue',[{'no':0x1,'name':'values','kind':'message','repeat':0x1,'T':()=>Value}]);}['internalJsonWrite'](a,b){return a['values']['map'](c=>Value['toJson'](c));}['internalJsonRead'](a,b,c){if(!globalThis['Array']['isArray'](a))throw new globalThis['Error']('Unable\x20to\x20parse\x20'+this['typeName']+'\x20from\x20JSON\x20'+typeofJsonValue(a));if(!c)c=this['create']();let d=a['map'](e=>Value['fromJson'](e));return c['values']['push'](...d),c;}}export const ListValue=new ListValue$Type();
|
|
@@ -1,91 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { PbLong } from "@protobuf-ts/runtime";
|
|
3
|
-
import { MessageType } from "@protobuf-ts/runtime";
|
|
4
|
-
class Timestamp$Type extends MessageType {
|
|
5
|
-
constructor() {
|
|
6
|
-
super("google.protobuf.Timestamp", [
|
|
7
|
-
{
|
|
8
|
-
no: 1,
|
|
9
|
-
name: "seconds",
|
|
10
|
-
kind: "scalar",
|
|
11
|
-
T: 3,
|
|
12
|
-
L: 0,
|
|
13
|
-
},
|
|
14
|
-
{ no: 2, name: "nanos", kind: "scalar", T: 5 },
|
|
15
|
-
]);
|
|
16
|
-
}
|
|
17
|
-
now() {
|
|
18
|
-
const msg = this.create();
|
|
19
|
-
const ms = Date.now();
|
|
20
|
-
msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();
|
|
21
|
-
msg.nanos = (ms % 1000) * 1000000;
|
|
22
|
-
return msg;
|
|
23
|
-
}
|
|
24
|
-
toDate(message) {
|
|
25
|
-
return new Date(PbLong.from(message.seconds).toNumber() * 1000 +
|
|
26
|
-
Math.ceil(message.nanos / 1000000));
|
|
27
|
-
}
|
|
28
|
-
fromDate(date) {
|
|
29
|
-
const msg = this.create();
|
|
30
|
-
const ms = date.getTime();
|
|
31
|
-
msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();
|
|
32
|
-
msg.nanos =
|
|
33
|
-
((ms % 1000) + (ms < 0 && ms % 1000 !== 0 ? 1000 : 0)) * 1000000;
|
|
34
|
-
return msg;
|
|
35
|
-
}
|
|
36
|
-
internalJsonWrite(message, options) {
|
|
37
|
-
let ms = PbLong.from(message.seconds).toNumber() * 1000;
|
|
38
|
-
if (ms < Date.parse("0001-01-01T00:00:00Z") ||
|
|
39
|
-
ms > Date.parse("9999-12-31T23:59:59Z"))
|
|
40
|
-
throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
|
|
41
|
-
if (message.nanos < 0)
|
|
42
|
-
throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");
|
|
43
|
-
let z = "Z";
|
|
44
|
-
if (message.nanos > 0) {
|
|
45
|
-
let nanosStr = (message.nanos + 1000000000).toString().substring(1);
|
|
46
|
-
if (nanosStr.substring(3) === "000000")
|
|
47
|
-
z = "." + nanosStr.substring(0, 3) + "Z";
|
|
48
|
-
else if (nanosStr.substring(6) === "000")
|
|
49
|
-
z = "." + nanosStr.substring(0, 6) + "Z";
|
|
50
|
-
else
|
|
51
|
-
z = "." + nanosStr + "Z";
|
|
52
|
-
}
|
|
53
|
-
return new Date(ms).toISOString().replace(".000Z", z);
|
|
54
|
-
}
|
|
55
|
-
internalJsonRead(json, options, target) {
|
|
56
|
-
if (typeof json !== "string")
|
|
57
|
-
throw new Error("Unable to parse Timestamp from JSON " +
|
|
58
|
-
typeofJsonValue(json) +
|
|
59
|
-
".");
|
|
60
|
-
let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
|
|
61
|
-
if (!matches)
|
|
62
|
-
throw new Error("Unable to parse Timestamp from JSON. Invalid format.");
|
|
63
|
-
let ms = Date.parse(matches[1] +
|
|
64
|
-
"-" +
|
|
65
|
-
matches[2] +
|
|
66
|
-
"-" +
|
|
67
|
-
matches[3] +
|
|
68
|
-
"T" +
|
|
69
|
-
matches[4] +
|
|
70
|
-
":" +
|
|
71
|
-
matches[5] +
|
|
72
|
-
":" +
|
|
73
|
-
matches[6] +
|
|
74
|
-
(matches[8] ? matches[8] : "Z"));
|
|
75
|
-
if (Number.isNaN(ms))
|
|
76
|
-
throw new Error("Unable to parse Timestamp from JSON. Invalid value.");
|
|
77
|
-
if (ms < Date.parse("0001-01-01T00:00:00Z") ||
|
|
78
|
-
ms > Date.parse("9999-12-31T23:59:59Z"))
|
|
79
|
-
throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
|
|
80
|
-
if (!target)
|
|
81
|
-
target = this.create();
|
|
82
|
-
target.seconds = PbLong.from(ms / 1000).toBigInt();
|
|
83
|
-
target.nanos = 0;
|
|
84
|
-
if (matches[7])
|
|
85
|
-
target.nanos =
|
|
86
|
-
parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) -
|
|
87
|
-
1000000000;
|
|
88
|
-
return target;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
export const Timestamp = new Timestamp$Type();
|
|
1
|
+
import{typeofJsonValue}from'@protobuf-ts/runtime';import{PbLong}from'@protobuf-ts/runtime';import{MessageType}from'@protobuf-ts/runtime';class Timestamp$Type extends MessageType{constructor(){super('google.protobuf.Timestamp',[{'no':0x1,'name':'seconds','kind':'scalar','T':0x3,'L':0x0},{'no':0x2,'name':'nanos','kind':'scalar','T':0x5}]);}['now'](){const a=this['create'](),b=Date['now']();return a['seconds']=PbLong['from'](Math['floor'](b/0x3e8))['toBigInt'](),a['nanos']=b%0x3e8*0xf4240,a;}['toDate'](a){return new Date(PbLong['from'](a['seconds'])['toNumber']()*0x3e8+Math['ceil'](a['nanos']/0xf4240));}['fromDate'](a){const b=this['create'](),c=a['getTime']();return b['seconds']=PbLong['from'](Math['floor'](c/0x3e8))['toBigInt'](),b['nanos']=(c%0x3e8+(c<0x0&&c%0x3e8!==0x0?0x3e8:0x0))*0xf4240,b;}['internalJsonWrite'](a,b){let c=PbLong['from'](a['seconds'])['toNumber']()*0x3e8;if(c<Date['parse']('0001-01-01T00:00:00Z')||c>Date['parse']('9999-12-31T23:59:59Z'))throw new Error('Unable\x20to\x20encode\x20Timestamp\x20to\x20JSON.\x20Must\x20be\x20from\x200001-01-01T00:00:00Z\x20to\x209999-12-31T23:59:59Z\x20inclusive.');if(a['nanos']<0x0)throw new Error('Unable\x20to\x20encode\x20invalid\x20Timestamp\x20to\x20JSON.\x20Nanos\x20must\x20not\x20be\x20negative.');let d='Z';if(a['nanos']>0x0){let e=(a['nanos']+0x3b9aca00)['toString']()['substring'](0x1);if(e['substring'](0x3)==='000000')d='.'+e['substring'](0x0,0x3)+'Z';else{if(e['substring'](0x6)==='000')d='.'+e['substring'](0x0,0x6)+'Z';else d='.'+e+'Z';}}return new Date(c)['toISOString']()['replace']('.000Z',d);}['internalJsonRead'](a,b,c){if(typeof a!=='string')throw new Error('Unable\x20to\x20parse\x20Timestamp\x20from\x20JSON\x20'+typeofJsonValue(a)+'.');let d=a['match'](/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!d)throw new Error('Unable\x20to\x20parse\x20Timestamp\x20from\x20JSON.\x20Invalid\x20format.');let e=Date['parse'](d[0x1]+'-'+d[0x2]+'-'+d[0x3]+'T'+d[0x4]+':'+d[0x5]+':'+d[0x6]+(d[0x8]?d[0x8]:'Z'));if(Number['isNaN'](e))throw new Error('Unable\x20to\x20parse\x20Timestamp\x20from\x20JSON.\x20Invalid\x20value.');if(e<Date['parse']('0001-01-01T00:00:00Z')||e>Date['parse']('9999-12-31T23:59:59Z'))throw new globalThis['Error']('Unable\x20to\x20parse\x20Timestamp\x20from\x20JSON.\x20Must\x20be\x20from\x200001-01-01T00:00:00Z\x20to\x209999-12-31T23:59:59Z\x20inclusive.');if(!c)c=this['create']();c['seconds']=PbLong['from'](e/0x3e8)['toBigInt'](),c['nanos']=0x0;if(d[0x7])c['nanos']=parseInt('1'+d[0x7]+'0'['repeat'](0x9-d[0x7]['length']))-0x3b9aca00;return c;}}export const Timestamp=new Timestamp$Type();
|