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,127 @@
|
|
|
1
|
+
import bs58 from 'bs58';
|
|
2
|
+
import { KEY_TYPE_PREFIXES, HASH_TYPE_PREFIXES, isValidKeyType, isValidHashType } from './constants.js';
|
|
3
|
+
/**
|
|
4
|
+
* Generate Kalvora public key identifier (human-readable format with type prefixes)
|
|
5
|
+
*
|
|
6
|
+
* Current standard (hashTypes empty or omitted):
|
|
7
|
+
* Format: KeyPrefix_PublicKeyBase58
|
|
8
|
+
* Example: "A_5KJvsngHeMby884zrh6A5u6b4SqzZzAb"
|
|
9
|
+
*
|
|
10
|
+
* Legacy format (hashTypes provided):
|
|
11
|
+
* Format: KeyPrefix_HashPrefix_PublicKeyBase58
|
|
12
|
+
* Example: "A_c_5KJvsngHeMby884zrh6A5u6b4SqzZzAb"
|
|
13
|
+
*/
|
|
14
|
+
export function generateKalvoraPublicKeyIdentifier(publicKey, keyType, hashTypes = []) {
|
|
15
|
+
if (!publicKey || !(publicKey instanceof Uint8Array)) {
|
|
16
|
+
throw new Error('Public key must be a Uint8Array');
|
|
17
|
+
}
|
|
18
|
+
if (!isValidKeyType(keyType)) {
|
|
19
|
+
throw new Error(`Invalid key type: ${keyType}`);
|
|
20
|
+
}
|
|
21
|
+
// Get key type prefix
|
|
22
|
+
const keyPrefix = KEY_TYPE_PREFIXES[keyType];
|
|
23
|
+
// Encode public key to base58
|
|
24
|
+
const publicKeyBase58 = bs58.encode(publicKey);
|
|
25
|
+
// If no hash types, use new format: KeyPrefix_PublicKeyBase58
|
|
26
|
+
if (!hashTypes || hashTypes.length === 0) {
|
|
27
|
+
return `${keyPrefix}_${publicKeyBase58}`;
|
|
28
|
+
}
|
|
29
|
+
// Legacy mode: validate and include hash type prefixes
|
|
30
|
+
for (const hashType of hashTypes) {
|
|
31
|
+
if (!isValidHashType(hashType)) {
|
|
32
|
+
throw new Error(`Invalid hash type: ${hashType}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// Get hash type prefixes (sorted for consistency)
|
|
36
|
+
const sortedHashTypes = [...hashTypes].sort();
|
|
37
|
+
const hashPrefixes = sortedHashTypes.map(hashType => HASH_TYPE_PREFIXES[hashType]).join('_');
|
|
38
|
+
// Combine all parts: KeyPrefix_HashPrefixes_PublicKeyBase58
|
|
39
|
+
return `${keyPrefix}_${hashPrefixes}_${publicKeyBase58}`;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Create base wallet object with common properties
|
|
43
|
+
*/
|
|
44
|
+
export function createBaseWallet(type, mnemonic, privateKey, address, publicKey, coinType, symbol, derivationPath, keyType, hashTypes = []) {
|
|
45
|
+
return {
|
|
46
|
+
type,
|
|
47
|
+
mnemonic,
|
|
48
|
+
privateKey,
|
|
49
|
+
address,
|
|
50
|
+
publicKey,
|
|
51
|
+
coinType,
|
|
52
|
+
symbol,
|
|
53
|
+
derivationPath,
|
|
54
|
+
keyType,
|
|
55
|
+
...(hashTypes.length > 0 ? { hashTypes } : {})
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Validate wallet object structure
|
|
60
|
+
*/
|
|
61
|
+
export function validateWalletObject(wallet) {
|
|
62
|
+
// Validate specific field types
|
|
63
|
+
if (typeof wallet.type !== 'string')
|
|
64
|
+
return false;
|
|
65
|
+
if (typeof wallet.mnemonic !== 'string')
|
|
66
|
+
return false;
|
|
67
|
+
if (typeof wallet.privateKey !== 'string')
|
|
68
|
+
return false;
|
|
69
|
+
if (typeof wallet.address !== 'string')
|
|
70
|
+
return false;
|
|
71
|
+
if (typeof wallet.publicKey !== 'string')
|
|
72
|
+
return false;
|
|
73
|
+
if (typeof wallet.coinType !== 'number')
|
|
74
|
+
return false;
|
|
75
|
+
if (typeof wallet.symbol !== 'string')
|
|
76
|
+
return false;
|
|
77
|
+
if (typeof wallet.derivationPath !== 'string')
|
|
78
|
+
return false;
|
|
79
|
+
if (!isValidKeyType(wallet.keyType))
|
|
80
|
+
return false;
|
|
81
|
+
// hashTypes is now optional — if present, validate it
|
|
82
|
+
if (wallet.hashTypes !== undefined) {
|
|
83
|
+
if (!Array.isArray(wallet.hashTypes))
|
|
84
|
+
return false;
|
|
85
|
+
for (const ht of wallet.hashTypes) {
|
|
86
|
+
if (!isValidHashType(ht))
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Sanitize wallet object for safe logging (removes sensitive data)
|
|
94
|
+
*/
|
|
95
|
+
export function sanitizeWalletForLogging(wallet) {
|
|
96
|
+
return {
|
|
97
|
+
type: wallet.type,
|
|
98
|
+
address: wallet.address,
|
|
99
|
+
publicKey: wallet.publicKey ? `${wallet.publicKey.substring(0, 10)}...` : undefined,
|
|
100
|
+
coinType: wallet.coinType,
|
|
101
|
+
symbol: wallet.symbol,
|
|
102
|
+
derivationPath: wallet.derivationPath,
|
|
103
|
+
keyType: wallet.keyType,
|
|
104
|
+
...(wallet.hashTypes ? { hashTypes: wallet.hashTypes } : {}),
|
|
105
|
+
// Never log sensitive data
|
|
106
|
+
mnemonic: '[REDACTED]',
|
|
107
|
+
privateKey: '[REDACTED]'
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Create wallet summary for display
|
|
112
|
+
*/
|
|
113
|
+
export function createWalletSummary(wallet) {
|
|
114
|
+
if (!validateWalletObject(wallet)) {
|
|
115
|
+
return 'Invalid wallet object';
|
|
116
|
+
}
|
|
117
|
+
const hashTypesStr = wallet.hashTypes?.length ? wallet.hashTypes.join(', ') : 'none';
|
|
118
|
+
return `Wallet Summary:
|
|
119
|
+
Type: ${wallet.type}
|
|
120
|
+
Address: ${wallet.address}
|
|
121
|
+
Key Type: ${wallet.keyType}
|
|
122
|
+
Hash Types: ${hashTypesStr}
|
|
123
|
+
Derivation Path: ${wallet.derivationPath}
|
|
124
|
+
Coin Type: ${wallet.coinType}
|
|
125
|
+
Symbol: ${wallet.symbol}`;
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/wallet-creation/shared.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EAChB,MAAM,gBAAgB,CAAC;AAsCxB;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kCAAkC,CAChD,SAAqB,EACrB,OAAgB,EAChB,YAAwB,EAAE;IAE1B,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,SAAS,YAAY,UAAU,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,qBAAqB,OAAO,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,sBAAsB;IACtB,MAAM,SAAS,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAE7C,8BAA8B;IAC9B,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAE/C,8DAA8D;IAC9D,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC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,CAAC,MAAM;QACrB,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,2BAA2B;QAC3B,QAAQ,EAAE,YAAY;QACtB,UAAU,EAAE,YAAY;KACzB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAkB;IACpD,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,OAAO,uBAAuB,CAAC;IACjC,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACrF,OAAO;UACC,MAAM,CAAC,IAAI;aACR,MAAM,CAAC,OAAO;cACb,MAAM,CAAC,OAAO;gBACZ,YAAY;qBACP,MAAM,CAAC,cAAc;eAC3B,MAAM,CAAC,QAAQ;YAClB,MAAM,CAAC,MAAM,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { WalletOptions, Wallet, MultipleWalletOptions, KeyType, HashType } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Unified wallet creation factory for the Kalvora network.
|
|
4
|
+
*
|
|
5
|
+
* This factory provides comprehensive wallet creation functionality with support for:
|
|
6
|
+
* - Multiple key types (Ed25519, Ed448)
|
|
7
|
+
* - Multiple hash algorithms (SHA3-256, SHA3-512, BLAKE3)
|
|
8
|
+
* - HD wallet derivation with SLIP-0010 compliance
|
|
9
|
+
* - BIP39 mnemonic phrase generation
|
|
10
|
+
* - Secure memory management
|
|
11
|
+
*
|
|
12
|
+
* @class WalletFactory
|
|
13
|
+
* @author Kalvora Community
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const factory = new WalletFactory();
|
|
19
|
+
* const wallet = await factory.createWallet({
|
|
20
|
+
* keyType: 'ed25519',
|
|
21
|
+
* hashTypes: ['sha3_256'],
|
|
22
|
+
* mnemonic: 'your mnemonic phrase here'
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare class WalletFactory {
|
|
27
|
+
private readonly coinType;
|
|
28
|
+
private readonly symbol;
|
|
29
|
+
private readonly name;
|
|
30
|
+
constructor();
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new wallet with the specified parameters.
|
|
33
|
+
*
|
|
34
|
+
* This method generates a complete wallet including:
|
|
35
|
+
* - HD wallet derivation using SLIP-0010
|
|
36
|
+
* - Key pair generation using the `@noble` libraries
|
|
37
|
+
* - Address generation with specified hash types
|
|
38
|
+
* - Extended key information for HD wallet functionality
|
|
39
|
+
* - Secure memory management
|
|
40
|
+
*
|
|
41
|
+
* @param options - Wallet creation options including key type, hash types, and mnemonic
|
|
42
|
+
* @returns Promise that resolves to a complete Wallet object
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* const wallet = await factory.createWallet({
|
|
47
|
+
* keyType: 'ed25519',
|
|
48
|
+
* hashTypes: ['sha3_256', 'blake3'],
|
|
49
|
+
* mnemonic: 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about',
|
|
50
|
+
* passphrase: 'optional-passphrase',
|
|
51
|
+
* hdOptions: {
|
|
52
|
+
* accountIndex: 0,
|
|
53
|
+
* changeIndex: 0,
|
|
54
|
+
* addressIndex: 0
|
|
55
|
+
* }
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @throws {MissingParameterError} When required parameters are missing
|
|
60
|
+
* @throws {InvalidKeyTypeError} When key type is not supported
|
|
61
|
+
* @throws {InvalidHashTypeError} When hash types are not supported
|
|
62
|
+
* @throws {InvalidMnemonicError} When mnemonic phrase is invalid
|
|
63
|
+
* @throws {CryptographicError} When cryptographic operations fail
|
|
64
|
+
*
|
|
65
|
+
* @since 1.0.0
|
|
66
|
+
*/
|
|
67
|
+
createWallet(options: WalletOptions): Promise<Wallet>;
|
|
68
|
+
/**
|
|
69
|
+
* Derive multiple addresses from the same mnemonic
|
|
70
|
+
*
|
|
71
|
+
* OPTIMIZATIONS:
|
|
72
|
+
* 1. Computes the seed once and reuses it for all derivations (avoids PBKDF2 per account)
|
|
73
|
+
* 2. Caches master node at m/44'/5258' - only derives final 3 levels per account
|
|
74
|
+
* 3. Uses Promise.all for parallel derivation on multi-core systems
|
|
75
|
+
*
|
|
76
|
+
* This reduces batch derivation time from ~34s to <1s for 20 accounts.
|
|
77
|
+
*/
|
|
78
|
+
deriveMultipleWallets(options: MultipleWalletOptions): Promise<Wallet[]>;
|
|
79
|
+
/**
|
|
80
|
+
* Generate key pair based on key type using the `@noble` libraries
|
|
81
|
+
*/
|
|
82
|
+
private generateKeyPair;
|
|
83
|
+
/**
|
|
84
|
+
* Get wallet factory information
|
|
85
|
+
*/
|
|
86
|
+
getInfo(): {
|
|
87
|
+
name: string;
|
|
88
|
+
symbol: string;
|
|
89
|
+
coinType: number;
|
|
90
|
+
supportedKeyTypes: readonly KeyType[];
|
|
91
|
+
supportedHashTypes: readonly HashType[];
|
|
92
|
+
supportedMnemonicLengths: readonly number[];
|
|
93
|
+
standard: string;
|
|
94
|
+
description: string;
|
|
95
|
+
cryptographicLibraries: string[];
|
|
96
|
+
securityFeatures: string[];
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Create a new wallet with the factory
|
|
101
|
+
*/
|
|
102
|
+
export declare function createWallet(options: WalletOptions): Promise<Wallet>;
|
|
103
|
+
/**
|
|
104
|
+
* Derive multiple wallets with the factory
|
|
105
|
+
*/
|
|
106
|
+
export declare function deriveMultipleWallets(options: MultipleWalletOptions): Promise<Wallet[]>;
|
|
107
|
+
//# sourceMappingURL=wallet-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet-factory.d.ts","sourceRoot":"","sources":["../../../src/wallet-creation/wallet-factory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,MAAM,EACN,qBAAqB,EACrB,OAAO,EACP,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAsB3B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;;IAQ9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACG,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IA2F3D;;;;;;;;;OASG;IACG,qBAAqB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAoI9E;;OAEG;YACW,eAAe;IAU7B;;OAEG;IACH,OAAO,IAAI;QACT,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,iBAAiB,EAAE,SAAS,OAAO,EAAE,CAAC;QACtC,kBAAkB,EAAE,SAAS,QAAQ,EAAE,CAAC;QACxC,wBAAwB,EAAE,SAAS,MAAM,EAAE,CAAC;QAC5C,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,sBAAsB,EAAE,MAAM,EAAE,CAAC;QACjC,gBAAgB,EAAE,MAAM,EAAE,CAAC;KAC1B;CA6BJ;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAG1E;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAG7F"}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { generateKalvoraAddress } from '../shared/crypto/address-utils.js';
|
|
2
|
+
import { KALVORA_TYPE, KALVORA_SYMBOL, KALVORA_NAME, VALID_KEY_TYPES, VALID_HASH_TYPES, MNEMONIC_LENGTHS, isValidKeyType, KEY_TYPE } from './constants.js';
|
|
3
|
+
import { Ed25519KeyPair, Ed448KeyPair, CryptoUtils, SLIP0010HDWallet } from './crypto-core.js';
|
|
4
|
+
import { MissingParameterError, InvalidKeyTypeError, InvalidHashTypeError } from './errors.js';
|
|
5
|
+
import { validateHashTypes } from './hash-utils.js';
|
|
6
|
+
import { generateSeed, buildDerivationPath, createHDWallet } from './hd-utils.js';
|
|
7
|
+
import { generateKalvoraPublicKeyIdentifier, createBaseWallet } from './shared.js';
|
|
8
|
+
/**
|
|
9
|
+
* Unified wallet creation factory for the Kalvora network.
|
|
10
|
+
*
|
|
11
|
+
* This factory provides comprehensive wallet creation functionality with support for:
|
|
12
|
+
* - Multiple key types (Ed25519, Ed448)
|
|
13
|
+
* - Multiple hash algorithms (SHA3-256, SHA3-512, BLAKE3)
|
|
14
|
+
* - HD wallet derivation with SLIP-0010 compliance
|
|
15
|
+
* - BIP39 mnemonic phrase generation
|
|
16
|
+
* - Secure memory management
|
|
17
|
+
*
|
|
18
|
+
* @class WalletFactory
|
|
19
|
+
* @author Kalvora Community
|
|
20
|
+
* @since 1.0.0
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const factory = new WalletFactory();
|
|
25
|
+
* const wallet = await factory.createWallet({
|
|
26
|
+
* keyType: 'ed25519',
|
|
27
|
+
* hashTypes: ['sha3_256'],
|
|
28
|
+
* mnemonic: 'your mnemonic phrase here'
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export class WalletFactory {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.coinType = KALVORA_TYPE;
|
|
35
|
+
this.symbol = KALVORA_SYMBOL;
|
|
36
|
+
this.name = KALVORA_NAME;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Creates a new wallet with the specified parameters.
|
|
40
|
+
*
|
|
41
|
+
* This method generates a complete wallet including:
|
|
42
|
+
* - HD wallet derivation using SLIP-0010
|
|
43
|
+
* - Key pair generation using the `@noble` libraries
|
|
44
|
+
* - Address generation with specified hash types
|
|
45
|
+
* - Extended key information for HD wallet functionality
|
|
46
|
+
* - Secure memory management
|
|
47
|
+
*
|
|
48
|
+
* @param options - Wallet creation options including key type, hash types, and mnemonic
|
|
49
|
+
* @returns Promise that resolves to a complete Wallet object
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```typescript
|
|
53
|
+
* const wallet = await factory.createWallet({
|
|
54
|
+
* keyType: 'ed25519',
|
|
55
|
+
* hashTypes: ['sha3_256', 'blake3'],
|
|
56
|
+
* mnemonic: 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about',
|
|
57
|
+
* passphrase: 'optional-passphrase',
|
|
58
|
+
* hdOptions: {
|
|
59
|
+
* accountIndex: 0,
|
|
60
|
+
* changeIndex: 0,
|
|
61
|
+
* addressIndex: 0
|
|
62
|
+
* }
|
|
63
|
+
* });
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @throws {MissingParameterError} When required parameters are missing
|
|
67
|
+
* @throws {InvalidKeyTypeError} When key type is not supported
|
|
68
|
+
* @throws {InvalidHashTypeError} When hash types are not supported
|
|
69
|
+
* @throws {InvalidMnemonicError} When mnemonic phrase is invalid
|
|
70
|
+
* @throws {CryptographicError} When cryptographic operations fail
|
|
71
|
+
*
|
|
72
|
+
* @since 1.0.0
|
|
73
|
+
*/
|
|
74
|
+
async createWallet(options) {
|
|
75
|
+
const { keyType, hashTypes = [], mnemonic, passphrase = '', hdOptions = {} } = options;
|
|
76
|
+
// Validate required parameters
|
|
77
|
+
if (!keyType) {
|
|
78
|
+
throw new MissingParameterError('keyType');
|
|
79
|
+
}
|
|
80
|
+
if (!isValidKeyType(keyType)) {
|
|
81
|
+
throw new InvalidKeyTypeError(keyType, VALID_KEY_TYPES);
|
|
82
|
+
}
|
|
83
|
+
// Validate hash types if provided (optional — empty means key-only mode)
|
|
84
|
+
if (hashTypes.length > 0 && !validateHashTypes(hashTypes)) {
|
|
85
|
+
throw new InvalidHashTypeError('Invalid hash types array', VALID_HASH_TYPES);
|
|
86
|
+
}
|
|
87
|
+
// Validate mnemonic - must be provided
|
|
88
|
+
if (!mnemonic) {
|
|
89
|
+
throw new MissingParameterError('mnemonic - must be provided');
|
|
90
|
+
}
|
|
91
|
+
// Use provided mnemonic
|
|
92
|
+
const finalMnemonic = mnemonic;
|
|
93
|
+
// Use pre-computed seed if provided (e.g., from native PBKDF2),
|
|
94
|
+
// otherwise derive it synchronously via bip39's mnemonicToSeedSync.
|
|
95
|
+
const seed = options.seed ?? generateSeed(finalMnemonic, passphrase);
|
|
96
|
+
// Build derivation path (SLIP-0010 for Ed25519/Ed448)
|
|
97
|
+
const derivationPath = buildDerivationPath(hdOptions);
|
|
98
|
+
// Create HD wallet using SLIP-0010 with the specified key type
|
|
99
|
+
const hdNode = createHDWallet(seed, derivationPath, keyType);
|
|
100
|
+
// Generate key pair based on key type using the `@noble` libraries
|
|
101
|
+
const keyPair = await this.generateKeyPair(hdNode, keyType);
|
|
102
|
+
try {
|
|
103
|
+
// Generate address and public key formats
|
|
104
|
+
const address = generateKalvoraAddress(keyPair.publicKey, keyType, hashTypes);
|
|
105
|
+
const publicKey = generateKalvoraPublicKeyIdentifier(keyPair.publicKey, keyType, hashTypes);
|
|
106
|
+
// Create wallet object
|
|
107
|
+
const wallet = createBaseWallet('hd', finalMnemonic, keyPair.getPrivateKeyBase58(), address, publicKey, this.coinType, this.symbol, derivationPath, keyType, hashTypes);
|
|
108
|
+
return {
|
|
109
|
+
...wallet,
|
|
110
|
+
type: 'hd',
|
|
111
|
+
// Add extended key information for SLIP-0010 compliance
|
|
112
|
+
extendedPrivateKey: hdNode.getExtendedPrivateKey(),
|
|
113
|
+
extendedPublicKey: hdNode.getExtendedPublicKey(),
|
|
114
|
+
fingerprint: hdNode.getFingerprint(keyType),
|
|
115
|
+
depth: hdNode.depth,
|
|
116
|
+
index: hdNode.index,
|
|
117
|
+
// Only expose base58-encoded private key for security
|
|
118
|
+
privateKey: keyPair.getPrivateKeyBase58(), // Raw 32-byte private key encoded as base58
|
|
119
|
+
// Add missing properties
|
|
120
|
+
publicKeyPackage: keyPair.getPublicKeyBase58(),
|
|
121
|
+
name: this.name,
|
|
122
|
+
// Add memory safety method
|
|
123
|
+
secureClear: () => {
|
|
124
|
+
keyPair.secureClear();
|
|
125
|
+
hdNode.secureClear();
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
// Ensure cleanup on error
|
|
131
|
+
keyPair.secureClear();
|
|
132
|
+
hdNode.secureClear();
|
|
133
|
+
throw error;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Derive multiple addresses from the same mnemonic
|
|
138
|
+
*
|
|
139
|
+
* OPTIMIZATIONS:
|
|
140
|
+
* 1. Computes the seed once and reuses it for all derivations (avoids PBKDF2 per account)
|
|
141
|
+
* 2. Caches master node at m/44'/5258' - only derives final 3 levels per account
|
|
142
|
+
* 3. Uses Promise.all for parallel derivation on multi-core systems
|
|
143
|
+
*
|
|
144
|
+
* This reduces batch derivation time from ~34s to <1s for 20 accounts.
|
|
145
|
+
*/
|
|
146
|
+
async deriveMultipleWallets(options) {
|
|
147
|
+
const { mnemonic, keyType, hashTypes = [], passphrase = '', hdOptions = {}, count = 1 } = options;
|
|
148
|
+
if (!mnemonic) {
|
|
149
|
+
throw new MissingParameterError('mnemonic');
|
|
150
|
+
}
|
|
151
|
+
if (!keyType) {
|
|
152
|
+
throw new MissingParameterError('keyType');
|
|
153
|
+
}
|
|
154
|
+
if (!isValidKeyType(keyType)) {
|
|
155
|
+
throw new InvalidKeyTypeError(keyType, VALID_KEY_TYPES);
|
|
156
|
+
}
|
|
157
|
+
// Validate hash types if provided (optional — empty means key-only mode)
|
|
158
|
+
if (hashTypes.length > 0 && !validateHashTypes(hashTypes)) {
|
|
159
|
+
throw new InvalidHashTypeError('Invalid hash types array', VALID_HASH_TYPES);
|
|
160
|
+
}
|
|
161
|
+
if (!Number.isInteger(count) || count < 1) {
|
|
162
|
+
throw new Error('Count must be a positive integer');
|
|
163
|
+
}
|
|
164
|
+
// SLIP-0010 hardened offset constant
|
|
165
|
+
const HARDENED_OFFSET = 0x80000000;
|
|
166
|
+
// Generate seed ONCE from mnemonic (expensive PBKDF2 with 2048 iterations)
|
|
167
|
+
const seed = generateSeed(mnemonic, passphrase);
|
|
168
|
+
// OPTIMIZATION: Cache the master node at m/44'/5258' (shared by all accounts)
|
|
169
|
+
// This avoids re-deriving these 2 levels for every account
|
|
170
|
+
// Note: We use the constructor directly since createHDWallet validates for exactly 5 levels
|
|
171
|
+
const masterPath = `m/44'/${KALVORA_TYPE}'`;
|
|
172
|
+
const masterNode = new SLIP0010HDWallet(seed, masterPath, keyType);
|
|
173
|
+
const masterKeyMaterial = masterNode.getKeyMaterial();
|
|
174
|
+
// Helper function to derive a single wallet from the cached master node
|
|
175
|
+
const deriveSingleWallet = async (accountOffset) => {
|
|
176
|
+
const accountIndex = (hdOptions.accountIndex || 0) + accountOffset;
|
|
177
|
+
const changeIndex = hdOptions.changeIndex ?? 0;
|
|
178
|
+
const addressIndex = hdOptions.addressIndex ?? 0;
|
|
179
|
+
// Full path for record-keeping
|
|
180
|
+
const fullPath = `m/44'/${KALVORA_TYPE}'/${accountIndex}'/${changeIndex}'/${addressIndex}'`;
|
|
181
|
+
// Child indices to derive from master (account'/change'/address')
|
|
182
|
+
const childIndices = [
|
|
183
|
+
accountIndex + HARDENED_OFFSET,
|
|
184
|
+
changeIndex + HARDENED_OFFSET,
|
|
185
|
+
addressIndex + HARDENED_OFFSET
|
|
186
|
+
];
|
|
187
|
+
// Derive from cached master node (only 3 HMAC operations instead of 5)
|
|
188
|
+
const hdNode = SLIP0010HDWallet.fromParentNode(masterKeyMaterial.privateKey, masterKeyMaterial.chainCode, childIndices, fullPath, seed, keyType);
|
|
189
|
+
// Generate key pair based on key type using the `@noble` libraries
|
|
190
|
+
const keyPair = await this.generateKeyPair(hdNode, keyType);
|
|
191
|
+
try {
|
|
192
|
+
// Generate address and public key formats
|
|
193
|
+
const address = generateKalvoraAddress(keyPair.publicKey, keyType, hashTypes);
|
|
194
|
+
const publicKey = generateKalvoraPublicKeyIdentifier(keyPair.publicKey, keyType, hashTypes);
|
|
195
|
+
// Create wallet object
|
|
196
|
+
const wallet = createBaseWallet('hd', mnemonic, keyPair.getPrivateKeyBase58(), address, publicKey, this.coinType, this.symbol, fullPath, keyType, hashTypes);
|
|
197
|
+
return {
|
|
198
|
+
...wallet,
|
|
199
|
+
type: 'hd',
|
|
200
|
+
// Add extended key information for SLIP-0010 compliance
|
|
201
|
+
extendedPrivateKey: hdNode.getExtendedPrivateKey(),
|
|
202
|
+
extendedPublicKey: hdNode.getExtendedPublicKey(),
|
|
203
|
+
fingerprint: hdNode.getFingerprint(keyType),
|
|
204
|
+
depth: hdNode.depth,
|
|
205
|
+
index: hdNode.index,
|
|
206
|
+
// Only expose base58-encoded private key for security
|
|
207
|
+
privateKey: keyPair.getPrivateKeyBase58(),
|
|
208
|
+
// Add missing properties
|
|
209
|
+
publicKeyPackage: keyPair.getPublicKeyBase58(),
|
|
210
|
+
name: this.name,
|
|
211
|
+
// Add memory safety method
|
|
212
|
+
secureClear: () => {
|
|
213
|
+
keyPair.secureClear();
|
|
214
|
+
hdNode.secureClear();
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
// Ensure cleanup on error for this iteration
|
|
220
|
+
keyPair.secureClear();
|
|
221
|
+
hdNode.secureClear();
|
|
222
|
+
throw error;
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
// Derive all wallets in parallel for better performance on multi-core systems
|
|
226
|
+
const derivationPromises = Array.from({ length: count }, (_, i) => deriveSingleWallet(i));
|
|
227
|
+
try {
|
|
228
|
+
const wallets = await Promise.all(derivationPromises);
|
|
229
|
+
return wallets;
|
|
230
|
+
}
|
|
231
|
+
finally {
|
|
232
|
+
// Clear sensitive data from memory
|
|
233
|
+
masterNode.secureClear();
|
|
234
|
+
CryptoUtils.secureClear(seed);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Generate key pair based on key type using the `@noble` libraries
|
|
239
|
+
*/
|
|
240
|
+
async generateKeyPair(hdNode, keyType) {
|
|
241
|
+
if (keyType === KEY_TYPE.ED25519) {
|
|
242
|
+
return Ed25519KeyPair.fromHDNode(hdNode);
|
|
243
|
+
}
|
|
244
|
+
else if (keyType === KEY_TYPE.ED448) {
|
|
245
|
+
return Ed448KeyPair.fromHDNode(hdNode);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
throw new InvalidKeyTypeError(keyType, VALID_KEY_TYPES);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Get wallet factory information
|
|
253
|
+
*/
|
|
254
|
+
getInfo() {
|
|
255
|
+
return {
|
|
256
|
+
name: this.name,
|
|
257
|
+
symbol: this.symbol,
|
|
258
|
+
coinType: this.coinType,
|
|
259
|
+
supportedKeyTypes: VALID_KEY_TYPES,
|
|
260
|
+
supportedHashTypes: VALID_HASH_TYPES,
|
|
261
|
+
supportedMnemonicLengths: MNEMONIC_LENGTHS,
|
|
262
|
+
standard: 'BIP32 + BIP39 + SLIP-0010',
|
|
263
|
+
description: 'Unified wallet factory supporting multiple key types and hash algorithms with full SLIP-0010 compliance',
|
|
264
|
+
cryptographicLibraries: [
|
|
265
|
+
'@noble/curves - Full Ed25519 and Ed448 implementation',
|
|
266
|
+
'@noble/hashes - SHA256, SHA512, RIPEMD160',
|
|
267
|
+
'@noble/hashes/hmac - HMAC-SHA512 for SLIP-0010',
|
|
268
|
+
'bip39 - BIP39 mnemonic generation',
|
|
269
|
+
'bs58 - Base58 encoding'
|
|
270
|
+
],
|
|
271
|
+
securityFeatures: [
|
|
272
|
+
'Cryptographically secure random generation',
|
|
273
|
+
'Proper SLIP-0010 chain code handling',
|
|
274
|
+
'Fully hardened derivation support',
|
|
275
|
+
'Overflow protection',
|
|
276
|
+
'Fingerprint validation',
|
|
277
|
+
'Extended key support (xpub/xpriv)',
|
|
278
|
+
'Secure memory clearing for sensitive data',
|
|
279
|
+
'Automatic cleanup on error conditions'
|
|
280
|
+
]
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Create a new wallet with the factory
|
|
286
|
+
*/
|
|
287
|
+
export async function createWallet(options) {
|
|
288
|
+
const factory = new WalletFactory();
|
|
289
|
+
return factory.createWallet(options);
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Derive multiple wallets with the factory
|
|
293
|
+
*/
|
|
294
|
+
export async function deriveMultipleWallets(options) {
|
|
295
|
+
const factory = new WalletFactory();
|
|
296
|
+
return factory.deriveMultipleWallets(options);
|
|
297
|
+
}
|
|
298
|
+
//# sourceMappingURL=wallet-factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet-factory.js","sourceRoot":"","sources":["../../../src/wallet-creation/wallet-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAS3E,OAAO,EACL,YAAY,EAAE,cAAc,EAAE,YAAY,EAC1C,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EACnD,cAAc,E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AAgB;YAC1C,QAAQ,EAAE,2BAA2B;YACrC,WAAW,EAAE,yGAAyG;YACtH,sBAAsB,EAAE;gBACtB,uDAAuD;gBACvD,2CAA2C;gBAC3C,gDAAgD;gBAChD,mCAAmC;gBACnC,wBAAwB;aACzB;YACD,gBAAgB,EAAE;gBAChB,4CAA4C;gBAC5C,sCAAsC;gBACtC,mCAAmC;gBACnC,qBAAqB;gBACrB,wBAAwB;gBACxB,mCAAmC;gBACnC,2CAA2C;gBAC3C,uCAAuC;aACxC;SACF,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAAsB;IACvD,MAAM,OAAO,GAAG,IAAI,aAAa,EAAE,CAAC;IACpC,OAAO,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAA8B;IACxE,MAAM,OAAO,GAAG,IAAI,aAAa,EAAE,CAAC;IACpC,OAAO,OAAO,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;AAChD,CAAC"}
|
package/dist/wallet.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* kalvora.js/wallet — the wallet and key surface of kalvora.js on its own.
|
|
3
|
+
*
|
|
4
|
+
* Mnemonics, HD derivation, key pairs, and address encoding, with none of the
|
|
5
|
+
* network, protobuf, or transaction code: it depends only on @noble/curves,
|
|
6
|
+
* @noble/hashes, bip39, and bs58, and never touches the network. Use it where
|
|
7
|
+
* a Kalvora key or address is all you need, such as a browser custody layer.
|
|
8
|
+
*
|
|
9
|
+
* HD derivation: Ed25519 follows SLIP-0010 exactly; Ed448, which no standard
|
|
10
|
+
* covers, uses Kalvora's own scheme. See docs/guides/hd-derivation.md.
|
|
11
|
+
*
|
|
12
|
+
* Everything here is also exported, unchanged, from the main `kalvora.js`
|
|
13
|
+
* entry.
|
|
14
|
+
*/
|
|
15
|
+
export { WalletCreationError, InvalidKeyTypeError, InvalidHashTypeError, InvalidMnemonicLengthError, InvalidMnemonicError, InvalidDerivationPathError, InvalidHDParameterError, MissingParameterError, CryptographicError } from './src/wallet-creation/errors.js';
|
|
16
|
+
export { WalletFactory, createWallet, deriveMultipleWallets, createBaseWallet, createHDWallet, deriveMultipleAddresses, getHDWalletInfo, generateMnemonicPhrase, validateMnemonicPhrase, generateSeed, buildDerivationPath, generateKalvoraAddress, generateKalvoraPublicKeyIdentifier, generateAddressFromPublicKey, CryptoUtils, KEY_TYPE, HASH_TYPE, VALID_KEY_TYPES, VALID_HASH_TYPES, KEY_TYPE_PREFIXES, HASH_TYPE_PREFIXES, isValidKeyType, isValidHashType, KALVORA_TYPE, KALVORA_TYPE_HEX, KALVORA_SYMBOL, KALVORA_NAME, SLIP0010_DERIVATION_PATH, MNEMONIC_LENGTHS, deriveHDPrivateKey, type WalletOptions, type Wallet, type HDOptions, type MultipleWalletOptions, type KeyType, type HashType, type MnemonicLength } from './src/wallet-creation/index.js';
|
|
17
|
+
//# sourceMappingURL=wallet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../wallet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACtB,kCAAkC,EAClC,4BAA4B,EAC5B,WAAW,EACX,QAAQ,EACR,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,qBAAqB,EAC1B,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,cAAc,EACpB,MAAM,gCAAgC,CAAC"}
|
package/dist/wallet.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* kalvora.js/wallet — the wallet and key surface of kalvora.js on its own.
|
|
3
|
+
*
|
|
4
|
+
* Mnemonics, HD derivation, key pairs, and address encoding, with none of the
|
|
5
|
+
* network, protobuf, or transaction code: it depends only on @noble/curves,
|
|
6
|
+
* @noble/hashes, bip39, and bs58, and never touches the network. Use it where
|
|
7
|
+
* a Kalvora key or address is all you need, such as a browser custody layer.
|
|
8
|
+
*
|
|
9
|
+
* HD derivation: Ed25519 follows SLIP-0010 exactly; Ed448, which no standard
|
|
10
|
+
* covers, uses Kalvora's own scheme. See docs/guides/hd-derivation.md.
|
|
11
|
+
*
|
|
12
|
+
* Everything here is also exported, unchanged, from the main `kalvora.js`
|
|
13
|
+
* entry.
|
|
14
|
+
*/
|
|
15
|
+
export { WalletCreationError, InvalidKeyTypeError, InvalidHashTypeError, InvalidMnemonicLengthError, InvalidMnemonicError, InvalidDerivationPathError, InvalidHDParameterError, MissingParameterError, CryptographicError } from './src/wallet-creation/errors.js';
|
|
16
|
+
export { WalletFactory, createWallet, deriveMultipleWallets, createBaseWallet, createHDWallet, deriveMultipleAddresses, getHDWalletInfo, generateMnemonicPhrase, validateMnemonicPhrase, generateSeed, buildDerivationPath, generateKalvoraAddress, generateKalvoraPublicKeyIdentifier, generateAddressFromPublicKey, CryptoUtils, KEY_TYPE, HASH_TYPE, VALID_KEY_TYPES, VALID_HASH_TYPES, KEY_TYPE_PREFIXES, HASH_TYPE_PREFIXES, isValidKeyType, isValidHashType, KALVORA_TYPE, KALVORA_TYPE_HEX, KALVORA_SYMBOL, KALVORA_NAME, SLIP0010_DERIVATION_PATH, MNEMONIC_LENGTHS, deriveHDPrivateKey } from './src/wallet-creation/index.js';
|
|
17
|
+
//# sourceMappingURL=wallet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet.js","sourceRoot":"","sources":["../wallet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACtB,kCAAkC,EAClC,4BAA4B,EAC5B,WAAW,EACX,QAAQ,EACR,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAQnB,MAAM,gCAAgC,CAAC"}
|