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,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validator Fee Info Service
|
|
3
|
+
*
|
|
4
|
+
* Handles fee information retrieval from the Kalvora validator via gRPC.
|
|
5
|
+
* Uses the GetTokenFeeInfo API to get comprehensive token fee information.
|
|
6
|
+
*/
|
|
7
|
+
import { CONTRACT_FEE_TYPE } from '../../../../proto/generated/txn_pb.js';
|
|
8
|
+
import { createValidatorAPIClient } from '../../../grpc/api/validator-api-client.js';
|
|
9
|
+
import { logger } from '../../../shared/monitoring/index.js';
|
|
10
|
+
/**
|
|
11
|
+
* Helper to default empty strings to "0"
|
|
12
|
+
*/
|
|
13
|
+
function defaultToZero(val) {
|
|
14
|
+
return val && val.length > 0 ? val : '0';
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Helper to default empty denomination to "1"
|
|
18
|
+
*/
|
|
19
|
+
function defaultDenomination(val) {
|
|
20
|
+
return val && val.length > 0 ? val : '1';
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Get comprehensive token fee information from the validator
|
|
24
|
+
*
|
|
25
|
+
* @param params - Parameters to customize the fee information retrieval
|
|
26
|
+
* @param options - gRPC configuration options
|
|
27
|
+
* @returns Promise<TokenFeeInfoResponse> - Token fee information response
|
|
28
|
+
*/
|
|
29
|
+
export async function getTokenFeeInfo(params = {}, options = {}) {
|
|
30
|
+
try {
|
|
31
|
+
const client = createValidatorAPIClient(options);
|
|
32
|
+
// Call the new GetTokenFeeInfo API
|
|
33
|
+
const response = await client.getTokenFeeInfo({
|
|
34
|
+
contractIds: params.contractIds || []
|
|
35
|
+
});
|
|
36
|
+
// Process response to ensure defaults
|
|
37
|
+
response.tokens.forEach(token => {
|
|
38
|
+
// Default rate to "0" if empty
|
|
39
|
+
token.rate = defaultToZero(token.rate);
|
|
40
|
+
// Default denomination to "1" if empty (avoid division by zero/empty)
|
|
41
|
+
token.denomination = defaultDenomination(token.denomination);
|
|
42
|
+
// Default allowed_fees and used_fees to "0" if empty
|
|
43
|
+
token.allowedFees = defaultToZero(token.allowedFees);
|
|
44
|
+
token.usedFees = defaultToZero(token.usedFees);
|
|
45
|
+
if (token.contractFees) {
|
|
46
|
+
// Default fee amounts to "0" if empty
|
|
47
|
+
token.contractFees.fee = defaultToZero(token.contractFees.fee);
|
|
48
|
+
token.contractFees.burn = defaultToZero(token.contractFees.burn);
|
|
49
|
+
token.contractFees.validator = defaultToZero(token.contractFees.validator);
|
|
50
|
+
// Process contract fee type
|
|
51
|
+
const feeType = token.contractFees.contractFeeType;
|
|
52
|
+
// Always ensure contractFeeType is set to a valid numeric enum value
|
|
53
|
+
if (feeType === undefined || feeType === null) {
|
|
54
|
+
// Default to FIXED (value 0) if not specified by validator
|
|
55
|
+
token.contractFees.contractFeeType = CONTRACT_FEE_TYPE.FIXED;
|
|
56
|
+
}
|
|
57
|
+
else if (typeof feeType === 'string') {
|
|
58
|
+
// Handle string representations from validator
|
|
59
|
+
const feeTypeStr = feeType.toUpperCase();
|
|
60
|
+
switch (feeTypeStr) {
|
|
61
|
+
case 'FIXED':
|
|
62
|
+
token.contractFees.contractFeeType = CONTRACT_FEE_TYPE.FIXED;
|
|
63
|
+
break;
|
|
64
|
+
case 'CUR_EQUIVALENT':
|
|
65
|
+
token.contractFees.contractFeeType = CONTRACT_FEE_TYPE.CUR_EQUIVALENT;
|
|
66
|
+
break;
|
|
67
|
+
case 'PERCENTAGE':
|
|
68
|
+
token.contractFees.contractFeeType = CONTRACT_FEE_TYPE.PERCENTAGE;
|
|
69
|
+
break;
|
|
70
|
+
case 'NONE':
|
|
71
|
+
token.contractFees.contractFeeType = CONTRACT_FEE_TYPE.NONE;
|
|
72
|
+
break;
|
|
73
|
+
default:
|
|
74
|
+
logger.warn('Unknown contract fee type, defaulting to FIXED', {
|
|
75
|
+
contractId: token.contractId,
|
|
76
|
+
feeType,
|
|
77
|
+
operation: 'parseContractFeeType'
|
|
78
|
+
});
|
|
79
|
+
token.contractFees.contractFeeType = CONTRACT_FEE_TYPE.FIXED;
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
// Return the proto response directly
|
|
86
|
+
return response;
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
throw new Error(`Failed to get token fee info from validator: ${error.message}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../../src/api/validator/fee-info/request.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/validator/nonce/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/validator/nonce/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validator Nonce Service
|
|
3
|
+
*
|
|
4
|
+
* Handles nonce retrieval from the Kalvora validator via gRPC.
|
|
5
|
+
* Contains all business logic for nonce operations.
|
|
6
|
+
*/
|
|
7
|
+
import Decimal from 'decimal.js';
|
|
8
|
+
import { createValidatorAPIClient as defaultCreateClient } from '../../../grpc/api/validator-api-client.js';
|
|
9
|
+
import type { GRPCConfig } from '../../../types/index.js';
|
|
10
|
+
/**
|
|
11
|
+
* Get a single nonce for an address
|
|
12
|
+
*/
|
|
13
|
+
export declare function getNonce(address: string, options?: GRPCConfig, createClient?: typeof defaultCreateClient): Promise<Decimal>;
|
|
14
|
+
/**
|
|
15
|
+
* Get nonces for multiple addresses
|
|
16
|
+
*/
|
|
17
|
+
export declare function getNonces(addresses: string[], options?: GRPCConfig): Promise<Decimal[]>;
|
|
18
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../src/api/validator/nonce/service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,OAAO,MAAM,YAAY,CAAC;AAGjC,OAAO,EAAE,wBAAwB,IAAI,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAC5G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;GAEG;AACH,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,UAAe,EACxB,YAAY,6BAAsB,GACjC,OAAO,CAAC,OAAO,CAAC,CAsBlB;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAejG"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validator Nonce Service
|
|
3
|
+
*
|
|
4
|
+
* Handles nonce retrieval from the Kalvora validator via gRPC.
|
|
5
|
+
* Contains all business logic for nonce operations.
|
|
6
|
+
*/
|
|
7
|
+
import Decimal from 'decimal.js';
|
|
8
|
+
import { createValidatorAPIClient as defaultCreateClient } from '../../../grpc/api/validator-api-client.js';
|
|
9
|
+
/**
|
|
10
|
+
* Get a single nonce for an address
|
|
11
|
+
*/
|
|
12
|
+
export async function getNonce(address, options = {}, createClient = defaultCreateClient) {
|
|
13
|
+
// Input validation
|
|
14
|
+
if (!address || typeof address !== 'string' || address.trim() === '') {
|
|
15
|
+
throw new Error('Address must be a non-empty string');
|
|
16
|
+
}
|
|
17
|
+
try {
|
|
18
|
+
// Create validator API client
|
|
19
|
+
const client = createClient(options);
|
|
20
|
+
// Make gRPC call using the client's getNonce method
|
|
21
|
+
const response = await client.getNonce(address);
|
|
22
|
+
// Address likely doesn't exist, default to 1
|
|
23
|
+
if (!response.nonce) {
|
|
24
|
+
return new Decimal(1);
|
|
25
|
+
}
|
|
26
|
+
return new Decimal(response.nonce.toString()).add(1);
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
throw new Error(`Failed to get nonce from validator: ${error.message}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get nonces for multiple addresses
|
|
34
|
+
*/
|
|
35
|
+
export async function getNonces(addresses, options = {}) {
|
|
36
|
+
if (!Array.isArray(addresses) || addresses.length === 0) {
|
|
37
|
+
throw new Error('Addresses must be a non-empty array');
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
const nonces = [];
|
|
41
|
+
for (const address of addresses) {
|
|
42
|
+
const nonce = await getNonce(address, options);
|
|
43
|
+
nonces.push(nonce);
|
|
44
|
+
}
|
|
45
|
+
return nonces;
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
throw new Error(`Failed to get nonces from validator: ${error.message}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../../src/api/validator/nonce/service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,OAAO,MAAM,YAAY,CAAC;AAGjC,OAAO,EAAE,wBAAwB,IAAI,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAG5G;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,OAAe,EACf,UAAsB,EAAE,EACxB,YAAY,GAAG,mBAAmB;IAElC,mBAAmB;IACnB,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACrE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,CAAC;QACH,8BAA8B;QAC9B,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;QAErC,oDAAoD;QACpD,MAAM,QAAQ,GAAkB,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAE/D,6CAA6C;QAC7C,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACpB,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;QACxB,CAAC;QAED,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACvD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,uCAAwC,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,SAAmB,EAAE,UAAsB,EAAE;IAC3E,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxD,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;IAED,IAAI,CAAC;QACH,MAAM,MAAM,GAAc,EAAE,CAAC;QAC7B,KAAK,MAAM,OAAO,IAAI,SAAS,EAAE,CAAC;YAChC,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC/C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,wCAAyC,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* High-level client and network presets.
|
|
3
|
+
*
|
|
4
|
+
* @module client
|
|
5
|
+
*/
|
|
6
|
+
export { KalvoraClient, createKalvoraClient, type KalvoraClientOptions, type SubmitAndWaitOptions } from './kalvora-client.js';
|
|
7
|
+
export { KALVORA_NETWORKS, resolveNetwork, type KalvoraNetwork, type KalvoraNetworkName } from './networks.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACxB,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,aAAa,EACb,mBAAmB,EAGpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,gBAAgB,EAChB,cAAc,EAGf,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KalvoraClient — one object for talking to a Kalvora network.
|
|
3
|
+
*
|
|
4
|
+
* Bundles the typed query clients and transaction submission behind a single
|
|
5
|
+
* endpoint configuration, and adds the "submit and wait for inclusion"
|
|
6
|
+
* workflow that otherwise requires juggling several calls.
|
|
7
|
+
*
|
|
8
|
+
* Transaction *construction* stays in the standalone, tree-shakeable builder
|
|
9
|
+
* functions (`buildCoinTXN`, `buildMintTXN`, …); pass
|
|
10
|
+
* {@link KalvoraClient.grpcConfig} to them so every call targets the same
|
|
11
|
+
* endpoint.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import { KalvoraClient, createCoinTXN, KALVORA_NATIVE_TOKEN } from 'kalvora.js';
|
|
16
|
+
*
|
|
17
|
+
* const kalvora = new KalvoraClient(); // protonet over HTTPS
|
|
18
|
+
* const balance = await kalvora.query.getBalance(address, KALVORA_NATIVE_TOKEN);
|
|
19
|
+
*
|
|
20
|
+
* const txn = await createCoinTXN(inputs, outputs, KALVORA_NATIVE_TOKEN, {}, '', kalvora.grpcConfig);
|
|
21
|
+
* const result = await kalvora.submitAndWait(txn); // resolves once included in a block
|
|
22
|
+
* console.log(result.blockHeight, result.statusName);
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @module client/kalvora-client
|
|
26
|
+
*/
|
|
27
|
+
import { type AnyKalvoraTransaction } from '../grpc/transaction/transaction-client.js';
|
|
28
|
+
import { KalvoraQueryClient, type ConfirmedTransaction } from '../query/api-client.js';
|
|
29
|
+
import { GuardianQueryClient } from '../query/guardian-client.js';
|
|
30
|
+
import { ValidatorQueryClient } from '../query/validator-client.js';
|
|
31
|
+
import type { GRPCConfig } from '../types/index.js';
|
|
32
|
+
import { type KalvoraNetwork, type KalvoraNetworkName } from './networks.js';
|
|
33
|
+
/** Options for {@link KalvoraClient}. */
|
|
34
|
+
export interface KalvoraClientOptions {
|
|
35
|
+
/**
|
|
36
|
+
* Network preset name or a custom network definition.
|
|
37
|
+
* Defaults to `'protonet'`.
|
|
38
|
+
*/
|
|
39
|
+
network?: KalvoraNetworkName | KalvoraNetwork;
|
|
40
|
+
/**
|
|
41
|
+
* Endpoint overrides merged on top of the network's gRPC config
|
|
42
|
+
* (e.g. a custom `endpoint`, `fetch`, or in-memory `transport`).
|
|
43
|
+
*/
|
|
44
|
+
grpc?: GRPCConfig;
|
|
45
|
+
/**
|
|
46
|
+
* Guardian service endpoint. Guardians run separately from validators, so
|
|
47
|
+
* {@link KalvoraClient.guardian} is only available when this is set.
|
|
48
|
+
*/
|
|
49
|
+
guardian?: GRPCConfig;
|
|
50
|
+
}
|
|
51
|
+
/** Options for {@link KalvoraClient.submitAndWait}. */
|
|
52
|
+
export interface SubmitAndWaitOptions {
|
|
53
|
+
/** Give up waiting after this many milliseconds (default 120 000). */
|
|
54
|
+
timeoutMs?: number;
|
|
55
|
+
/** Delay between block polls (default 2 000). */
|
|
56
|
+
pollIntervalMs?: number;
|
|
57
|
+
/** Abort signal to cancel waiting (the transaction stays submitted). */
|
|
58
|
+
signal?: AbortSignal;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* High-level entry point bound to one Kalvora network.
|
|
62
|
+
*
|
|
63
|
+
* Instances are cheap and stateless apart from a cached block-height hint
|
|
64
|
+
* used to make {@link getLatestBlockHeight} fast on repeated calls.
|
|
65
|
+
*/
|
|
66
|
+
export declare class KalvoraClient {
|
|
67
|
+
/** The resolved network definition. */
|
|
68
|
+
readonly network: KalvoraNetwork;
|
|
69
|
+
/** Effective gRPC configuration; pass it to builder / `send*` functions. */
|
|
70
|
+
readonly grpcConfig: GRPCConfig;
|
|
71
|
+
/** Typed `APIService` client (balances, nonces, contracts, blocks, …). */
|
|
72
|
+
readonly query: KalvoraQueryClient;
|
|
73
|
+
/** Read-only `ValidatorService` client. */
|
|
74
|
+
readonly validator: ValidatorQueryClient;
|
|
75
|
+
private readonly guardianClient;
|
|
76
|
+
private heightHint;
|
|
77
|
+
/** @param options - Network selection and endpoint overrides */
|
|
78
|
+
constructor(options?: KalvoraClientOptions);
|
|
79
|
+
/** Native token mint ID of the configured network. */
|
|
80
|
+
get nativeToken(): string;
|
|
81
|
+
/**
|
|
82
|
+
* Guardian (bridge) query client.
|
|
83
|
+
*
|
|
84
|
+
* @throws Error when no `guardian` endpoint was configured
|
|
85
|
+
*/
|
|
86
|
+
get guardian(): GuardianQueryClient;
|
|
87
|
+
/**
|
|
88
|
+
* Latest block height, using (and refreshing) an internal hint so repeated
|
|
89
|
+
* calls cost only a few requests.
|
|
90
|
+
*/
|
|
91
|
+
getLatestBlockHeight(): Promise<bigint>;
|
|
92
|
+
/**
|
|
93
|
+
* Submit a signed transaction of any type.
|
|
94
|
+
*
|
|
95
|
+
* @param txn - Signed protobuf transaction (from any `create*` builder)
|
|
96
|
+
* @returns Hex transaction hash
|
|
97
|
+
*/
|
|
98
|
+
submit(txn: AnyKalvoraTransaction): Promise<string>;
|
|
99
|
+
/**
|
|
100
|
+
* Submit a signed transaction and wait until it is included in a block.
|
|
101
|
+
*
|
|
102
|
+
* The latest height is captured *before* submission so the search window
|
|
103
|
+
* cannot miss the including block.
|
|
104
|
+
*
|
|
105
|
+
* @returns The transaction's processing result and block height. Check
|
|
106
|
+
* `result.success` — inclusion does not imply the transaction succeeded.
|
|
107
|
+
* @throws Error on timeout/abort (the transaction may still be included later)
|
|
108
|
+
*/
|
|
109
|
+
submitAndWait(txn: AnyKalvoraTransaction, options?: SubmitAndWaitOptions): Promise<ConfirmedTransaction>;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Create a {@link KalvoraClient}.
|
|
113
|
+
*
|
|
114
|
+
* @param options - Network selection and endpoint overrides
|
|
115
|
+
*/
|
|
116
|
+
export declare function createKalvoraClient(options?: KalvoraClientOptions): KalvoraClient;
|
|
117
|
+
//# sourceMappingURL=kalvora-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kalvora-client.d.ts","sourceRoot":"","sources":["../../../src/client/kalvora-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAqB,KAAK,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAC1G,OAAO,EACL,kBAAkB,EAClB,KAAK,oBAAoB,EAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAkB,KAAK,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE7F,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,OAAO,CAAC,EAAE,kBAAkB,GAAG,cAAc,CAAC;IAC9C;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC;CACvB;AAED,uDAAuD;AACvD,MAAM,WAAW,oBAAoB;IACnC,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;;GAKG;AACH,qBAAa,aAAa;IACxB,uCAAuC;IACvC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,4EAA4E;IAC5E,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;IACnC,2CAA2C;IAC3C,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IAEzC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAkC;IACjE,OAAO,CAAC,UAAU,CAAM;IAExB,gEAAgE;gBACpD,OAAO,GAAE,oBAAyB;IAQ9C,sDAAsD;IACtD,IAAI,WAAW,IAAI,MAAM,CAExB;IAED;;;;OAIG;IACH,IAAI,QAAQ,IAAI,mBAAmB,CAKlC;IAED;;;OAGG;IACG,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC;IAK7C;;;;;OAKG;IACG,MAAM,CAAC,GAAG,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC;IAIzD;;;;;;;;;OASG;IACG,aAAa,CAAC,GAAG,EAAE,qBAAqB,EAAE,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAYnH;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,oBAAyB,GAAG,aAAa,CAErF"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KalvoraClient — one object for talking to a Kalvora network.
|
|
3
|
+
*
|
|
4
|
+
* Bundles the typed query clients and transaction submission behind a single
|
|
5
|
+
* endpoint configuration, and adds the "submit and wait for inclusion"
|
|
6
|
+
* workflow that otherwise requires juggling several calls.
|
|
7
|
+
*
|
|
8
|
+
* Transaction *construction* stays in the standalone, tree-shakeable builder
|
|
9
|
+
* functions (`buildCoinTXN`, `buildMintTXN`, …); pass
|
|
10
|
+
* {@link KalvoraClient.grpcConfig} to them so every call targets the same
|
|
11
|
+
* endpoint.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import { KalvoraClient, createCoinTXN, KALVORA_NATIVE_TOKEN } from 'kalvora.js';
|
|
16
|
+
*
|
|
17
|
+
* const kalvora = new KalvoraClient(); // protonet over HTTPS
|
|
18
|
+
* const balance = await kalvora.query.getBalance(address, KALVORA_NATIVE_TOKEN);
|
|
19
|
+
*
|
|
20
|
+
* const txn = await createCoinTXN(inputs, outputs, KALVORA_NATIVE_TOKEN, {}, '', kalvora.grpcConfig);
|
|
21
|
+
* const result = await kalvora.submitAndWait(txn); // resolves once included in a block
|
|
22
|
+
* console.log(result.blockHeight, result.statusName);
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @module client/kalvora-client
|
|
26
|
+
*/
|
|
27
|
+
import { submitTransaction } from '../grpc/transaction/transaction-client.js';
|
|
28
|
+
import { KalvoraQueryClient } from '../query/api-client.js';
|
|
29
|
+
import { GuardianQueryClient } from '../query/guardian-client.js';
|
|
30
|
+
import { ValidatorQueryClient } from '../query/validator-client.js';
|
|
31
|
+
import { resolveNetwork } from './networks.js';
|
|
32
|
+
/**
|
|
33
|
+
* High-level entry point bound to one Kalvora network.
|
|
34
|
+
*
|
|
35
|
+
* Instances are cheap and stateless apart from a cached block-height hint
|
|
36
|
+
* used to make {@link getLatestBlockHeight} fast on repeated calls.
|
|
37
|
+
*/
|
|
38
|
+
export class KalvoraClient {
|
|
39
|
+
/** @param options - Network selection and endpoint overrides */
|
|
40
|
+
constructor(options = {}) {
|
|
41
|
+
this.heightHint = 0n;
|
|
42
|
+
this.network = resolveNetwork(options.network ?? 'protonet');
|
|
43
|
+
this.grpcConfig = { ...this.network.grpc, ...options.grpc };
|
|
44
|
+
this.query = new KalvoraQueryClient(this.grpcConfig);
|
|
45
|
+
this.validator = new ValidatorQueryClient(this.grpcConfig);
|
|
46
|
+
this.guardianClient = options.guardian ? new GuardianQueryClient(options.guardian) : undefined;
|
|
47
|
+
}
|
|
48
|
+
/** Native token mint ID of the configured network. */
|
|
49
|
+
get nativeToken() {
|
|
50
|
+
return this.network.nativeToken;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Guardian (bridge) query client.
|
|
54
|
+
*
|
|
55
|
+
* @throws Error when no `guardian` endpoint was configured
|
|
56
|
+
*/
|
|
57
|
+
get guardian() {
|
|
58
|
+
if (!this.guardianClient) {
|
|
59
|
+
throw new Error('No guardian endpoint configured; pass `guardian` to the KalvoraClient constructor');
|
|
60
|
+
}
|
|
61
|
+
return this.guardianClient;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Latest block height, using (and refreshing) an internal hint so repeated
|
|
65
|
+
* calls cost only a few requests.
|
|
66
|
+
*/
|
|
67
|
+
async getLatestBlockHeight() {
|
|
68
|
+
this.heightHint = await this.query.getLatestBlockHeight(this.heightHint);
|
|
69
|
+
return this.heightHint;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Submit a signed transaction of any type.
|
|
73
|
+
*
|
|
74
|
+
* @param txn - Signed protobuf transaction (from any `create*` builder)
|
|
75
|
+
* @returns Hex transaction hash
|
|
76
|
+
*/
|
|
77
|
+
async submit(txn) {
|
|
78
|
+
return submitTransaction(txn, this.grpcConfig);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Submit a signed transaction and wait until it is included in a block.
|
|
82
|
+
*
|
|
83
|
+
* The latest height is captured *before* submission so the search window
|
|
84
|
+
* cannot miss the including block.
|
|
85
|
+
*
|
|
86
|
+
* @returns The transaction's processing result and block height. Check
|
|
87
|
+
* `result.success` — inclusion does not imply the transaction succeeded.
|
|
88
|
+
* @throws Error on timeout/abort (the transaction may still be included later)
|
|
89
|
+
*/
|
|
90
|
+
async submitAndWait(txn, options = {}) {
|
|
91
|
+
const fromHeight = await this.getLatestBlockHeight();
|
|
92
|
+
const hash = await this.submit(txn);
|
|
93
|
+
const result = await this.query.waitForTransaction(hash, {
|
|
94
|
+
fromHeight,
|
|
95
|
+
...(options.timeoutMs !== undefined ? { timeoutMs: options.timeoutMs } : {}),
|
|
96
|
+
...(options.pollIntervalMs !== undefined ? { pollIntervalMs: options.pollIntervalMs } : {}),
|
|
97
|
+
...(options.signal !== undefined ? { signal: options.signal } : {})
|
|
98
|
+
});
|
|
99
|
+
if (result.blockHeight > this.heightHint)
|
|
100
|
+
this.heightHint = result.blockHeight;
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Create a {@link KalvoraClient}.
|
|
106
|
+
*
|
|
107
|
+
* @param options - Network selection and endpoint overrides
|
|
108
|
+
*/
|
|
109
|
+
export function createKalvoraClient(options = {}) {
|
|
110
|
+
return new KalvoraClient(options);
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=kalvora-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kalvora-client.js","sourceRoot":"","sources":["../../../src/client/kalvora-client.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kalvora network presets.
|
|
3
|
+
*
|
|
4
|
+
* A network bundles everything that differs between Kalvora deployments:
|
|
5
|
+
* the gRPC-Web endpoint and the native token. Builders default to the
|
|
6
|
+
* protonet preset; pass a network's `grpc` config to target another one.
|
|
7
|
+
*
|
|
8
|
+
* @module client/networks
|
|
9
|
+
*/
|
|
10
|
+
import type { GRPCConfig } from '../types/index.js';
|
|
11
|
+
/** Definition of a Kalvora network. */
|
|
12
|
+
export interface KalvoraNetwork {
|
|
13
|
+
/** Stable identifier, e.g. `kalvora:protonet` (also used as the CAIP-2-style chain id). */
|
|
14
|
+
id: string;
|
|
15
|
+
/** Human-readable name. */
|
|
16
|
+
name: string;
|
|
17
|
+
/** gRPC-Web endpoint configuration. */
|
|
18
|
+
grpc: GRPCConfig;
|
|
19
|
+
/** Mint ID of the network's native (default fee) token. */
|
|
20
|
+
nativeToken: string;
|
|
21
|
+
/** Decimals of the native token (denomination = 10^decimals). */
|
|
22
|
+
nativeDecimals: number;
|
|
23
|
+
/** Native token symbol. */
|
|
24
|
+
nativeSymbol: string;
|
|
25
|
+
}
|
|
26
|
+
/** Built-in network presets. */
|
|
27
|
+
export declare const KALVORA_NETWORKS: {
|
|
28
|
+
/**
|
|
29
|
+
* Kalvora protonet — the SDK default. HTTPS gRPC-Web on port 443.
|
|
30
|
+
*/
|
|
31
|
+
readonly protonet: {
|
|
32
|
+
readonly id: "kalvora:protonet";
|
|
33
|
+
readonly name: "Kalvora Protonet";
|
|
34
|
+
readonly grpc: GRPCConfig;
|
|
35
|
+
readonly nativeToken: "KALXvxhUMJERCse4e6b2jeXFkcqqpiUByQQckvPZm4szmF3Ao";
|
|
36
|
+
readonly nativeDecimals: 9;
|
|
37
|
+
readonly nativeSymbol: "KALV";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/** Name of a built-in network preset. */
|
|
41
|
+
export type KalvoraNetworkName = keyof typeof KALVORA_NETWORKS;
|
|
42
|
+
/**
|
|
43
|
+
* Resolve a preset name or custom definition into a {@link KalvoraNetwork}.
|
|
44
|
+
*
|
|
45
|
+
* @throws Error for unknown preset names
|
|
46
|
+
*/
|
|
47
|
+
export declare function resolveNetwork(network: KalvoraNetworkName | KalvoraNetwork): KalvoraNetwork;
|
|
48
|
+
//# sourceMappingURL=networks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../../../src/client/networks.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,uCAAuC;AACvC,MAAM,WAAW,cAAc;IAC7B,2FAA2F;IAC3F,EAAE,EAAE,MAAM,CAAC;IACX,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,IAAI,EAAE,UAAU,CAAC;IACjB,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,cAAc,EAAE,MAAM,CAAC;IACvB,2BAA2B;IAC3B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,gCAAgC;AAChC,eAAO,MAAM,gBAAgB;IAC3B;;OAEG;;;;;;;;;CAS8C,CAAC;AAEpD,yCAAyC;AACzC,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAE/D;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,kBAAkB,GAAG,cAAc,GAAG,cAAc,CAS3F"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kalvora network presets.
|
|
3
|
+
*
|
|
4
|
+
* A network bundles everything that differs between Kalvora deployments:
|
|
5
|
+
* the gRPC-Web endpoint and the native token. Builders default to the
|
|
6
|
+
* protonet preset; pass a network's `grpc` config to target another one.
|
|
7
|
+
*
|
|
8
|
+
* @module client/networks
|
|
9
|
+
*/
|
|
10
|
+
import { KALVORA_NATIVE_TOKEN, KALVORA_PROTONET_NETWORK } from '../shared/network/constants.js';
|
|
11
|
+
import { PROTONET_GRPC_CONFIG } from '../shared/utils/testing-defaults/index.js';
|
|
12
|
+
/** Built-in network presets. */
|
|
13
|
+
export const KALVORA_NETWORKS = {
|
|
14
|
+
/**
|
|
15
|
+
* Kalvora protonet — the SDK default. HTTPS gRPC-Web on port 443.
|
|
16
|
+
*/
|
|
17
|
+
protonet: {
|
|
18
|
+
id: KALVORA_PROTONET_NETWORK,
|
|
19
|
+
name: 'Kalvora Protonet',
|
|
20
|
+
grpc: PROTONET_GRPC_CONFIG,
|
|
21
|
+
nativeToken: KALVORA_NATIVE_TOKEN,
|
|
22
|
+
nativeDecimals: 9,
|
|
23
|
+
nativeSymbol: 'KALV'
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Resolve a preset name or custom definition into a {@link KalvoraNetwork}.
|
|
28
|
+
*
|
|
29
|
+
* @throws Error for unknown preset names
|
|
30
|
+
*/
|
|
31
|
+
export function resolveNetwork(network) {
|
|
32
|
+
if (typeof network === 'string') {
|
|
33
|
+
const preset = KALVORA_NETWORKS[network];
|
|
34
|
+
if (!preset) {
|
|
35
|
+
throw new Error(`Unknown Kalvora network "${network}". Known: ${Object.keys(KALVORA_NETWORKS).join(', ')}`);
|
|
36
|
+
}
|
|
37
|
+
return { ...preset, grpc: { ...preset.grpc } };
|
|
38
|
+
}
|
|
39
|
+
return network;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=networks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networks.js","sourceRoot":"","sources":["../../../src/client/networks.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAmBjF,gCAAgC;AAChC,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B;;OAEG;IACH,QAAQ,EAAE;QACR,EAAE,EAAE,wBAAwB;QAC5B,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,oBAAoB;QACjC,cAAc,EAAE,CAAC;QACjB,YAAY,EAAE,MAAM;KACrB;CACgD,CAAC;AAKpD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,OAA4C;IACzE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,MAAM,GAAI,gBAAmD,CAAC,OAAO,CAAC,CAAC;QAC7E,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,4BAA4B,OAAO,aAAa,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9G,CAAC;QACD,OAAO,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;IACjD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CoinTXN Module - Main Entry Point
|
|
3
|
+
*
|
|
4
|
+
* This module provides functionality for creating and sending CoinTXN transactions
|
|
5
|
+
* on the Kalvora network with automatic fee calculation and various validation.
|
|
6
|
+
*/
|
|
7
|
+
export { createCoinTXN, buildCoinTXN, sendCoinTXN, type CoinTXNBuildInput, type CoinTXNBuildOptions } from './transaction.js';
|
|
8
|
+
export type { CoinTXNInput, CoinTXNOutput, GRPCConfig } from '../types/index.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coin-txn/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG9H,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CoinTXN Module - Main Entry Point
|
|
3
|
+
*
|
|
4
|
+
* This module provides functionality for creating and sending CoinTXN transactions
|
|
5
|
+
* on the Kalvora network with automatic fee calculation and various validation.
|
|
6
|
+
*/
|
|
7
|
+
// Re-export main functions
|
|
8
|
+
export { createCoinTXN, buildCoinTXN, sendCoinTXN } from './transaction.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/coin-txn/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,2BAA2B;AAC3B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAoD,MAAM,kBAAkB,CAAC"}
|