kalvora.js 0.0.1-alpha.1
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 +162 -0
- package/LICENSE +202 -0
- package/NOTICE +10 -0
- package/README.md +391 -0
- package/dist/LICENSE +202 -0
- package/dist/README.md +391 -0
- package/dist/index.cjs +78254 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +83 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +125 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +125 -0
- package/dist/proto/generated/google/protobuf/empty_pb.d.ts +63 -0
- package/dist/proto/generated/google/protobuf/empty_pb.js +49 -0
- package/dist/proto/generated/google/protobuf/timestamp_pb.d.ts +163 -0
- package/dist/proto/generated/google/protobuf/timestamp_pb.js +49 -0
- package/dist/proto/generated/guardian_pb.d.ts +1229 -0
- package/dist/proto/generated/guardian_pb.js +255 -0
- package/dist/proto/generated/kal_api_pb.d.ts +1350 -0
- package/dist/proto/generated/kal_api_pb.js +324 -0
- package/dist/proto/generated/txn_pb.d.ts +3653 -0
- package/dist/proto/generated/txn_pb.js +622 -0
- package/dist/proto/generated/validator_pb.d.ts +2385 -0
- package/dist/proto/generated/validator_pb.js +528 -0
- package/dist/proto/guardian.proto +266 -0
- package/dist/proto/kal_api.proto +289 -0
- package/dist/proto/txn.proto +718 -0
- package/dist/proto/validator.proto +469 -0
- package/dist/src/adapter/constants.d.ts +80 -0
- package/dist/src/adapter/constants.d.ts.map +1 -0
- package/dist/src/adapter/constants.js +89 -0
- package/dist/src/adapter/constants.js.map +1 -0
- package/dist/src/adapter/index.d.ts +45 -0
- package/dist/src/adapter/index.d.ts.map +1 -0
- package/dist/src/adapter/index.js +71 -0
- package/dist/src/adapter/index.js.map +1 -0
- package/dist/src/adapter/serialization.d.ts +94 -0
- package/dist/src/adapter/serialization.d.ts.map +1 -0
- package/dist/src/adapter/serialization.js +175 -0
- package/dist/src/adapter/serialization.js.map +1 -0
- package/dist/src/adapter/wallet-adapter.d.ts +230 -0
- package/dist/src/adapter/wallet-adapter.d.ts.map +1 -0
- package/dist/src/adapter/wallet-adapter.js +792 -0
- package/dist/src/adapter/wallet-adapter.js.map +1 -0
- package/dist/src/adapter/wallet-signer.d.ts +115 -0
- package/dist/src/adapter/wallet-signer.d.ts.map +1 -0
- package/dist/src/adapter/wallet-signer.js +357 -0
- package/dist/src/adapter/wallet-signer.js.map +1 -0
- package/dist/src/adapter/walletconnect.d.ts +148 -0
- package/dist/src/adapter/walletconnect.d.ts.map +1 -0
- package/dist/src/adapter/walletconnect.js +188 -0
- package/dist/src/adapter/walletconnect.js.map +1 -0
- package/dist/src/allowance/index.d.ts +2 -0
- package/dist/src/allowance/index.d.ts.map +1 -0
- package/dist/src/allowance/index.js +2 -0
- package/dist/src/allowance/index.js.map +1 -0
- package/dist/src/allowance/transaction.d.ts +227 -0
- package/dist/src/allowance/transaction.d.ts.map +1 -0
- package/dist/src/allowance/transaction.js +296 -0
- package/dist/src/allowance/transaction.js.map +1 -0
- package/dist/src/api/handler/fee-info/service.d.ts +126 -0
- package/dist/src/api/handler/fee-info/service.d.ts.map +1 -0
- package/dist/src/api/handler/fee-info/service.js +255 -0
- package/dist/src/api/handler/fee-info/service.js.map +1 -0
- package/dist/src/api/handler/index.d.ts +10 -0
- package/dist/src/api/handler/index.d.ts.map +1 -0
- package/dist/src/api/handler/index.js +14 -0
- package/dist/src/api/handler/index.js.map +1 -0
- package/dist/src/api/handler/nonce/service.d.ts +37 -0
- package/dist/src/api/handler/nonce/service.d.ts.map +1 -0
- package/dist/src/api/handler/nonce/service.js +64 -0
- package/dist/src/api/handler/nonce/service.js.map +1 -0
- package/dist/src/api/handler/token-info/service.d.ts +123 -0
- package/dist/src/api/handler/token-info/service.d.ts.map +1 -0
- package/dist/src/api/handler/token-info/service.js +218 -0
- package/dist/src/api/handler/token-info/service.js.map +1 -0
- package/dist/src/api/shared/indexer-utils.d.ts +14 -0
- package/dist/src/api/shared/indexer-utils.d.ts.map +1 -0
- package/dist/src/api/shared/indexer-utils.js +19 -0
- package/dist/src/api/shared/indexer-utils.js.map +1 -0
- package/dist/src/api/validator/balance/index.d.ts +8 -0
- package/dist/src/api/validator/balance/index.d.ts.map +1 -0
- package/dist/src/api/validator/balance/index.js +7 -0
- package/dist/src/api/validator/balance/index.js.map +1 -0
- package/dist/src/api/validator/balance/service.d.ts +42 -0
- package/dist/src/api/validator/balance/service.d.ts.map +1 -0
- package/dist/src/api/validator/balance/service.js +93 -0
- package/dist/src/api/validator/balance/service.js.map +1 -0
- package/dist/src/api/validator/base-fee/index.d.ts +8 -0
- package/dist/src/api/validator/base-fee/index.d.ts.map +1 -0
- package/dist/src/api/validator/base-fee/index.js +7 -0
- package/dist/src/api/validator/base-fee/index.js.map +1 -0
- package/dist/src/api/validator/base-fee/service.d.ts +39 -0
- package/dist/src/api/validator/base-fee/service.d.ts.map +1 -0
- package/dist/src/api/validator/base-fee/service.js +45 -0
- package/dist/src/api/validator/base-fee/service.js.map +1 -0
- package/dist/src/api/validator/fee-info/index.d.ts +7 -0
- package/dist/src/api/validator/fee-info/index.d.ts.map +1 -0
- package/dist/src/api/validator/fee-info/index.js +7 -0
- package/dist/src/api/validator/fee-info/index.js.map +1 -0
- package/dist/src/api/validator/fee-info/request.d.ts +25 -0
- package/dist/src/api/validator/fee-info/request.d.ts.map +1 -0
- package/dist/src/api/validator/fee-info/request.js +92 -0
- package/dist/src/api/validator/fee-info/request.js.map +1 -0
- package/dist/src/api/validator/nonce/index.d.ts +7 -0
- package/dist/src/api/validator/nonce/index.d.ts.map +1 -0
- package/dist/src/api/validator/nonce/index.js +7 -0
- package/dist/src/api/validator/nonce/index.js.map +1 -0
- package/dist/src/api/validator/nonce/service.d.ts +18 -0
- package/dist/src/api/validator/nonce/service.d.ts.map +1 -0
- package/dist/src/api/validator/nonce/service.js +51 -0
- package/dist/src/api/validator/nonce/service.js.map +1 -0
- package/dist/src/client/index.d.ts +8 -0
- package/dist/src/client/index.d.ts.map +1 -0
- package/dist/src/client/index.js +8 -0
- package/dist/src/client/index.js.map +1 -0
- package/dist/src/client/kalvora-client.d.ts +117 -0
- package/dist/src/client/kalvora-client.d.ts.map +1 -0
- package/dist/src/client/kalvora-client.js +112 -0
- package/dist/src/client/kalvora-client.js.map +1 -0
- package/dist/src/client/networks.d.ts +48 -0
- package/dist/src/client/networks.d.ts.map +1 -0
- package/dist/src/client/networks.js +41 -0
- package/dist/src/client/networks.js.map +1 -0
- package/dist/src/coin-txn/index.d.ts +9 -0
- package/dist/src/coin-txn/index.d.ts.map +1 -0
- package/dist/src/coin-txn/index.js +9 -0
- package/dist/src/coin-txn/index.js.map +1 -0
- package/dist/src/coin-txn/transaction.d.ts +94 -0
- package/dist/src/coin-txn/transaction.d.ts.map +1 -0
- package/dist/src/coin-txn/transaction.js +341 -0
- package/dist/src/coin-txn/transaction.js.map +1 -0
- package/dist/src/compliance/index.d.ts +2 -0
- package/dist/src/compliance/index.d.ts.map +1 -0
- package/dist/src/compliance/index.js +2 -0
- package/dist/src/compliance/index.js.map +1 -0
- package/dist/src/compliance/transaction.d.ts +150 -0
- package/dist/src/compliance/transaction.d.ts.map +1 -0
- package/dist/src/compliance/transaction.js +183 -0
- package/dist/src/compliance/transaction.js.map +1 -0
- package/dist/src/contract/create/index.d.ts +8 -0
- package/dist/src/contract/create/index.d.ts.map +1 -0
- package/dist/src/contract/create/index.js +7 -0
- package/dist/src/contract/create/index.js.map +1 -0
- package/dist/src/contract/create/transaction.d.ts +47 -0
- package/dist/src/contract/create/transaction.d.ts.map +1 -0
- package/dist/src/contract/create/transaction.js +137 -0
- package/dist/src/contract/create/transaction.js.map +1 -0
- package/dist/src/contract/index.d.ts +34 -0
- package/dist/src/contract/index.d.ts.map +1 -0
- package/dist/src/contract/index.js +34 -0
- package/dist/src/contract/index.js.map +1 -0
- package/dist/src/contract/shared/index.d.ts +6 -0
- package/dist/src/contract/shared/index.d.ts.map +1 -0
- package/dist/src/contract/shared/index.js +6 -0
- package/dist/src/contract/shared/index.js.map +1 -0
- package/dist/src/contract/shared/types.d.ts +114 -0
- package/dist/src/contract/shared/types.d.ts.map +1 -0
- package/dist/src/contract/shared/types.js +5 -0
- package/dist/src/contract/shared/types.js.map +1 -0
- package/dist/src/contract/shared/utils.d.ts +111 -0
- package/dist/src/contract/shared/utils.d.ts.map +1 -0
- package/dist/src/contract/shared/utils.js +182 -0
- package/dist/src/contract/shared/utils.js.map +1 -0
- package/dist/src/contract/update/index.d.ts +8 -0
- package/dist/src/contract/update/index.d.ts.map +1 -0
- package/dist/src/contract/update/index.js +7 -0
- package/dist/src/contract/update/index.js.map +1 -0
- package/dist/src/contract/update/transaction.d.ts +45 -0
- package/dist/src/contract/update/transaction.d.ts.map +1 -0
- package/dist/src/contract/update/transaction.js +123 -0
- package/dist/src/contract/update/transaction.js.map +1 -0
- package/dist/src/delegated-voting/index.d.ts +2 -0
- package/dist/src/delegated-voting/index.d.ts.map +1 -0
- package/dist/src/delegated-voting/index.js +2 -0
- package/dist/src/delegated-voting/index.js.map +1 -0
- package/dist/src/delegated-voting/transaction.d.ts +127 -0
- package/dist/src/delegated-voting/transaction.d.ts.map +1 -0
- package/dist/src/delegated-voting/transaction.js +195 -0
- package/dist/src/delegated-voting/transaction.js.map +1 -0
- package/dist/src/expense-ratio/index.d.ts +2 -0
- package/dist/src/expense-ratio/index.d.ts.map +1 -0
- package/dist/src/expense-ratio/index.js +2 -0
- package/dist/src/expense-ratio/index.js.map +1 -0
- package/dist/src/expense-ratio/transaction.d.ts +94 -0
- package/dist/src/expense-ratio/transaction.d.ts.map +1 -0
- package/dist/src/expense-ratio/transaction.js +122 -0
- package/dist/src/expense-ratio/transaction.js.map +1 -0
- package/dist/src/grpc/api/validator-api-client.d.ts +32 -0
- package/dist/src/grpc/api/validator-api-client.d.ts.map +1 -0
- package/dist/src/grpc/api/validator-api-client.js +61 -0
- package/dist/src/grpc/api/validator-api-client.js.map +1 -0
- package/dist/src/grpc/client-factory.d.ts +12 -0
- package/dist/src/grpc/client-factory.d.ts.map +1 -0
- package/dist/src/grpc/client-factory.js +248 -0
- package/dist/src/grpc/client-factory.js.map +1 -0
- package/dist/src/grpc/errors.d.ts +79 -0
- package/dist/src/grpc/errors.d.ts.map +1 -0
- package/dist/src/grpc/errors.js +108 -0
- package/dist/src/grpc/errors.js.map +1 -0
- package/dist/src/grpc/index.d.ts +21 -0
- package/dist/src/grpc/index.d.ts.map +1 -0
- package/dist/src/grpc/index.js +20 -0
- package/dist/src/grpc/index.js.map +1 -0
- package/dist/src/grpc/transaction/transaction-client.d.ts +97 -0
- package/dist/src/grpc/transaction/transaction-client.d.ts.map +1 -0
- package/dist/src/grpc/transaction/transaction-client.js +142 -0
- package/dist/src/grpc/transaction/transaction-client.js.map +1 -0
- package/dist/src/grpc/utils/grpc-web-fetch-wrapper.d.ts +2 -0
- package/dist/src/grpc/utils/grpc-web-fetch-wrapper.d.ts.map +1 -0
- package/dist/src/grpc/utils/grpc-web-fetch-wrapper.js +213 -0
- package/dist/src/grpc/utils/grpc-web-fetch-wrapper.js.map +1 -0
- package/dist/src/items/index.d.ts +7 -0
- package/dist/src/items/index.d.ts.map +1 -0
- package/dist/src/items/index.js +7 -0
- package/dist/src/items/index.js.map +1 -0
- package/dist/src/items/transaction.d.ts +132 -0
- package/dist/src/items/transaction.d.ts.map +1 -0
- package/dist/src/items/transaction.js +276 -0
- package/dist/src/items/transaction.js.map +1 -0
- package/dist/src/mint/index.d.ts +2 -0
- package/dist/src/mint/index.d.ts.map +1 -0
- package/dist/src/mint/index.js +2 -0
- package/dist/src/mint/index.js.map +1 -0
- package/dist/src/mint/transaction.d.ts +128 -0
- package/dist/src/mint/transaction.d.ts.map +1 -0
- package/dist/src/mint/transaction.js +118 -0
- package/dist/src/mint/transaction.js.map +1 -0
- package/dist/src/proposal/index.d.ts +3 -0
- package/dist/src/proposal/index.d.ts.map +1 -0
- package/dist/src/proposal/index.js +3 -0
- package/dist/src/proposal/index.js.map +1 -0
- package/dist/src/proposal/transaction.d.ts +95 -0
- package/dist/src/proposal/transaction.d.ts.map +1 -0
- package/dist/src/proposal/transaction.js +321 -0
- package/dist/src/proposal/transaction.js.map +1 -0
- package/dist/src/proposal-cancel/index.d.ts +2 -0
- package/dist/src/proposal-cancel/index.d.ts.map +1 -0
- package/dist/src/proposal-cancel/index.js +2 -0
- package/dist/src/proposal-cancel/index.js.map +1 -0
- package/dist/src/proposal-cancel/transaction.d.ts +31 -0
- package/dist/src/proposal-cancel/transaction.d.ts.map +1 -0
- package/dist/src/proposal-cancel/transaction.js +98 -0
- package/dist/src/proposal-cancel/transaction.js.map +1 -0
- package/dist/src/protocol/guardian-names.d.ts +35 -0
- package/dist/src/protocol/guardian-names.d.ts.map +1 -0
- package/dist/src/protocol/guardian-names.js +25 -0
- package/dist/src/protocol/guardian-names.js.map +1 -0
- package/dist/src/protocol/index.d.ts +36 -0
- package/dist/src/protocol/index.d.ts.map +1 -0
- package/dist/src/protocol/index.js +36 -0
- package/dist/src/protocol/index.js.map +1 -0
- package/dist/src/quash/index.d.ts +2 -0
- package/dist/src/quash/index.d.ts.map +1 -0
- package/dist/src/quash/index.js +2 -0
- package/dist/src/quash/index.js.map +1 -0
- package/dist/src/quash/transaction.d.ts +124 -0
- package/dist/src/quash/transaction.d.ts.map +1 -0
- package/dist/src/quash/transaction.js +118 -0
- package/dist/src/quash/transaction.js.map +1 -0
- package/dist/src/query/api-client.d.ts +368 -0
- package/dist/src/query/api-client.d.ts.map +1 -0
- package/dist/src/query/api-client.js +497 -0
- package/dist/src/query/api-client.js.map +1 -0
- package/dist/src/query/decoders.d.ts +184 -0
- package/dist/src/query/decoders.d.ts.map +1 -0
- package/dist/src/query/decoders.js +257 -0
- package/dist/src/query/decoders.js.map +1 -0
- package/dist/src/query/guardian-client.d.ts +73 -0
- package/dist/src/query/guardian-client.d.ts.map +1 -0
- package/dist/src/query/guardian-client.js +90 -0
- package/dist/src/query/guardian-client.js.map +1 -0
- package/dist/src/query/index.d.ts +16 -0
- package/dist/src/query/index.d.ts.map +1 -0
- package/dist/src/query/index.js +16 -0
- package/dist/src/query/index.js.map +1 -0
- package/dist/src/query/validator-client.d.ts +95 -0
- package/dist/src/query/validator-client.d.ts.map +1 -0
- package/dist/src/query/validator-client.js +116 -0
- package/dist/src/query/validator-client.js.map +1 -0
- package/dist/src/revoke/index.d.ts +2 -0
- package/dist/src/revoke/index.d.ts.map +1 -0
- package/dist/src/revoke/index.js +2 -0
- package/dist/src/revoke/index.js.map +1 -0
- package/dist/src/revoke/transaction.d.ts +123 -0
- package/dist/src/revoke/transaction.d.ts.map +1 -0
- package/dist/src/revoke/transaction.js +125 -0
- package/dist/src/revoke/transaction.js.map +1 -0
- package/dist/src/shared/crypto/address-utils.d.ts +71 -0
- package/dist/src/shared/crypto/address-utils.d.ts.map +1 -0
- package/dist/src/shared/crypto/address-utils.js +305 -0
- package/dist/src/shared/crypto/address-utils.js.map +1 -0
- package/dist/src/shared/crypto/constants.d.ts +29 -0
- package/dist/src/shared/crypto/constants.d.ts.map +1 -0
- package/dist/src/shared/crypto/constants.js +53 -0
- package/dist/src/shared/crypto/constants.js.map +1 -0
- package/dist/src/shared/crypto/signature-utils.d.ts +14 -0
- package/dist/src/shared/crypto/signature-utils.d.ts.map +1 -0
- package/dist/src/shared/crypto/signature-utils.js +40 -0
- package/dist/src/shared/crypto/signature-utils.js.map +1 -0
- package/dist/src/shared/fee-calculators/base-fee-constants.d.ts +33 -0
- package/dist/src/shared/fee-calculators/base-fee-constants.d.ts.map +1 -0
- package/dist/src/shared/fee-calculators/base-fee-constants.js +45 -0
- package/dist/src/shared/fee-calculators/base-fee-constants.js.map +1 -0
- package/dist/src/shared/fee-calculators/contract-fee-constants.d.ts +53 -0
- package/dist/src/shared/fee-calculators/contract-fee-constants.d.ts.map +1 -0
- package/dist/src/shared/fee-calculators/contract-fee-constants.js +73 -0
- package/dist/src/shared/fee-calculators/contract-fee-constants.js.map +1 -0
- package/dist/src/shared/fee-calculators/contract-fee-service.d.ts +60 -0
- package/dist/src/shared/fee-calculators/contract-fee-service.d.ts.map +1 -0
- package/dist/src/shared/fee-calculators/contract-fee-service.js +171 -0
- package/dist/src/shared/fee-calculators/contract-fee-service.js.map +1 -0
- package/dist/src/shared/fee-calculators/denomination-fallback.d.ts +41 -0
- package/dist/src/shared/fee-calculators/denomination-fallback.d.ts.map +1 -0
- package/dist/src/shared/fee-calculators/denomination-fallback.js +83 -0
- package/dist/src/shared/fee-calculators/denomination-fallback.js.map +1 -0
- package/dist/src/shared/fee-calculators/exchange-rate-service.d.ts +26 -0
- package/dist/src/shared/fee-calculators/exchange-rate-service.d.ts.map +1 -0
- package/dist/src/shared/fee-calculators/exchange-rate-service.js +62 -0
- package/dist/src/shared/fee-calculators/exchange-rate-service.js.map +1 -0
- package/dist/src/shared/fee-calculators/types.d.ts +81 -0
- package/dist/src/shared/fee-calculators/types.d.ts.map +1 -0
- package/dist/src/shared/fee-calculators/types.js +7 -0
- package/dist/src/shared/fee-calculators/types.js.map +1 -0
- package/dist/src/shared/fee-calculators/universal-fee-calculator.d.ts +144 -0
- package/dist/src/shared/fee-calculators/universal-fee-calculator.d.ts.map +1 -0
- package/dist/src/shared/fee-calculators/universal-fee-calculator.js +900 -0
- package/dist/src/shared/fee-calculators/universal-fee-calculator.js.map +1 -0
- package/dist/src/shared/monitoring/health-check.d.ts +37 -0
- package/dist/src/shared/monitoring/health-check.d.ts.map +1 -0
- package/dist/src/shared/monitoring/health-check.js +152 -0
- package/dist/src/shared/monitoring/health-check.js.map +1 -0
- package/dist/src/shared/monitoring/index.d.ts +9 -0
- package/dist/src/shared/monitoring/index.d.ts.map +1 -0
- package/dist/src/shared/monitoring/index.js +9 -0
- package/dist/src/shared/monitoring/index.js.map +1 -0
- package/dist/src/shared/monitoring/logger.d.ts +42 -0
- package/dist/src/shared/monitoring/logger.d.ts.map +1 -0
- package/dist/src/shared/monitoring/logger.js +185 -0
- package/dist/src/shared/monitoring/logger.js.map +1 -0
- package/dist/src/shared/monitoring/metrics.d.ts +33 -0
- package/dist/src/shared/monitoring/metrics.d.ts.map +1 -0
- package/dist/src/shared/monitoring/metrics.js +105 -0
- package/dist/src/shared/monitoring/metrics.js.map +1 -0
- package/dist/src/shared/network/constants.d.ts +34 -0
- package/dist/src/shared/network/constants.d.ts.map +1 -0
- package/dist/src/shared/network/constants.js +46 -0
- package/dist/src/shared/network/constants.js.map +1 -0
- package/dist/src/shared/protobuf/index.d.ts +18 -0
- package/dist/src/shared/protobuf/index.d.ts.map +1 -0
- package/dist/src/shared/protobuf/index.js +10 -0
- package/dist/src/shared/protobuf/index.js.map +1 -0
- package/dist/src/shared/tx/base.d.ts +24 -0
- package/dist/src/shared/tx/base.d.ts.map +1 -0
- package/dist/src/shared/tx/base.js +57 -0
- package/dist/src/shared/tx/base.js.map +1 -0
- package/dist/src/shared/tx/standard.d.ts +198 -0
- package/dist/src/shared/tx/standard.d.ts.map +1 -0
- package/dist/src/shared/tx/standard.js +283 -0
- package/dist/src/shared/tx/standard.js.map +1 -0
- package/dist/src/shared/utils/amount-utils.d.ts +110 -0
- package/dist/src/shared/utils/amount-utils.d.ts.map +1 -0
- package/dist/src/shared/utils/amount-utils.js +237 -0
- package/dist/src/shared/utils/amount-utils.js.map +1 -0
- package/dist/src/shared/utils/byte-utils.d.ts +127 -0
- package/dist/src/shared/utils/byte-utils.d.ts.map +1 -0
- package/dist/src/shared/utils/byte-utils.js +220 -0
- package/dist/src/shared/utils/byte-utils.js.map +1 -0
- package/dist/src/shared/utils/error-handler.d.ts +65 -0
- package/dist/src/shared/utils/error-handler.d.ts.map +1 -0
- package/dist/src/shared/utils/error-handler.js +157 -0
- package/dist/src/shared/utils/error-handler.js.map +1 -0
- package/dist/src/shared/utils/formatting.d.ts +133 -0
- package/dist/src/shared/utils/formatting.d.ts.map +1 -0
- package/dist/src/shared/utils/formatting.js +190 -0
- package/dist/src/shared/utils/formatting.js.map +1 -0
- package/dist/src/shared/utils/grpc-config-utils.d.ts +8 -0
- package/dist/src/shared/utils/grpc-config-utils.d.ts.map +1 -0
- package/dist/src/shared/utils/grpc-config-utils.js +11 -0
- package/dist/src/shared/utils/grpc-config-utils.js.map +1 -0
- package/dist/src/shared/utils/performance-benchmark.d.ts +136 -0
- package/dist/src/shared/utils/performance-benchmark.d.ts.map +1 -0
- package/dist/src/shared/utils/performance-benchmark.js +274 -0
- package/dist/src/shared/utils/performance-benchmark.js.map +1 -0
- package/dist/src/shared/utils/protobuf-utils.d.ts +39 -0
- package/dist/src/shared/utils/protobuf-utils.d.ts.map +1 -0
- package/dist/src/shared/utils/protobuf-utils.js +103 -0
- package/dist/src/shared/utils/protobuf-utils.js.map +1 -0
- package/dist/src/shared/utils/testing-defaults/grpc-config.d.ts +12 -0
- package/dist/src/shared/utils/testing-defaults/grpc-config.d.ts.map +1 -0
- package/dist/src/shared/utils/testing-defaults/grpc-config.js +16 -0
- package/dist/src/shared/utils/testing-defaults/grpc-config.js.map +1 -0
- package/dist/src/shared/utils/testing-defaults/index.d.ts +8 -0
- package/dist/src/shared/utils/testing-defaults/index.d.ts.map +1 -0
- package/dist/src/shared/utils/testing-defaults/index.js +8 -0
- package/dist/src/shared/utils/testing-defaults/index.js.map +1 -0
- package/dist/src/shared/utils/token-config.d.ts +31 -0
- package/dist/src/shared/utils/token-config.d.ts.map +1 -0
- package/dist/src/shared/utils/token-config.js +56 -0
- package/dist/src/shared/utils/token-config.js.map +1 -0
- package/dist/src/shared/utils/token-info.d.ts +101 -0
- package/dist/src/shared/utils/token-info.d.ts.map +1 -0
- package/dist/src/shared/utils/token-info.js +203 -0
- package/dist/src/shared/utils/token-info.js.map +1 -0
- package/dist/src/shared/utils/transaction-utils.d.ts +200 -0
- package/dist/src/shared/utils/transaction-utils.d.ts.map +1 -0
- package/dist/src/shared/utils/transaction-utils.js +293 -0
- package/dist/src/shared/utils/transaction-utils.js.map +1 -0
- package/dist/src/shared/utils/unified-amount-conversion.d.ts +65 -0
- package/dist/src/shared/utils/unified-amount-conversion.d.ts.map +1 -0
- package/dist/src/shared/utils/unified-amount-conversion.js +146 -0
- package/dist/src/shared/utils/unified-amount-conversion.js.map +1 -0
- package/dist/src/shared/utils/validation.d.ts +119 -0
- package/dist/src/shared/utils/validation.d.ts.map +1 -0
- package/dist/src/shared/utils/validation.js +540 -0
- package/dist/src/shared/utils/validation.js.map +1 -0
- package/dist/src/sign/finalize.d.ts +82 -0
- package/dist/src/sign/finalize.d.ts.map +1 -0
- package/dist/src/sign/finalize.js +216 -0
- package/dist/src/sign/finalize.js.map +1 -0
- package/dist/src/sign/index.d.ts +19 -0
- package/dist/src/sign/index.d.ts.map +1 -0
- package/dist/src/sign/index.js +21 -0
- package/dist/src/sign/index.js.map +1 -0
- package/dist/src/sign/signer.d.ts +71 -0
- package/dist/src/sign/signer.d.ts.map +1 -0
- package/dist/src/sign/signer.js +65 -0
- package/dist/src/sign/signer.js.map +1 -0
- package/dist/src/smart-contracts/deploy/index.d.ts +5 -0
- package/dist/src/smart-contracts/deploy/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/deploy/index.js +5 -0
- package/dist/src/smart-contracts/deploy/index.js.map +1 -0
- package/dist/src/smart-contracts/deploy/transaction.d.ts +54 -0
- package/dist/src/smart-contracts/deploy/transaction.d.ts.map +1 -0
- package/dist/src/smart-contracts/deploy/transaction.js +116 -0
- package/dist/src/smart-contracts/deploy/transaction.js.map +1 -0
- package/dist/src/smart-contracts/execute/index.d.ts +5 -0
- package/dist/src/smart-contracts/execute/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/execute/index.js +5 -0
- package/dist/src/smart-contracts/execute/index.js.map +1 -0
- package/dist/src/smart-contracts/execute/transaction.d.ts +60 -0
- package/dist/src/smart-contracts/execute/transaction.d.ts.map +1 -0
- package/dist/src/smart-contracts/execute/transaction.js +88 -0
- package/dist/src/smart-contracts/execute/transaction.js.map +1 -0
- package/dist/src/smart-contracts/instantiate/index.d.ts +6 -0
- package/dist/src/smart-contracts/instantiate/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/instantiate/index.js +6 -0
- package/dist/src/smart-contracts/instantiate/index.js.map +1 -0
- package/dist/src/smart-contracts/instantiate/transaction.d.ts +43 -0
- package/dist/src/smart-contracts/instantiate/transaction.d.ts.map +1 -0
- package/dist/src/smart-contracts/instantiate/transaction.js +72 -0
- package/dist/src/smart-contracts/instantiate/transaction.js.map +1 -0
- package/dist/src/smart-contracts/shared/base.d.ts +29 -0
- package/dist/src/smart-contracts/shared/base.d.ts.map +1 -0
- package/dist/src/smart-contracts/shared/base.js +70 -0
- package/dist/src/smart-contracts/shared/base.js.map +1 -0
- package/dist/src/smart-contracts/shared/parameters.d.ts +26 -0
- package/dist/src/smart-contracts/shared/parameters.d.ts.map +1 -0
- package/dist/src/smart-contracts/shared/parameters.js +32 -0
- package/dist/src/smart-contracts/shared/parameters.js.map +1 -0
- package/dist/src/smart-contracts/shared/validation.d.ts +6 -0
- package/dist/src/smart-contracts/shared/validation.d.ts.map +1 -0
- package/dist/src/smart-contracts/shared/validation.js +13 -0
- package/dist/src/smart-contracts/shared/validation.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/index.d.ts +25 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/index.js +30 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/index.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/index.d.ts +7 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/index.js +7 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/index.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/process-rewards.d.ts +23 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/process-rewards.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/process-rewards.js +39 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/process-rewards.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/stake.d.ts +27 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/stake.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/stake.js +51 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/stake.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/update-wallet.d.ts +22 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/update-wallet.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/update-wallet.js +43 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/update-wallet.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/types.d.ts +60 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/types.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/types.js +8 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/types.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/utils.d.ts +131 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/utils.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/utils.js +87 -0
- package/dist/src/smart-contracts/use-cases/bootstrapping/utils.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/guardian/index.d.ts +49 -0
- package/dist/src/smart-contracts/use-cases/bridge/guardian/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/guardian/index.js +59 -0
- package/dist/src/smart-contracts/use-cases/bridge/guardian/index.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/guardian/vaa.d.ts +150 -0
- package/dist/src/smart-contracts/use-cases/bridge/guardian/vaa.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/guardian/vaa.js +505 -0
- package/dist/src/smart-contracts/use-cases/bridge/guardian/vaa.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/index.d.ts +68 -0
- package/dist/src/smart-contracts/use-cases/bridge/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/index.js +83 -0
- package/dist/src/smart-contracts/use-cases/bridge/index.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/index.d.ts +36 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/index.js +53 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/index.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/index.d.ts +10 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/index.js +17 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/index.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/lock.d.ts +65 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/lock.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/lock.js +130 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/lock.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/release.d.ts +81 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/release.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/release.js +187 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/release.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/types.d.ts +82 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/types.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/types.js +7 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/types.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/utils.d.ts +49 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/utils.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/utils.js +80 -0
- package/dist/src/smart-contracts/use-cases/bridge/kalvora/utils.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/constants.d.ts +84 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/constants.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/constants.js +82 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/constants.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/index.d.ts +58 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/index.js +90 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/index.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/burn.d.ts +26 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/burn.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/burn.js +59 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/burn.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/helpers.d.ts +29 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/helpers.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/helpers.js +50 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/helpers.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/index.d.ts +14 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/index.js +31 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/index.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/lock.d.ts +70 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/lock.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/lock.js +212 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/lock.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/mint.d.ts +60 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/mint.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/mint.js +288 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/mint.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/registration.d.ts +54 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/registration.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/registration.js +186 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/registration.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/release.d.ts +96 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/release.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/release.js +406 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/release.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/token-type.d.ts +34 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/token-type.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/token-type.js +55 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/token-type.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/types.d.ts +377 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/types.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/types.js +9 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/types.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/utils.d.ts +121 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/utils.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/utils.js +219 -0
- package/dist/src/smart-contracts/use-cases/bridge/solana/utils.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/index.d.ts +58 -0
- package/dist/src/smart-contracts/use-cases/dex/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/index.js +73 -0
- package/dist/src/smart-contracts/use-cases/dex/index.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/add-liquidity.d.ts +34 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/add-liquidity.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/add-liquidity.js +68 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/add-liquidity.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/create-pool.d.ts +35 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/create-pool.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/create-pool.js +69 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/create-pool.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/index.d.ts +11 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/index.js +11 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/index.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/remove-liquidity.d.ts +40 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/remove-liquidity.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/remove-liquidity.js +76 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/remove-liquidity.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/swap.d.ts +38 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/swap.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/swap.js +70 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/swap.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/unlock-liquidity.d.ts +37 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/unlock-liquidity.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/unlock-liquidity.js +60 -0
- package/dist/src/smart-contracts/use-cases/dex/transactions/unlock-liquidity.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/types.d.ts +130 -0
- package/dist/src/smart-contracts/use-cases/dex/types.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/types.js +11 -0
- package/dist/src/smart-contracts/use-cases/dex/types.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/utils.d.ts +52 -0
- package/dist/src/smart-contracts/use-cases/dex/utils.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/dex/utils.js +79 -0
- package/dist/src/smart-contracts/use-cases/dex/utils.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/index.d.ts +35 -0
- package/dist/src/smart-contracts/use-cases/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/index.js +35 -0
- package/dist/src/smart-contracts/use-cases/index.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/index.d.ts +67 -0
- package/dist/src/smart-contracts/use-cases/staking/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/index.js +84 -0
- package/dist/src/smart-contracts/use-cases/staking/index.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/index.d.ts +12 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/index.js +12 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/index.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/instant-stake.d.ts +36 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/instant-stake.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/instant-stake.js +57 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/instant-stake.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/release-instant.d.ts +33 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/release-instant.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/release-instant.js +49 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/release-instant.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/release-liquid-stake.d.ts +33 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/release-liquid-stake.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/release-liquid-stake.js +49 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/release-liquid-stake.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/stake.d.ts +36 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/stake.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/stake.js +59 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/stake.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/update-instant-wallet.d.ts +36 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/update-instant-wallet.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/update-instant-wallet.js +57 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/update-instant-wallet.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/update-wallet.d.ts +36 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/update-wallet.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/update-wallet.js +57 -0
- package/dist/src/smart-contracts/use-cases/staking/transactions/update-wallet.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/types.d.ts +76 -0
- package/dist/src/smart-contracts/use-cases/staking/types.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/types.js +10 -0
- package/dist/src/smart-contracts/use-cases/staking/types.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/utils.d.ts +27 -0
- package/dist/src/smart-contracts/use-cases/staking/utils.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/staking/utils.js +44 -0
- package/dist/src/smart-contracts/use-cases/staking/utils.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/index.d.ts +26 -0
- package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/index.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/index.js +107 -0
- package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/index.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/resolve-indexer.d.ts +18 -0
- package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/resolve-indexer.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/resolve-indexer.js +37 -0
- package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/resolve-indexer.js.map +1 -0
- package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/types.d.ts +126 -0
- package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/types.d.ts.map +1 -0
- package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/types.js +10 -0
- package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/types.js.map +1 -0
- package/dist/src/types/index.d.ts +240 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/index.js +110 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/validator-ops/index.d.ts +2 -0
- package/dist/src/validator-ops/index.d.ts.map +1 -0
- package/dist/src/validator-ops/index.js +2 -0
- package/dist/src/validator-ops/index.js.map +1 -0
- package/dist/src/validator-ops/transaction.d.ts +312 -0
- package/dist/src/validator-ops/transaction.d.ts.map +1 -0
- package/dist/src/validator-ops/transaction.js +416 -0
- package/dist/src/validator-ops/transaction.js.map +1 -0
- package/dist/src/vote/index.d.ts +5 -0
- package/dist/src/vote/index.d.ts.map +1 -0
- package/dist/src/vote/index.js +5 -0
- package/dist/src/vote/index.js.map +1 -0
- package/dist/src/vote/transaction.d.ts +70 -0
- package/dist/src/vote/transaction.d.ts.map +1 -0
- package/dist/src/vote/transaction.js +140 -0
- package/dist/src/vote/transaction.js.map +1 -0
- package/dist/src/wallet-creation/constants.d.ts +58 -0
- package/dist/src/wallet-creation/constants.d.ts.map +1 -0
- package/dist/src/wallet-creation/constants.js +113 -0
- package/dist/src/wallet-creation/constants.js.map +1 -0
- package/dist/src/wallet-creation/crypto-core.d.ts +178 -0
- package/dist/src/wallet-creation/crypto-core.d.ts.map +1 -0
- package/dist/src/wallet-creation/crypto-core.js +516 -0
- package/dist/src/wallet-creation/crypto-core.js.map +1 -0
- package/dist/src/wallet-creation/errors.d.ts +58 -0
- package/dist/src/wallet-creation/errors.d.ts.map +1 -0
- package/dist/src/wallet-creation/errors.js +89 -0
- package/dist/src/wallet-creation/errors.js.map +1 -0
- package/dist/src/wallet-creation/hash-utils.d.ts +38 -0
- package/dist/src/wallet-creation/hash-utils.d.ts.map +1 -0
- package/dist/src/wallet-creation/hash-utils.js +147 -0
- package/dist/src/wallet-creation/hash-utils.js.map +1 -0
- package/dist/src/wallet-creation/hd-utils.d.ts +45 -0
- package/dist/src/wallet-creation/hd-utils.d.ts.map +1 -0
- package/dist/src/wallet-creation/hd-utils.js +110 -0
- package/dist/src/wallet-creation/hd-utils.js.map +1 -0
- package/dist/src/wallet-creation/index.d.ts +11 -0
- package/dist/src/wallet-creation/index.d.ts.map +1 -0
- package/dist/src/wallet-creation/index.js +21 -0
- package/dist/src/wallet-creation/index.js.map +1 -0
- package/dist/src/wallet-creation/shared.d.ts +60 -0
- package/dist/src/wallet-creation/shared.d.ts.map +1 -0
- package/dist/src/wallet-creation/shared.js +127 -0
- package/dist/src/wallet-creation/shared.js.map +1 -0
- package/dist/src/wallet-creation/wallet-factory.d.ts +107 -0
- package/dist/src/wallet-creation/wallet-factory.d.ts.map +1 -0
- package/dist/src/wallet-creation/wallet-factory.js +298 -0
- package/dist/src/wallet-creation/wallet-factory.js.map +1 -0
- package/dist/wallet.d.ts +17 -0
- package/dist/wallet.d.ts.map +1 -0
- package/dist/wallet.js +17 -0
- package/dist/wallet.js.map +1 -0
- package/package.json +129 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query Module — typed, read-only access to Kalvora network state.
|
|
3
|
+
*
|
|
4
|
+
* - {@link KalvoraQueryClient}: `APIService` (wallets, contracts, fees,
|
|
5
|
+
* blocks, governance ledger, smart contract events, raw database).
|
|
6
|
+
* - {@link ValidatorQueryClient}: read-only `ValidatorService` subset.
|
|
7
|
+
* - {@link GuardianQueryClient}: bridge guardian payloads, prices, mint info.
|
|
8
|
+
* - Pure decoders for blocks, transaction results, and scaled values.
|
|
9
|
+
*
|
|
10
|
+
* @module query
|
|
11
|
+
*/
|
|
12
|
+
export { KalvoraQueryClient, createQueryClient, CONFIRMATION_LEVEL, DATABASE_TYPE, PROPOSAL_TYPE, PROPOSAL_PHASE, PRE_GOVERNANCE_OUTCOME } from './api-client.js';
|
|
13
|
+
export { ValidatorQueryClient, createValidatorQueryClient } from './validator-client.js';
|
|
14
|
+
export { GuardianQueryClient, createGuardianQueryClient, NETWORK_TYPE, NETWORK_TYPE_KALVORA } from './guardian-client.js';
|
|
15
|
+
export { USD_SCALE, decodeContractSupply, findTransactionResult, formatScaled, listBlockTransactions, parseUintString, partsToWhole, summarizeBlock, toTransactionResult } from './decoders.js';
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/query/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,cAAc,EACd,sBAAsB,EAcvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAE3B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,YAAY,EACZ,oBAAoB,EAErB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,mBAAmB,EAKpB,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validator Query Client — read-only subset of `kal_validator.ValidatorService`.
|
|
3
|
+
*
|
|
4
|
+
* `ValidatorService` is primarily a node-to-node protocol (block sync,
|
|
5
|
+
* gossip, attestation streams). This client wraps only the operations that are
|
|
6
|
+
* useful to applications and node operators:
|
|
7
|
+
*
|
|
8
|
+
* | Method | RPC | Auth |
|
|
9
|
+
* |------------------------|---------------------|-------------------------|
|
|
10
|
+
* | {@link getNonce} | `Nonce` | none |
|
|
11
|
+
* | {@link getBalance} | `Balance` | none |
|
|
12
|
+
* | {@link getCheckpointInfo} | `GetCheckpointInfo` | signed request |
|
|
13
|
+
* | {@link syncValidatorList} | `SyncValidatorList` | signed request |
|
|
14
|
+
*
|
|
15
|
+
* ## Signed requests
|
|
16
|
+
* Authenticated requests carry the caller's `public_key` and a `signature`
|
|
17
|
+
* over the protobuf encoding of the request **with `signature` unset**
|
|
18
|
+
* (verified against a live node). The node also rejects timestamps that are
|
|
19
|
+
* too far from its clock, so build requests right before sending them.
|
|
20
|
+
*
|
|
21
|
+
* Streaming and block-production RPCs are intentionally not exposed; use the
|
|
22
|
+
* raw client (`.raw`) if you operate a validator.
|
|
23
|
+
*
|
|
24
|
+
* @module query/validator-client
|
|
25
|
+
*/
|
|
26
|
+
import type { Client } from '@connectrpc/connect';
|
|
27
|
+
import { type PublicKey, type Validator } from '../../proto/generated/txn_pb.js';
|
|
28
|
+
import { ValidatorService } from '../../proto/generated/validator_pb.js';
|
|
29
|
+
import type { KalvoraSigner } from '../sign/signer.js';
|
|
30
|
+
import type { GRPCConfig } from '../types/index.js';
|
|
31
|
+
/** Latest validator state checkpoint advertised by a node. */
|
|
32
|
+
export interface CheckpointInfo {
|
|
33
|
+
/** Checkpoint version identifier, e.g. `v100002`. */
|
|
34
|
+
version: string;
|
|
35
|
+
/** Block height captured by the checkpoint. */
|
|
36
|
+
blockHeight: bigint;
|
|
37
|
+
/** Lower-case hex hash of the checkpoint block. */
|
|
38
|
+
blockHash: string;
|
|
39
|
+
/** Size of the checkpoint archive (tar.gz) in bytes. */
|
|
40
|
+
totalSize: bigint;
|
|
41
|
+
/** Creation time. */
|
|
42
|
+
createdAt: Date | undefined;
|
|
43
|
+
/** Lower-case hex SHA3-256 hash of the checkpoint archive (`''` from older nodes). */
|
|
44
|
+
fileHash: string;
|
|
45
|
+
/** Original public key of the validator that created and signed the checkpoint. */
|
|
46
|
+
publicKey: PublicKey | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Signature by `publicKey` over the `CheckpointInfo` message with the
|
|
49
|
+
* signature field excluded. Returned as received; the SDK does not verify it.
|
|
50
|
+
*/
|
|
51
|
+
signature: Uint8Array;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Typed client for the read-only subset of `kal_validator.ValidatorService`.
|
|
55
|
+
* Construct with {@link createValidatorQueryClient}.
|
|
56
|
+
*/
|
|
57
|
+
export declare class ValidatorQueryClient {
|
|
58
|
+
/** Raw generated ConnectRPC client (errors normalised to `KalvoraRpcError`). */
|
|
59
|
+
readonly raw: Client<typeof ValidatorService>;
|
|
60
|
+
/** @param config - Endpoint / transport configuration */
|
|
61
|
+
constructor(config?: GRPCConfig);
|
|
62
|
+
/**
|
|
63
|
+
* Current nonce of a wallet as seen by the validator.
|
|
64
|
+
*
|
|
65
|
+
* Unlike `APIService.Nonce`, validators report unknown wallets as an error
|
|
66
|
+
* (`CANCELED: Wallet address does not exist.`).
|
|
67
|
+
*/
|
|
68
|
+
getNonce(address: string): Promise<bigint>;
|
|
69
|
+
/** Balance (smallest units) of one token in a wallet, as seen by the validator. */
|
|
70
|
+
getBalance(address: string, contractId: string): Promise<bigint>;
|
|
71
|
+
/**
|
|
72
|
+
* Latest state checkpoint of the node (signed request).
|
|
73
|
+
*
|
|
74
|
+
* @param signer - Any signer; the node verifies the signature but does not
|
|
75
|
+
* require the key to belong to a validator.
|
|
76
|
+
* @param now - Request timestamp (default: current time)
|
|
77
|
+
* @throws KalvoraRpcError `NOT_FOUND` when the node has no checkpoint,
|
|
78
|
+
* `UNAUTHENTICATED` on a bad signature, `INVALID_ARGUMENT` on clock skew
|
|
79
|
+
*/
|
|
80
|
+
getCheckpointInfo(signer: KalvoraSigner, now?: Date): Promise<CheckpointInfo>;
|
|
81
|
+
/**
|
|
82
|
+
* Current validator set (signed request).
|
|
83
|
+
*
|
|
84
|
+
* Note: public gateways commonly do not route this RPC and answer
|
|
85
|
+
* `UNIMPLEMENTED`; call a validator directly.
|
|
86
|
+
*/
|
|
87
|
+
syncValidatorList(signer: KalvoraSigner): Promise<Validator[]>;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Create a {@link ValidatorQueryClient}.
|
|
91
|
+
*
|
|
92
|
+
* @param config - Endpoint / transport configuration
|
|
93
|
+
*/
|
|
94
|
+
export declare function createValidatorQueryClient(config?: GRPCConfig): ValidatorQueryClient;
|
|
95
|
+
//# sourceMappingURL=validator-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator-client.d.ts","sourceRoot":"","sources":["../../../src/query/validator-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAClG,OAAO,EAIL,gBAAgB,EAEjB,MAAM,uCAAuC,CAAC;AAK/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIpD,8DAA8D;AAC9D,MAAM,WAAW,cAAc;IAC7B,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,SAAS,EAAE,IAAI,GAAG,SAAS,CAAC;IAC5B,sFAAsF;IACtF,QAAQ,EAAE,MAAM,CAAC;IACjB,mFAAmF;IACnF,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC;;;OAGG;IACH,SAAS,EAAE,UAAU,CAAC;CACvB;AAED;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B,gFAAgF;IAChF,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC;IAE9C,yDAAyD;gBAC7C,MAAM,GAAE,UAAe;IAInC;;;;;OAKG;IACG,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAOhD,mFAAmF;IAC7E,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAStE;;;;;;;;OAQG;IACG,iBAAiB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,GAAE,IAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;IAoB/F;;;;;OAKG;IACG,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;CAQrE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,GAAE,UAAe,GAAG,oBAAoB,CAExF"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validator Query Client — read-only subset of `kal_validator.ValidatorService`.
|
|
3
|
+
*
|
|
4
|
+
* `ValidatorService` is primarily a node-to-node protocol (block sync,
|
|
5
|
+
* gossip, attestation streams). This client wraps only the operations that are
|
|
6
|
+
* useful to applications and node operators:
|
|
7
|
+
*
|
|
8
|
+
* | Method | RPC | Auth |
|
|
9
|
+
* |------------------------|---------------------|-------------------------|
|
|
10
|
+
* | {@link getNonce} | `Nonce` | none |
|
|
11
|
+
* | {@link getBalance} | `Balance` | none |
|
|
12
|
+
* | {@link getCheckpointInfo} | `GetCheckpointInfo` | signed request |
|
|
13
|
+
* | {@link syncValidatorList} | `SyncValidatorList` | signed request |
|
|
14
|
+
*
|
|
15
|
+
* ## Signed requests
|
|
16
|
+
* Authenticated requests carry the caller's `public_key` and a `signature`
|
|
17
|
+
* over the protobuf encoding of the request **with `signature` unset**
|
|
18
|
+
* (verified against a live node). The node also rejects timestamps that are
|
|
19
|
+
* too far from its clock, so build requests right before sending them.
|
|
20
|
+
*
|
|
21
|
+
* Streaming and block-production RPCs are intentionally not exposed; use the
|
|
22
|
+
* raw client (`.raw`) if you operate a validator.
|
|
23
|
+
*
|
|
24
|
+
* @module query/validator-client
|
|
25
|
+
*/
|
|
26
|
+
import { create, toBinary } from '@bufbuild/protobuf';
|
|
27
|
+
import { TimestampSchema } from '../../proto/generated/google/protobuf/timestamp_pb.js';
|
|
28
|
+
import { PublicKeySchema } from '../../proto/generated/txn_pb.js';
|
|
29
|
+
import { BalanceRequestSchema, CheckpointInfoRequestSchema, NonceRequestSchema, ValidatorService, ValidatorSyncRequestSchema } from '../../proto/generated/validator_pb.js';
|
|
30
|
+
import { createClient } from '../grpc/client-factory.js';
|
|
31
|
+
import { getPublicKeyBytes } from '../shared/crypto/address-utils.js';
|
|
32
|
+
import { parseAddress, requireContractId, toTimestampInit } from '../shared/tx/standard.js';
|
|
33
|
+
import { bytesToHex } from '../shared/utils/byte-utils.js';
|
|
34
|
+
import { parseUintString } from './decoders.js';
|
|
35
|
+
/**
|
|
36
|
+
* Typed client for the read-only subset of `kal_validator.ValidatorService`.
|
|
37
|
+
* Construct with {@link createValidatorQueryClient}.
|
|
38
|
+
*/
|
|
39
|
+
export class ValidatorQueryClient {
|
|
40
|
+
/** @param config - Endpoint / transport configuration */
|
|
41
|
+
constructor(config = {}) {
|
|
42
|
+
this.raw = createClient(ValidatorService, config);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Current nonce of a wallet as seen by the validator.
|
|
46
|
+
*
|
|
47
|
+
* Unlike `APIService.Nonce`, validators report unknown wallets as an error
|
|
48
|
+
* (`CANCELED: Wallet address does not exist.`).
|
|
49
|
+
*/
|
|
50
|
+
async getNonce(address) {
|
|
51
|
+
const response = await this.raw.nonce(create(NonceRequestSchema, {
|
|
52
|
+
walletAddress: parseAddress(address, 'address')
|
|
53
|
+
}));
|
|
54
|
+
return response.nonce;
|
|
55
|
+
}
|
|
56
|
+
/** Balance (smallest units) of one token in a wallet, as seen by the validator. */
|
|
57
|
+
async getBalance(address, contractId) {
|
|
58
|
+
const response = await this.raw.balance(create(BalanceRequestSchema, {
|
|
59
|
+
walletAddress: parseAddress(address, 'address'),
|
|
60
|
+
contractId: requireContractId(contractId),
|
|
61
|
+
encoded: false
|
|
62
|
+
}));
|
|
63
|
+
return parseUintString(response.balance, 'balance');
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Latest state checkpoint of the node (signed request).
|
|
67
|
+
*
|
|
68
|
+
* @param signer - Any signer; the node verifies the signature but does not
|
|
69
|
+
* require the key to belong to a validator.
|
|
70
|
+
* @param now - Request timestamp (default: current time)
|
|
71
|
+
* @throws KalvoraRpcError `NOT_FOUND` when the node has no checkpoint,
|
|
72
|
+
* `UNAUTHENTICATED` on a bad signature, `INVALID_ARGUMENT` on clock skew
|
|
73
|
+
*/
|
|
74
|
+
async getCheckpointInfo(signer, now = new Date()) {
|
|
75
|
+
const request = create(CheckpointInfoRequestSchema, {
|
|
76
|
+
publicKey: create(PublicKeySchema, { single: new Uint8Array(getPublicKeyBytes(signer.publicKey)) }),
|
|
77
|
+
timestamp: create(TimestampSchema, toTimestampInit(now, 'now'))
|
|
78
|
+
});
|
|
79
|
+
request.signature = await signer.sign(toBinary(CheckpointInfoRequestSchema, request));
|
|
80
|
+
const response = await this.raw.getCheckpointInfo(request);
|
|
81
|
+
const created = response.createdAt;
|
|
82
|
+
return {
|
|
83
|
+
version: response.version,
|
|
84
|
+
blockHeight: response.blockHeight,
|
|
85
|
+
blockHash: bytesToHex(response.blockHash),
|
|
86
|
+
totalSize: response.totalSize,
|
|
87
|
+
createdAt: created ? new Date(Number(created.seconds) * 1000 + Math.floor(created.nanos / 1000000)) : undefined,
|
|
88
|
+
fileHash: bytesToHex(response.fileHash),
|
|
89
|
+
publicKey: response.publicKey,
|
|
90
|
+
signature: response.signature
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Current validator set (signed request).
|
|
95
|
+
*
|
|
96
|
+
* Note: public gateways commonly do not route this RPC and answer
|
|
97
|
+
* `UNIMPLEMENTED`; call a validator directly.
|
|
98
|
+
*/
|
|
99
|
+
async syncValidatorList(signer) {
|
|
100
|
+
const request = create(ValidatorSyncRequestSchema, {
|
|
101
|
+
publicKey: create(PublicKeySchema, { single: new Uint8Array(getPublicKeyBytes(signer.publicKey)) })
|
|
102
|
+
});
|
|
103
|
+
request.signature = await signer.sign(toBinary(ValidatorSyncRequestSchema, request));
|
|
104
|
+
const response = await this.raw.syncValidatorList(request);
|
|
105
|
+
return response.validators;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Create a {@link ValidatorQueryClient}.
|
|
110
|
+
*
|
|
111
|
+
* @param config - Endpoint / transport configuration
|
|
112
|
+
*/
|
|
113
|
+
export function createValidatorQueryClient(config = {}) {
|
|
114
|
+
return new ValidatorQueryClient(config);
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=validator-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator-client.js","sourceRoot":"","sources":["../../../src/query/validator-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAC;AACxF,OAAO,EAAE,eAAe,EAAkC,MAAM,iCAAiC,CAAC;AAClG,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,gBAAgB,EAChB,0BAA0B,EAC3B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAyBhD;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAI/B,yDAAyD;IACzD,YAAY,SAAqB,EAAE;QACjC,IAAI,CAAC,GAAG,GAAG,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ,CAAC,OAAe;QAC5B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,kBAAkB,EAAE;YAC/D,aAAa,EAAE,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC;SAChD,CAAC,CAAC,CAAC;QACJ,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;IAED,mFAAmF;IACnF,KAAK,CAAC,UAAU,CAAC,OAAe,EAAE,UAAkB;QAClD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE;YACnE,aAAa,EAAE,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC;YAC/C,UAAU,EAAE,iBAAiB,CAAC,UAAU,CAAC;YACzC,OAAO,EAAE,KAAK;SACf,CAAC,CAAC,CAAC;QACJ,OAAO,eAAe,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACtD,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,iBAAiB,CAAC,MAAqB,EAAE,MAAY,IAAI,IAAI,EAAE;QACnE,MAAM,OAAO,GAAG,MAAM,CAAC,2BAA2B,EAAE;YAClD,SAAS,EAAE,MAAM,CAAC,eAAe,EAAE,EAAE,MAAM,EAAE,IAAI,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;YACnG,SAAS,EAAE,MAAM,CAAC,eAAe,EAAE,eAAe,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAChE,CAAC,CAAC;QACH,OAAO,CAAC,SAAS,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC,CAAC;QACtF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3D,MAAM,OAAO,GAAG,QAAQ,CAAC,SAAS,CAAC;QACnC,OAAO;YACL,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,SAAS,EAAE,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC;YACzC,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,GAAG,OAAS,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;YACjH,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC;YACvC,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,SAAS,EAAE,QAAQ,CAAC,SAAS;SAC9B,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,iBAAiB,CAAC,MAAqB;QAC3C,MAAM,OAAO,GAAG,MAAM,CAAC,0BAA0B,EAAE;YACjD,SAAS,EAAE,MAAM,CAAC,eAAe,EAAE,EAAE,MAAM,EAAE,IAAI,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;SACpG,CAAC,CAAC;QACH,OAAO,CAAC,SAAS,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,CAAC;QACrF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3D,OAAO,QAAQ,CAAC,UAAU,CAAC;IAC7B,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,SAAqB,EAAE;IAChE,OAAO,IAAI,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/revoke/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,EACf,aAAa,EACb,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/revoke/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,EACf,aAAa,EAGd,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transaction Module - RevokeTXN
|
|
3
|
+
*
|
|
4
|
+
* Builds, signs, and submits Kalvora item revocation transactions. A
|
|
5
|
+
* `RevokeTXN` lets a contract authority forcibly take back a specific
|
|
6
|
+
* NFT / SBT item (identified by `itemId`) from the wallet currently holding it.
|
|
7
|
+
*
|
|
8
|
+
* All envelope handling (nonce, `BaseTXN`, fees) is delegated to the shared
|
|
9
|
+
* standard transaction pipeline in `shared/tx/standard`.
|
|
10
|
+
*
|
|
11
|
+
* @module revoke/transaction
|
|
12
|
+
*/
|
|
13
|
+
import { type RevokeTXN } from '../../proto/generated/txn_pb.js';
|
|
14
|
+
import { type StandardTXNOptions } from '../shared/tx/standard.js';
|
|
15
|
+
import type { GRPCConfig } from '../types/index.js';
|
|
16
|
+
/**
|
|
17
|
+
* Options accepted by {@link buildRevokeTXN} and {@link createRevokeTXN}.
|
|
18
|
+
*
|
|
19
|
+
* Identical to the shared {@link StandardTXNOptions}. Pass both `nonce` and
|
|
20
|
+
* `feeAmountParts` to build fully offline and deterministically.
|
|
21
|
+
*/
|
|
22
|
+
export type RevokeTXNOptions = StandardTXNOptions;
|
|
23
|
+
/**
|
|
24
|
+
* Readable input for a {@link RevokeTXN}.
|
|
25
|
+
*/
|
|
26
|
+
export interface RevokeTXNInput {
|
|
27
|
+
/** NFT / SBT contract that issued the item (canonical mint ID, e.g. `KALSBT001`). */
|
|
28
|
+
contractId: string;
|
|
29
|
+
/**
|
|
30
|
+
* Base58 wallet address that currently holds the item and from which it is
|
|
31
|
+
* revoked.
|
|
32
|
+
*/
|
|
33
|
+
recipientAddress: string;
|
|
34
|
+
/**
|
|
35
|
+
* Item identifier within the contract, exactly as it was minted (for
|
|
36
|
+
* example `'1'` or `'42'`). Must be non-empty and have no surrounding
|
|
37
|
+
* whitespace.
|
|
38
|
+
*/
|
|
39
|
+
itemId: string;
|
|
40
|
+
/**
|
|
41
|
+
* Base58 public key identifier of the signer (e.g. `A_…`). The key must be
|
|
42
|
+
* a restricted key on the contract with the `revoke` permission.
|
|
43
|
+
*/
|
|
44
|
+
publicKey: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Build an **unsigned** {@link RevokeTXN}.
|
|
48
|
+
*
|
|
49
|
+
* On-chain, a revoke transaction removes item `itemId` of `contractId` from
|
|
50
|
+
* `recipientAddress` (typically used for soul-bound tokens, credentials, and
|
|
51
|
+
* licences that the issuer must be able to withdraw). Validators accept it
|
|
52
|
+
* only if the signer's public key is a `RestrictedKey` of the contract with
|
|
53
|
+
* `revoke = true`. With a `time_delay` on that key the revocation is held
|
|
54
|
+
* pending and can be quashed until the delay elapses.
|
|
55
|
+
*
|
|
56
|
+
* Unless both `options.nonce` and `options.feeAmountParts` are set, this
|
|
57
|
+
* function queries the network for the signer's next nonce and the base fee.
|
|
58
|
+
*
|
|
59
|
+
* @param input - Revoke parameters (see {@link RevokeTXNInput})
|
|
60
|
+
* @param options - Shared standard transaction options
|
|
61
|
+
* @returns The unsigned protobuf `RevokeTXN`
|
|
62
|
+
*
|
|
63
|
+
* @throws Error when `contractId` is not a canonical mint ID,
|
|
64
|
+
* `recipientAddress` is not valid base58, `itemId` is empty or padded with
|
|
65
|
+
* whitespace, `publicKey` is missing, or any shared option is invalid.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* import { buildRevokeTXN } from 'kalvora.js';
|
|
70
|
+
*
|
|
71
|
+
* const txn = await buildRevokeTXN(
|
|
72
|
+
* {
|
|
73
|
+
* contractId: 'KALSBT001',
|
|
74
|
+
* recipientAddress: '<holder base58 address>',
|
|
75
|
+
* itemId: '17',
|
|
76
|
+
* publicKey: 'A_<signer base58 public key>'
|
|
77
|
+
* },
|
|
78
|
+
* { nonce: 3, feeAmountParts: '1000' } // offline + deterministic
|
|
79
|
+
* );
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export declare function buildRevokeTXN(input: RevokeTXNInput, options?: RevokeTXNOptions): Promise<RevokeTXN>;
|
|
83
|
+
/**
|
|
84
|
+
* Build and sign a {@link RevokeTXN} with a private key.
|
|
85
|
+
*
|
|
86
|
+
* Equivalent to {@link buildRevokeTXN} followed by `signWithKey`. The signer
|
|
87
|
+
* (`input.publicKey`) needs the `revoke` permission on the contract.
|
|
88
|
+
*
|
|
89
|
+
* @param input - Revoke parameters
|
|
90
|
+
* @param privateKey - Signer's base58 private key (matching `input.publicKey`)
|
|
91
|
+
* @param options - Shared standard transaction options
|
|
92
|
+
* @returns The signed `RevokeTXN` (with `base.signature` and `base.hash`)
|
|
93
|
+
*
|
|
94
|
+
* @throws Error when `privateKey` is missing, on any validation error from
|
|
95
|
+
* {@link buildRevokeTXN}, or when signing fails.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```typescript
|
|
99
|
+
* const signed = await createRevokeTXN(
|
|
100
|
+
* { contractId: 'KALSBT001', recipientAddress, itemId: '17', publicKey },
|
|
101
|
+
* privateKey
|
|
102
|
+
* );
|
|
103
|
+
* const hash = await sendRevokeTXN(signed);
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
export declare function createRevokeTXN(input: RevokeTXNInput, privateKey: string, options?: RevokeTXNOptions): Promise<RevokeTXN>;
|
|
107
|
+
/**
|
|
108
|
+
* Submit a signed {@link RevokeTXN} to the network (`TXNService.Revoke`).
|
|
109
|
+
*
|
|
110
|
+
* @param txn - Signed revoke transaction (from {@link createRevokeTXN})
|
|
111
|
+
* @param grpcConfig - Endpoint configuration (defaults to SDK defaults)
|
|
112
|
+
* @returns Hex transaction hash
|
|
113
|
+
*
|
|
114
|
+
* @throws Error when the transaction is unsigned (missing signature/hash) or
|
|
115
|
+
* the network rejects it.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```typescript
|
|
119
|
+
* const hash = await sendRevokeTXN(signed, { host: 'kal-proto.visiondynamics.ch' });
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
export declare function sendRevokeTXN(txn: RevokeTXN, grpcConfig?: GRPCConfig): Promise<string>;
|
|
123
|
+
//# sourceMappingURL=transaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/revoke/transaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,qFAAqF;IACrF,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAAE,cAAc,EACrB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,SAAS,CAAC,CAgBpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,cAAc,EACrB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,SAAS,CAAC,CAMpB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,SAAS,EAAE,UAAU,GAAE,UAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAEhG"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transaction Module - RevokeTXN
|
|
3
|
+
*
|
|
4
|
+
* Builds, signs, and submits Kalvora item revocation transactions. A
|
|
5
|
+
* `RevokeTXN` lets a contract authority forcibly take back a specific
|
|
6
|
+
* NFT / SBT item (identified by `itemId`) from the wallet currently holding it.
|
|
7
|
+
*
|
|
8
|
+
* All envelope handling (nonce, `BaseTXN`, fees) is delegated to the shared
|
|
9
|
+
* standard transaction pipeline in `shared/tx/standard`.
|
|
10
|
+
*
|
|
11
|
+
* @module revoke/transaction
|
|
12
|
+
*/
|
|
13
|
+
import { RevokeTXNSchema } from '../../proto/generated/txn_pb.js';
|
|
14
|
+
import { buildStandardTransaction, parseAddress, requireContractId, submitStandardTransaction } from '../shared/tx/standard.js';
|
|
15
|
+
import { signWithKey } from '../sign/finalize.js';
|
|
16
|
+
function parseItemId(value) {
|
|
17
|
+
if (typeof value !== 'string' || value === '') {
|
|
18
|
+
throw new Error('itemId must be a non-empty string');
|
|
19
|
+
}
|
|
20
|
+
if (value.trim() !== value) {
|
|
21
|
+
throw new Error('itemId must not contain leading or trailing whitespace');
|
|
22
|
+
}
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Build an **unsigned** {@link RevokeTXN}.
|
|
27
|
+
*
|
|
28
|
+
* On-chain, a revoke transaction removes item `itemId` of `contractId` from
|
|
29
|
+
* `recipientAddress` (typically used for soul-bound tokens, credentials, and
|
|
30
|
+
* licences that the issuer must be able to withdraw). Validators accept it
|
|
31
|
+
* only if the signer's public key is a `RestrictedKey` of the contract with
|
|
32
|
+
* `revoke = true`. With a `time_delay` on that key the revocation is held
|
|
33
|
+
* pending and can be quashed until the delay elapses.
|
|
34
|
+
*
|
|
35
|
+
* Unless both `options.nonce` and `options.feeAmountParts` are set, this
|
|
36
|
+
* function queries the network for the signer's next nonce and the base fee.
|
|
37
|
+
*
|
|
38
|
+
* @param input - Revoke parameters (see {@link RevokeTXNInput})
|
|
39
|
+
* @param options - Shared standard transaction options
|
|
40
|
+
* @returns The unsigned protobuf `RevokeTXN`
|
|
41
|
+
*
|
|
42
|
+
* @throws Error when `contractId` is not a canonical mint ID,
|
|
43
|
+
* `recipientAddress` is not valid base58, `itemId` is empty or padded with
|
|
44
|
+
* whitespace, `publicKey` is missing, or any shared option is invalid.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* import { buildRevokeTXN } from 'kalvora.js';
|
|
49
|
+
*
|
|
50
|
+
* const txn = await buildRevokeTXN(
|
|
51
|
+
* {
|
|
52
|
+
* contractId: 'KALSBT001',
|
|
53
|
+
* recipientAddress: '<holder base58 address>',
|
|
54
|
+
* itemId: '17',
|
|
55
|
+
* publicKey: 'A_<signer base58 public key>'
|
|
56
|
+
* },
|
|
57
|
+
* { nonce: 3, feeAmountParts: '1000' } // offline + deterministic
|
|
58
|
+
* );
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export async function buildRevokeTXN(input, options = {}) {
|
|
62
|
+
if (input === null || typeof input !== 'object') {
|
|
63
|
+
throw new Error('buildRevokeTXN: input object is required');
|
|
64
|
+
}
|
|
65
|
+
const contractId = requireContractId(input.contractId, 'contractId');
|
|
66
|
+
const recipientAddress = parseAddress(input.recipientAddress, 'recipientAddress');
|
|
67
|
+
const itemId = parseItemId(input.itemId);
|
|
68
|
+
return buildStandardTransaction({
|
|
69
|
+
operation: 'buildRevokeTXN',
|
|
70
|
+
schema: RevokeTXNSchema,
|
|
71
|
+
publicKeyId: input.publicKey,
|
|
72
|
+
contractId,
|
|
73
|
+
fields: { contractId, recipientAddress, itemId },
|
|
74
|
+
options
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Build and sign a {@link RevokeTXN} with a private key.
|
|
79
|
+
*
|
|
80
|
+
* Equivalent to {@link buildRevokeTXN} followed by `signWithKey`. The signer
|
|
81
|
+
* (`input.publicKey`) needs the `revoke` permission on the contract.
|
|
82
|
+
*
|
|
83
|
+
* @param input - Revoke parameters
|
|
84
|
+
* @param privateKey - Signer's base58 private key (matching `input.publicKey`)
|
|
85
|
+
* @param options - Shared standard transaction options
|
|
86
|
+
* @returns The signed `RevokeTXN` (with `base.signature` and `base.hash`)
|
|
87
|
+
*
|
|
88
|
+
* @throws Error when `privateKey` is missing, on any validation error from
|
|
89
|
+
* {@link buildRevokeTXN}, or when signing fails.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```typescript
|
|
93
|
+
* const signed = await createRevokeTXN(
|
|
94
|
+
* { contractId: 'KALSBT001', recipientAddress, itemId: '17', publicKey },
|
|
95
|
+
* privateKey
|
|
96
|
+
* );
|
|
97
|
+
* const hash = await sendRevokeTXN(signed);
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
export async function createRevokeTXN(input, privateKey, options = {}) {
|
|
101
|
+
if (typeof privateKey !== 'string' || privateKey.trim() === '') {
|
|
102
|
+
throw new Error('privateKey is required');
|
|
103
|
+
}
|
|
104
|
+
const txn = await buildRevokeTXN(input, options);
|
|
105
|
+
return signWithKey(txn, privateKey, input.publicKey);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Submit a signed {@link RevokeTXN} to the network (`TXNService.Revoke`).
|
|
109
|
+
*
|
|
110
|
+
* @param txn - Signed revoke transaction (from {@link createRevokeTXN})
|
|
111
|
+
* @param grpcConfig - Endpoint configuration (defaults to SDK defaults)
|
|
112
|
+
* @returns Hex transaction hash
|
|
113
|
+
*
|
|
114
|
+
* @throws Error when the transaction is unsigned (missing signature/hash) or
|
|
115
|
+
* the network rejects it.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```typescript
|
|
119
|
+
* const hash = await sendRevokeTXN(signed, { host: 'kal-proto.visiondynamics.ch' });
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
export async function sendRevokeTXN(txn, grpcConfig = {}) {
|
|
123
|
+
return submitStandardTransaction(txn, grpcConfig);
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../src/revoke/transaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,eAAe,EAAkB,MAAM,iCAAiC,CAAC;AAClF,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,iBAAiB,EACjB,yBAAyB,EAE1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAmClD,SAAS,WAAW,CAAC,KAAc;IACjC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACvD,CAAC;IACD,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,KAAK,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC5E,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,KAAqB,EACrB,UAA4B,EAAE;IAE9B,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IACD,MAAM,UAAU,GAAG,iBAAiB,CAAC,KAAK,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACrE,MAAM,gBAAgB,GAAG,YAAY,CAAC,KAAK,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;IAClF,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzC,OAAO,wBAAwB,CAAC;QAC9B,SAAS,EAAE,gBAAgB;QAC3B,MAAM,EAAE,eAAe;QACvB,WAAW,EAAE,KAAK,CAAC,SAAS;QAC5B,UAAU;QACV,MAAM,EAAE,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE;QAChD,OAAO;KACR,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,KAAqB,EACrB,UAAkB,EAClB,UAA4B,EAAE;IAE9B,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAC/D,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC5C,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACjD,OAAO,WAAW,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;AACvD,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAc,EAAE,aAAyB,EAAE;IAC7E,OAAO,yBAAyB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Address Utilities for Kalvora SDK
|
|
3
|
+
*
|
|
4
|
+
* This module provides utilities for working with Kalvora addresses and public key identifiers.
|
|
5
|
+
*
|
|
6
|
+
* Address Format (current standard):
|
|
7
|
+
* Public Key Identifier: "A_<base58PublicKey>" (Ed25519) or "B_<base58PublicKey>" (Ed448)
|
|
8
|
+
* Address: base58 encoding of the raw public key bytes
|
|
9
|
+
*
|
|
10
|
+
* Legacy Format (still supported):
|
|
11
|
+
* Public Key Identifier: "A_c_<base58PublicKey>" (with hash type prefix)
|
|
12
|
+
* Address: base58 encoding of the hashed public key
|
|
13
|
+
*/
|
|
14
|
+
import type { KeyType, HashType } from './constants.js';
|
|
15
|
+
/**
|
|
16
|
+
* Generate Kalvora address from public key and optional hash types
|
|
17
|
+
*
|
|
18
|
+
* Current standard: address = base58(publicKey) — no hashing
|
|
19
|
+
* Legacy mode: when hashTypes are provided, applies hash chain before encoding
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateKalvoraAddress(publicKey: Uint8Array, keyType: KeyType, hashTypes?: HashType[]): string;
|
|
22
|
+
/**
|
|
23
|
+
* Generate Kalvora address from raw public key bytes with auto-detection
|
|
24
|
+
*
|
|
25
|
+
* Supports both new format ("A_<base58pubkey>") and legacy format ("A_c_<base58pubkey>").
|
|
26
|
+
*/
|
|
27
|
+
export declare function generateAddressFromPublicKey(publicKeyIdentifier: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Parse a base58 public key identifier and extract the address
|
|
30
|
+
*/
|
|
31
|
+
export declare function getAddressFromPublicKey(publicKeyIdentifier: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Validate if a string is a valid Kalvora public key identifier format
|
|
34
|
+
*/
|
|
35
|
+
export declare function isValidPublicKeyIdentifier(publicKeyIdentifier: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Extract key type from public key identifier
|
|
38
|
+
*/
|
|
39
|
+
export declare function getKeyTypeFromPublicKey(publicKeyIdentifier: string): KeyType;
|
|
40
|
+
/**
|
|
41
|
+
* Reconstruct public key identifier string from bytes (inverse of getPublicKeyBytes)
|
|
42
|
+
*
|
|
43
|
+
* The bytes are in the format: [ASCII prefix bytes] + [raw base58-decoded bytes]
|
|
44
|
+
* This function extracts the ASCII prefix and base58-encodes the remaining bytes.
|
|
45
|
+
*
|
|
46
|
+
* Supports both new format (A_ prefix) and legacy format (A_c_ prefix).
|
|
47
|
+
*
|
|
48
|
+
* @param bytes - The byte array from getPublicKeyBytes
|
|
49
|
+
* @returns The original public key identifier string (e.g., "A_<base58pubkey>")
|
|
50
|
+
*/
|
|
51
|
+
export declare function getPublicKeyIdentifierFromBytes(bytes: Uint8Array): string;
|
|
52
|
+
/**
|
|
53
|
+
* Extract public key identifier with decoded bytes
|
|
54
|
+
*/
|
|
55
|
+
export declare function getPublicKeyBytes(publicKeyIdentifier: string): Uint8Array;
|
|
56
|
+
/**
|
|
57
|
+
* Extract hash types from public key identifier
|
|
58
|
+
*
|
|
59
|
+
* Returns empty array for new-format identifiers (no hash types present).
|
|
60
|
+
* Returns the hash types for legacy-format identifiers.
|
|
61
|
+
*/
|
|
62
|
+
export declare function getHashTypesFromPublicKey(publicKeyIdentifier: string): HashType[];
|
|
63
|
+
/**
|
|
64
|
+
* Sanitizes (trims whitespace) and decodes a base58 address string.
|
|
65
|
+
*
|
|
66
|
+
* @param address - The base58 encoded address string.
|
|
67
|
+
* @returns The decoded address bytes.
|
|
68
|
+
* @throws Error if the address is invalid or cannot be decoded.
|
|
69
|
+
*/
|
|
70
|
+
export declare function sanitizeAndDecodeAddress(address: string): Uint8Array;
|
|
71
|
+
//# sourceMappingURL=address-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address-utils.d.ts","sourceRoot":"","sources":["../../../../src/shared/crypto/address-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAExD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,OAAO,EAChB,SAAS,GAAE,QAAQ,EAAO,GACzB,MAAM,CAwBR;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAqChF;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAG3E;AAGD;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAO/E;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAuB5E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAoEzE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,mBAAmB,EAAE,MAAM,GAAG,UAAU,CAiCzE;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,mBAAmB,EAAE,MAAM,GAAG,QAAQ,EAAE,CAoDjF;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAgBpE"}
|