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,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Metrics Collection
|
|
3
|
+
*
|
|
4
|
+
* Collects and reports performance metrics.
|
|
5
|
+
*/
|
|
6
|
+
class MetricsCollector {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.metrics = new Map();
|
|
9
|
+
this.maxPoints = 1000;
|
|
10
|
+
}
|
|
11
|
+
getMetricKey(name, labels) {
|
|
12
|
+
if (!labels)
|
|
13
|
+
return name;
|
|
14
|
+
const labelStr = Object.entries(labels)
|
|
15
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
16
|
+
.map(([k, v]) => `${k}=${v}`)
|
|
17
|
+
.join(',');
|
|
18
|
+
return `${name}{${labelStr}}`;
|
|
19
|
+
}
|
|
20
|
+
addPoint(metric, value, labels) {
|
|
21
|
+
const point = {
|
|
22
|
+
timestamp: Date.now(),
|
|
23
|
+
value,
|
|
24
|
+
labels
|
|
25
|
+
};
|
|
26
|
+
metric.points.push(point);
|
|
27
|
+
// Keep only recent points
|
|
28
|
+
if (metric.points.length > this.maxPoints) {
|
|
29
|
+
metric.points = metric.points.slice(-this.maxPoints);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
counter(name, value = 1, labels) {
|
|
33
|
+
const key = this.getMetricKey(name, labels);
|
|
34
|
+
let metric = this.metrics.get(key);
|
|
35
|
+
if (!metric) {
|
|
36
|
+
metric = {
|
|
37
|
+
name,
|
|
38
|
+
type: 'counter',
|
|
39
|
+
value: 0,
|
|
40
|
+
labels,
|
|
41
|
+
points: []
|
|
42
|
+
};
|
|
43
|
+
this.metrics.set(key, metric);
|
|
44
|
+
}
|
|
45
|
+
metric.value += value;
|
|
46
|
+
this.addPoint(metric, metric.value, labels);
|
|
47
|
+
}
|
|
48
|
+
gauge(name, value, labels) {
|
|
49
|
+
const key = this.getMetricKey(name, labels);
|
|
50
|
+
let metric = this.metrics.get(key);
|
|
51
|
+
if (!metric) {
|
|
52
|
+
metric = {
|
|
53
|
+
name,
|
|
54
|
+
type: 'gauge',
|
|
55
|
+
value,
|
|
56
|
+
labels,
|
|
57
|
+
points: []
|
|
58
|
+
};
|
|
59
|
+
this.metrics.set(key, metric);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
metric.value = value;
|
|
63
|
+
}
|
|
64
|
+
this.addPoint(metric, value, labels);
|
|
65
|
+
}
|
|
66
|
+
histogram(name, value, labels) {
|
|
67
|
+
const key = this.getMetricKey(name, labels);
|
|
68
|
+
let metric = this.metrics.get(key);
|
|
69
|
+
if (!metric) {
|
|
70
|
+
metric = {
|
|
71
|
+
name,
|
|
72
|
+
type: 'histogram',
|
|
73
|
+
value: 0,
|
|
74
|
+
labels,
|
|
75
|
+
points: []
|
|
76
|
+
};
|
|
77
|
+
this.metrics.set(key, metric);
|
|
78
|
+
}
|
|
79
|
+
this.addPoint(metric, value, labels);
|
|
80
|
+
}
|
|
81
|
+
getMetrics() {
|
|
82
|
+
return Array.from(this.metrics.values());
|
|
83
|
+
}
|
|
84
|
+
getMetric(name, labels) {
|
|
85
|
+
const key = this.getMetricKey(name, labels);
|
|
86
|
+
return this.metrics.get(key);
|
|
87
|
+
}
|
|
88
|
+
clear() {
|
|
89
|
+
this.metrics.clear();
|
|
90
|
+
}
|
|
91
|
+
export() {
|
|
92
|
+
const metrics = this.getMetrics();
|
|
93
|
+
const lines = [];
|
|
94
|
+
for (const metric of metrics) {
|
|
95
|
+
const labelStr = metric.labels
|
|
96
|
+
? `{${Object.entries(metric.labels).map(([k, v]) => `${k}="${v}"`).join(',')}}`
|
|
97
|
+
: '';
|
|
98
|
+
lines.push(`# TYPE ${metric.name} ${metric.type}`);
|
|
99
|
+
lines.push(`${metric.name}${labelStr} ${metric.value}`);
|
|
100
|
+
}
|
|
101
|
+
return lines.join('\n');
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export const metrics = new MetricsCollector();
|
|
105
|
+
//# sourceMappingURL=metrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../../src/shared/monitoring/metrics.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgBH,MAAM,gBAAgB;IAAtB;QACU,YAAO,GAAwB,IAAI,GAAG,EAAE,CAAC;QAChC,cAAS,GAAG,IAAI,CAAC;IA+GpC,CAAC;IA7GS,YAAY,CAAC,IAAY,EAAE,MAA+B;QAChE,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACzB,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;aACpC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;aACtC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;aAC5B,IAAI,CAAC,GAAG,CAAC,CAAC;QACb,OAAO,GAAG,IAAI,IAAI,QAAQ,GAAG,CAAC;IAChC,CAAC;IAEO,QAAQ,CAAC,MAAc,EAAE,KAAa,EAAE,MAA+B;QAC7E,MAAM,KAAK,GAAgB;YACzB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,KAAK;YACL,MAAM;SACP,C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AK,GAAa,EAAE,CAAC;QAE3B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM;gBAC5B,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;gBAC/E,CAAC,CAAC,EAAE,CAAC;YAEP,KAAK,CAAC,IAAI,CAAC,UAAU,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;YACnD,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,GAAG,QAAQ,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1D,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kalvora network identifiers and protocol-level identifier validation.
|
|
3
|
+
*
|
|
4
|
+
* Kalvora stores token and contract references as mint IDs. Native/local mint
|
|
5
|
+
* IDs are plain bounded identifiers; bridge instruments may retain the
|
|
6
|
+
* `$sol-ASSET+VERSION` form used by the Kalvora bridge APIs.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Mint ID of the native Kalvora token (symbol `KALV`, name `Kalvora`).
|
|
10
|
+
*
|
|
11
|
+
* Kalvora contract IDs are hash-derived (`KAL` + base58 digest, found with
|
|
12
|
+
* `InstrumentContract.vanity_nonce`). The native token has 9 decimals
|
|
13
|
+
* (denomination `1000000000`, smallest unit "kalv"), is the default base-fee
|
|
14
|
+
* instrument for every builder, and is exempt from the non-native fee
|
|
15
|
+
* multiplier.
|
|
16
|
+
*
|
|
17
|
+
* The pre-release placeholder `KAL111112` is rejected by the network as a
|
|
18
|
+
* malformed contract ID.
|
|
19
|
+
*/
|
|
20
|
+
export declare const KALVORA_NATIVE_TOKEN: "KALXvxhUMJERCse4e6b2jeXFkcqqpiUByQQckvPZm4szmF3Ao";
|
|
21
|
+
/** Chain identifier of Kalvora protonet (used in WalletConnect and proposal contexts). */
|
|
22
|
+
export declare const KALVORA_PROTONET_NETWORK: "kalvora:protonet";
|
|
23
|
+
/** Maximum UTF-8 byte length of a mint ID accepted by the API. */
|
|
24
|
+
export declare const KALVORA_MINT_ID_MAX_BYTES: 512;
|
|
25
|
+
/**
|
|
26
|
+
* Validate the bounded, printable mint-ID form accepted by this SDK.
|
|
27
|
+
*
|
|
28
|
+
* The network owns the final semantic validation. The SDK only rejects
|
|
29
|
+
* values that cannot safely be sent as canonical identifiers or exceed the
|
|
30
|
+
* API's documented 512-byte bound.
|
|
31
|
+
*/
|
|
32
|
+
export declare function isKalvoraMintId(value: unknown): value is string;
|
|
33
|
+
export declare const KALVORA_MINT_ID_ERROR: string;
|
|
34
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/shared/network/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,EAAG,mDAA4D,CAAC;AACjG,0FAA0F;AAC1F,eAAO,MAAM,wBAAwB,EAAG,kBAA2B,CAAC;AAEpE,kEAAkE;AAClE,eAAO,MAAM,yBAAyB,EAAG,GAAY,CAAC;AAMtD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAa/D;AAED,eAAO,MAAM,qBAAqB,QAC8E,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kalvora network identifiers and protocol-level identifier validation.
|
|
3
|
+
*
|
|
4
|
+
* Kalvora stores token and contract references as mint IDs. Native/local mint
|
|
5
|
+
* IDs are plain bounded identifiers; bridge instruments may retain the
|
|
6
|
+
* `$sol-ASSET+VERSION` form used by the Kalvora bridge APIs.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Mint ID of the native Kalvora token (symbol `KALV`, name `Kalvora`).
|
|
10
|
+
*
|
|
11
|
+
* Kalvora contract IDs are hash-derived (`KAL` + base58 digest, found with
|
|
12
|
+
* `InstrumentContract.vanity_nonce`). The native token has 9 decimals
|
|
13
|
+
* (denomination `1000000000`, smallest unit "kalv"), is the default base-fee
|
|
14
|
+
* instrument for every builder, and is exempt from the non-native fee
|
|
15
|
+
* multiplier.
|
|
16
|
+
*
|
|
17
|
+
* The pre-release placeholder `KAL111112` is rejected by the network as a
|
|
18
|
+
* malformed contract ID.
|
|
19
|
+
*/
|
|
20
|
+
export const KALVORA_NATIVE_TOKEN = 'KALXvxhUMJERCse4e6b2jeXFkcqqpiUByQQckvPZm4szmF3Ao';
|
|
21
|
+
/** Chain identifier of Kalvora protonet (used in WalletConnect and proposal contexts). */
|
|
22
|
+
export const KALVORA_PROTONET_NETWORK = 'kalvora:protonet';
|
|
23
|
+
/** Maximum UTF-8 byte length of a mint ID accepted by the API. */
|
|
24
|
+
export const KALVORA_MINT_ID_MAX_BYTES = 512;
|
|
25
|
+
const KALVORA_MINT_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:+/-]*$/u;
|
|
26
|
+
const KALVORA_BRIDGED_MINT_ID_PATTERN = /^\$[A-Za-z0-9]+-[A-Za-z0-9]+(?:\+[A-Za-z0-9]+)?$/u;
|
|
27
|
+
const UTF8_ENCODER = new TextEncoder();
|
|
28
|
+
/**
|
|
29
|
+
* Validate the bounded, printable mint-ID form accepted by this SDK.
|
|
30
|
+
*
|
|
31
|
+
* The network owns the final semantic validation. The SDK only rejects
|
|
32
|
+
* values that cannot safely be sent as canonical identifiers or exceed the
|
|
33
|
+
* API's documented 512-byte bound.
|
|
34
|
+
*/
|
|
35
|
+
export function isKalvoraMintId(value) {
|
|
36
|
+
if (typeof value !== 'string' || value.length === 0 || value !== value.trim()) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (UTF8_ENCODER.encode(value).length > KALVORA_MINT_ID_MAX_BYTES) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return (KALVORA_MINT_ID_PATTERN.test(value) ||
|
|
43
|
+
KALVORA_BRIDGED_MINT_ID_PATTERN.test(value));
|
|
44
|
+
}
|
|
45
|
+
export const KALVORA_MINT_ID_ERROR = `a Kalvora mint ID (1-${KALVORA_MINT_ID_MAX_BYTES} bytes, using a local identifier or supported bridged form)`;
|
|
46
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/shared/network/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mDAA4D,CAAC;AACjG,0FAA0F;AAC1F,MAAM,CAAC,MAAM,wBAAwB,GAAG,kBAA2B,CAAC;AAEpE,kEAAkE;AAClE,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAY,CAAC;AAEtD,MAAM,uBAAuB,GAAG,kCAAkC,CAAC;AACnE,MAAM,+BAA+B,GAAG,mDAAmD,CAAC;AAC5F,MAAM,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC;AAEvC;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,KAAK,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAC9E,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,yBAAyB,EAAE,CAAC;QAClE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,CACL,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC;QACnC,+BAA+B,CAAC,IAAI,CAAC,KAAK,CAAC,CAC5C,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAChC,wBAAwB,yBAAyB,6DAA6D,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized Protobuf Imports
|
|
3
|
+
*
|
|
4
|
+
* This file provides a single import point for all protobuf-related types and enums.
|
|
5
|
+
* This eliminates the need for long relative import paths throughout the codebase.
|
|
6
|
+
*/
|
|
7
|
+
import { TRANSACTION_TYPE, TXN_STATUS, CONTRACT_FEE_TYPE, GOVERNANCE_TYPE, CONTRACT_TYPE, LANGUAGE, PROPOSAL_PERIOD, VARIABLE_TYPE } from '../../../proto/generated/txn_pb.js';
|
|
8
|
+
export { TRANSACTION_TYPE, TXN_STATUS, CONTRACT_FEE_TYPE, GOVERNANCE_TYPE, CONTRACT_TYPE, LANGUAGE, PROPOSAL_PERIOD, VARIABLE_TYPE };
|
|
9
|
+
export type { CoinTXN, MintTXN, ItemizedMintTXN, InstrumentContract, GovernanceVote, GovernanceProposal, SmartContractTXN, SmartContractExecuteTXN, SmartContractInstantiateTXN, ExpenseRatioTXN, NFTTXN, ContractUpdateTXN, DelegatedTXN, QuashTXN, RevokeTXN, ComplianceTXN, BurnSBTTXN, AllowanceTXN, ProposalCancelTXN, BaseTXN, TransferAuthentication, PublicKey } from '../../../proto/generated/txn_pb.js';
|
|
10
|
+
export type TransactionType = typeof TRANSACTION_TYPE;
|
|
11
|
+
export type TxnStatus = typeof TXN_STATUS;
|
|
12
|
+
export type ContractFeeType = typeof CONTRACT_FEE_TYPE;
|
|
13
|
+
export type GovernanceType = typeof GOVERNANCE_TYPE;
|
|
14
|
+
export type ContractType = typeof CONTRACT_TYPE;
|
|
15
|
+
export type Language = typeof LANGUAGE;
|
|
16
|
+
export type ProposalPeriod = typeof PROPOSAL_PERIOD;
|
|
17
|
+
export type VariableType = typeof VARIABLE_TYPE;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/protobuf/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,QAAQ,EACR,eAAe,EACf,aAAa,EACd,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,QAAQ,EACR,eAAe,EACf,aAAa,EACd,CAAC;AAGF,YAAY,EACV,OAAO,EACP,OAAO,EACP,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,2BAA2B,EAC3B,eAAe,EACf,MAAM,EACN,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,OAAO,EACP,sBAAsB,EACtB,SAAS,EACV,MAAM,oCAAoC,CAAC;AAG5C,MAAM,MAAM,eAAe,GAAG,OAAO,gBAAgB,CAAC;AACtD,MAAM,MAAM,SAAS,GAAG,OAAO,UAAU,CAAC;AAC1C,MAAM,MAAM,eAAe,GAAG,OAAO,iBAAiB,CAAC;AACvD,MAAM,MAAM,cAAc,GAAG,OAAO,eAAe,CAAC;AACpD,MAAM,MAAM,YAAY,GAAG,OAAO,aAAa,CAAC;AAChD,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC;AACvC,MAAM,MAAM,cAAc,GAAG,OAAO,eAAe,CAAC;AACpD,MAAM,MAAM,YAAY,GAAG,OAAO,aAAa,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized Protobuf Imports
|
|
3
|
+
*
|
|
4
|
+
* This file provides a single import point for all protobuf-related types and enums.
|
|
5
|
+
* This eliminates the need for long relative import paths throughout the codebase.
|
|
6
|
+
*/
|
|
7
|
+
// Import and re-export all enums from generated protobuf files
|
|
8
|
+
import { TRANSACTION_TYPE, TXN_STATUS, CONTRACT_FEE_TYPE, GOVERNANCE_TYPE, CONTRACT_TYPE, LANGUAGE, PROPOSAL_PERIOD, VARIABLE_TYPE } from '../../../proto/generated/txn_pb.js';
|
|
9
|
+
export { TRANSACTION_TYPE, TXN_STATUS, CONTRACT_FEE_TYPE, GOVERNANCE_TYPE, CONTRACT_TYPE, LANGUAGE, PROPOSAL_PERIOD, VARIABLE_TYPE };
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared/protobuf/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+DAA+D;AAC/D,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,QAAQ,EACR,eAAe,EACf,aAAa,EACd,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,QAAQ,EACR,eAAe,EACf,aAAa,EACd,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for standard (non-CoinTXN) transactions
|
|
3
|
+
*/
|
|
4
|
+
import type { BaseTXN } from '../../../proto/generated/txn_pb.js';
|
|
5
|
+
import type { GRPCConfig } from '../../types/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Build a standard BaseTXN (includes public key and nonce)
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildStandardBaseTXN(params: {
|
|
10
|
+
publicKeyId: string;
|
|
11
|
+
feeId?: string;
|
|
12
|
+
feeAmountParts?: string;
|
|
13
|
+
nonce: bigint;
|
|
14
|
+
memo?: string;
|
|
15
|
+
timestamp?: Date;
|
|
16
|
+
}): BaseTXN;
|
|
17
|
+
/**
|
|
18
|
+
* Derive address from public key identifier and fetch its nonce
|
|
19
|
+
*/
|
|
20
|
+
export declare function getAddressAndNonce(publicKeyId: string, grpcConfig?: GRPCConfig): Promise<{
|
|
21
|
+
address: string;
|
|
22
|
+
nonce: bigint;
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/shared/tx/base.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAIlE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE;IACN,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB,GACA,OAAO,CAuCT;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,EACnB,UAAU,GAAE,UAAe,GAC1B,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAK7C"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for standard (non-CoinTXN) transactions
|
|
3
|
+
*/
|
|
4
|
+
import { protoInt64, create } from '@bufbuild/protobuf';
|
|
5
|
+
import { TimestampSchema } from '../../../proto/generated/google/protobuf/timestamp_pb.js';
|
|
6
|
+
import { BaseTXNSchema, PublicKeySchema } from '../../../proto/generated/txn_pb.js';
|
|
7
|
+
import { getNonce as fetchNonce } from '../../api/handler/nonce/service.js';
|
|
8
|
+
import { generateAddressFromPublicKey, getPublicKeyBytes } from '../../shared/crypto/address-utils.js';
|
|
9
|
+
import { KALVORA_NATIVE_TOKEN } from '../../shared/network/constants.js';
|
|
10
|
+
/**
|
|
11
|
+
* Build a standard BaseTXN (includes public key and nonce)
|
|
12
|
+
*/
|
|
13
|
+
export function buildStandardBaseTXN(params) {
|
|
14
|
+
const { publicKeyId, nonce, memo } = params;
|
|
15
|
+
const finalFeeId = params.feeId || KALVORA_NATIVE_TOKEN;
|
|
16
|
+
const finalFeeAmount = params.feeAmountParts || '1';
|
|
17
|
+
if (!finalFeeAmount || finalFeeAmount === '0') {
|
|
18
|
+
throw new Error('Base fee must be provided and cannot be 0');
|
|
19
|
+
}
|
|
20
|
+
const now = params.timestamp ?? new Date();
|
|
21
|
+
const timestampMilliseconds = now instanceof Date ? now.getTime() : Number.NaN;
|
|
22
|
+
const earliestProtobufTimestamp = Date.parse('0001-01-01T00:00:00.000Z');
|
|
23
|
+
const latestProtobufTimestamp = Date.parse('9999-12-31T23:59:59.999Z');
|
|
24
|
+
if (!Number.isFinite(timestampMilliseconds) ||
|
|
25
|
+
timestampMilliseconds < earliestProtobufTimestamp ||
|
|
26
|
+
timestampMilliseconds > latestProtobufTimestamp) {
|
|
27
|
+
throw new Error('Base transaction timestamp must be a valid protobuf Date');
|
|
28
|
+
}
|
|
29
|
+
const timestampSeconds = Math.floor(timestampMilliseconds / 1000);
|
|
30
|
+
const timestamp = create(TimestampSchema, {
|
|
31
|
+
seconds: protoInt64.parse(timestampSeconds),
|
|
32
|
+
nanos: (timestampMilliseconds - timestampSeconds * 1000) * 1000000
|
|
33
|
+
});
|
|
34
|
+
const publicKey = create(PublicKeySchema, {
|
|
35
|
+
single: new Uint8Array(getPublicKeyBytes(publicKeyId))
|
|
36
|
+
});
|
|
37
|
+
const base = {
|
|
38
|
+
publicKey,
|
|
39
|
+
timestamp,
|
|
40
|
+
feeAmount: String(finalFeeAmount),
|
|
41
|
+
feeId: finalFeeId,
|
|
42
|
+
nonce
|
|
43
|
+
};
|
|
44
|
+
if (memo && memo.trim() !== '')
|
|
45
|
+
base.memo = memo;
|
|
46
|
+
return create(BaseTXNSchema, base);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Derive address from public key identifier and fetch its nonce
|
|
50
|
+
*/
|
|
51
|
+
export async function getAddressAndNonce(publicKeyId, grpcConfig = {}) {
|
|
52
|
+
const address = generateAddressFromPublicKey(publicKeyId);
|
|
53
|
+
const nonceDecimal = await fetchNonce(address, grpcConfig);
|
|
54
|
+
const nonce = protoInt64.uParse(nonceDecimal.toString());
|
|
55
|
+
return { address, nonce };
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/shared/tx/base.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAEpF,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACvG,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAGzE;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAOC;IAED,MAAM,EAAE,WAAW,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ACvD,CAAC,CAAC;IAEH,MAAM,IAAI,GAA4B;QACpC,SAAS;QACT,SAAS;QACT,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC;QACjC,KAAK,EAAE,UAAU;QACjB,KAAK;KACN,CAAC;IACF,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAEjD,OAAO,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,WAAmB,EACnB,aAAyB,EAAE;IAE3B,MAAM,OAAO,GAAG,4BAA4B,CAAC,WAAW,CAAC,CAAC;IAC1D,MAAM,YAAY,GAAG,MAAM,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC3D,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standard Transaction Pipeline
|
|
3
|
+
*
|
|
4
|
+
* Every Kalvora transaction other than `CoinTXN` shares the same envelope:
|
|
5
|
+
* a single-signer {@link BaseTXN} (public key, timestamp, nonce, fee, memo,
|
|
6
|
+
* optional safe-send / interface-fee fields) followed by type-specific fields.
|
|
7
|
+
*
|
|
8
|
+
* This module centralises the build → fee → sign → submit lifecycle so that
|
|
9
|
+
* individual transaction modules only describe *their own* fields:
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* export async function buildQuashTXN(input, options) {
|
|
13
|
+
* return buildStandardTransaction({
|
|
14
|
+
* operation: 'buildQuashTXN',
|
|
15
|
+
* schema: QuashTXNSchema,
|
|
16
|
+
* publicKeyId: input.publicKey,
|
|
17
|
+
* contractId: input.contractId,
|
|
18
|
+
* fields: { contractId: input.contractId, txnHash: parseHash32(input.txnHash, 'txnHash') },
|
|
19
|
+
* options
|
|
20
|
+
* });
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* ## Lifecycle
|
|
25
|
+
*
|
|
26
|
+
* | Stage | Function | Network? |
|
|
27
|
+
* |---------|----------------------------------|---------------------------------|
|
|
28
|
+
* | build | {@link buildStandardTransaction} | nonce + fee lookup unless given |
|
|
29
|
+
* | sign | {@link signWithKey} / `signAndFinalize` | no |
|
|
30
|
+
* | submit | {@link submitStandardTransaction}| yes |
|
|
31
|
+
*
|
|
32
|
+
* Passing both `nonce` and `feeAmountParts` makes `build` fully offline and
|
|
33
|
+
* deterministic (useful for cold signing, tests, and hardware wallets).
|
|
34
|
+
*
|
|
35
|
+
* @module shared/tx/standard
|
|
36
|
+
*/
|
|
37
|
+
import { type DescMessage, type MessageInitShape, type MessageShape } from '@bufbuild/protobuf';
|
|
38
|
+
import type { BaseTXN } from '../../../proto/generated/txn_pb.js';
|
|
39
|
+
import type { GRPCConfig } from '../../types/index.js';
|
|
40
|
+
/**
|
|
41
|
+
* Options accepted by every standard (single-signer, `BaseTXN`-based)
|
|
42
|
+
* transaction builder in the SDK.
|
|
43
|
+
*
|
|
44
|
+
* All fields are optional. Omitted values are resolved from the network
|
|
45
|
+
* (nonce, base fee) or fall back to documented defaults.
|
|
46
|
+
*/
|
|
47
|
+
export interface StandardTXNOptions {
|
|
48
|
+
/**
|
|
49
|
+
* gRPC endpoint used for nonce and fee lookups.
|
|
50
|
+
* Defaults to {@link PROTONET_GRPC_CONFIG} (which currently targets protonet).
|
|
51
|
+
*/
|
|
52
|
+
grpcConfig?: GRPCConfig;
|
|
53
|
+
/**
|
|
54
|
+
* Explicit replay-protection nonce. When set, the network nonce lookup is
|
|
55
|
+
* skipped. Must be the *next* nonce for the signing wallet (current + 1).
|
|
56
|
+
*
|
|
57
|
+
* WARNING: manual nonces are not validated; an incorrect value causes the
|
|
58
|
+
* network to reject the transaction.
|
|
59
|
+
*/
|
|
60
|
+
nonce?: string | number | bigint;
|
|
61
|
+
/** Transaction timestamp. Defaults to `new Date()`. */
|
|
62
|
+
timestamp?: Date;
|
|
63
|
+
/** Optional free-form memo stored on-chain in `BaseTXN.memo`. */
|
|
64
|
+
memo?: string;
|
|
65
|
+
/** Base (network) fee instrument. Defaults to {@link KALVORA_NATIVE_TOKEN}. */
|
|
66
|
+
feeId?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Exact base fee in the fee instrument's smallest units ("parts").
|
|
69
|
+
* When set, the automatic fee calculation (and its network calls) is skipped.
|
|
70
|
+
*/
|
|
71
|
+
feeAmountParts?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Maximum overestimate applied to the automatically calculated base fee,
|
|
74
|
+
* in percent (default 5). The network only charges the real fee.
|
|
75
|
+
*/
|
|
76
|
+
overestimatePercent?: number;
|
|
77
|
+
/**
|
|
78
|
+
* When `true`, sets `BaseTXN.safe_send`, asking validators to reject the
|
|
79
|
+
* transaction instead of executing it if any recipient wallet does not yet
|
|
80
|
+
* exist. Omitted from the wire when not set.
|
|
81
|
+
*/
|
|
82
|
+
safeSend?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Optional interface (front-end / integrator) fee. All three interface
|
|
85
|
+
* fields must be supplied together. `interfaceFee` is in whole-token units.
|
|
86
|
+
*/
|
|
87
|
+
interfaceFeeId?: string;
|
|
88
|
+
/** Interface fee amount in whole-token units (e.g. `'0.25'`). */
|
|
89
|
+
interfaceFee?: string;
|
|
90
|
+
/** Base58 address that receives the interface fee. */
|
|
91
|
+
interfaceAddress?: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Parameters for {@link buildStandardTransaction}.
|
|
95
|
+
*
|
|
96
|
+
* @typeParam Desc - protobuf-es message descriptor (e.g. `QuashTXNSchema`)
|
|
97
|
+
*/
|
|
98
|
+
export interface BuildStandardTransactionParams<Desc extends DescMessage> {
|
|
99
|
+
/** Name of the public builder, used in logs and error messages. */
|
|
100
|
+
operation: string;
|
|
101
|
+
/** Generated protobuf-es schema for the transaction message. */
|
|
102
|
+
schema: Desc;
|
|
103
|
+
/** Base58 public key identifier of the signer (e.g. `A_c_…`). */
|
|
104
|
+
publicKeyId: string;
|
|
105
|
+
/**
|
|
106
|
+
* Contract the transaction acts on. Used to look up fee information; pass
|
|
107
|
+
* `undefined` for transactions that are not bound to a single contract.
|
|
108
|
+
*/
|
|
109
|
+
contractId?: string | undefined;
|
|
110
|
+
/** Type-specific message fields (everything except `base`). */
|
|
111
|
+
fields: Omit<MessageInitShape<Desc>, 'base' | '$typeName'>;
|
|
112
|
+
/** Shared builder options. */
|
|
113
|
+
options?: StandardTXNOptions;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Ensure a value is a bounded, printable Kalvora mint/contract ID.
|
|
117
|
+
*
|
|
118
|
+
* This is a *syntactic* check only (see `isKalvoraMintId`); the network
|
|
119
|
+
* performs the final semantic validation (e.g. whether the contract exists).
|
|
120
|
+
*
|
|
121
|
+
* @param value - Candidate contract ID (e.g. `KALXvxhUMJERCse4e6b2jeXFkcqqpiUByQQckvPZm4szmF3Ao`)
|
|
122
|
+
* @param field - Field name used in the error message
|
|
123
|
+
* @returns The same value, typed as a string
|
|
124
|
+
* @throws Error when the ID is not canonical
|
|
125
|
+
*/
|
|
126
|
+
export declare function requireContractId(value: unknown, field?: string): string;
|
|
127
|
+
/**
|
|
128
|
+
* Decode a base58 wallet address into raw bytes, with a field-specific error.
|
|
129
|
+
*
|
|
130
|
+
* @param address - Base58 Kalvora wallet address
|
|
131
|
+
* @param field - Field name used in the error message
|
|
132
|
+
* @returns Raw address bytes suitable for protobuf `bytes` fields
|
|
133
|
+
*/
|
|
134
|
+
export declare function parseAddress(address: unknown, field?: string): Uint8Array;
|
|
135
|
+
/**
|
|
136
|
+
* Parse a 32-byte hash (transaction hash, proposal ID) from hex.
|
|
137
|
+
* Accepts an optional `0x` prefix.
|
|
138
|
+
*
|
|
139
|
+
* @param hex - 64 hex characters, optionally `0x`-prefixed
|
|
140
|
+
* @param field - Field name used in the error message
|
|
141
|
+
*/
|
|
142
|
+
export declare function parseHash32(hex: unknown, field?: string): Uint8Array;
|
|
143
|
+
/**
|
|
144
|
+
* Parse a non-negative integer amount expressed in a token's smallest units
|
|
145
|
+
* ("parts"). Returned as a canonical decimal string (no leading zeros).
|
|
146
|
+
*
|
|
147
|
+
* @param value - Integer as string, number, or bigint
|
|
148
|
+
* @param field - Field name used in the error message
|
|
149
|
+
* @param allowZero - Whether `0` is acceptable (default `false`)
|
|
150
|
+
*/
|
|
151
|
+
export declare function parsePartsAmount(value: unknown, field?: string, allowZero?: boolean): string;
|
|
152
|
+
/**
|
|
153
|
+
* Parse an unsigned 64-bit integer (nonce, height) with a field-specific error.
|
|
154
|
+
*
|
|
155
|
+
* @param value - Integer as string, number, or bigint
|
|
156
|
+
* @param field - Field name used in the error message
|
|
157
|
+
*/
|
|
158
|
+
export declare function parseUint64(value: unknown, field?: string): bigint;
|
|
159
|
+
/**
|
|
160
|
+
* Convert a `Date` into a protobuf `Timestamp` init shape.
|
|
161
|
+
*
|
|
162
|
+
* @throws Error when the date is invalid
|
|
163
|
+
*/
|
|
164
|
+
export declare function toTimestampInit(date: Date, field?: string): {
|
|
165
|
+
seconds: bigint;
|
|
166
|
+
nanos: number;
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Resolve the nonce for a standard transaction: use the explicit option when
|
|
170
|
+
* given, otherwise query the network for the signer's next nonce.
|
|
171
|
+
*/
|
|
172
|
+
export declare function resolveNonce(operation: string, publicKeyId: string, options: StandardTXNOptions): Promise<bigint>;
|
|
173
|
+
/**
|
|
174
|
+
* Build an **unsigned** standard transaction.
|
|
175
|
+
*
|
|
176
|
+
* Steps:
|
|
177
|
+
* 1. Validate `publicKeyId`, `feeId`, and interface-fee options.
|
|
178
|
+
* 2. Resolve the nonce (explicit or network).
|
|
179
|
+
* 3. Build the `BaseTXN` (timestamp, memo, fee instrument, safe-send).
|
|
180
|
+
* 4. Create the protobuf message from `fields`.
|
|
181
|
+
* 5. Compute the base fee (and interface fee) unless `feeAmountParts` is set.
|
|
182
|
+
* 6. Assert no signature/hash material leaked into the unsigned message.
|
|
183
|
+
*
|
|
184
|
+
* @returns A fully-populated but unsigned protobuf message.
|
|
185
|
+
*/
|
|
186
|
+
export declare function buildStandardTransaction<Desc extends DescMessage>(params: BuildStandardTransactionParams<Desc>): Promise<MessageShape<Desc>>;
|
|
187
|
+
/**
|
|
188
|
+
* Submit any signed standard transaction via the universal transaction client.
|
|
189
|
+
*
|
|
190
|
+
* @param txn - Signed protobuf transaction
|
|
191
|
+
* @param grpcConfig - Endpoint configuration
|
|
192
|
+
* @returns Hex transaction hash
|
|
193
|
+
*/
|
|
194
|
+
export declare function submitStandardTransaction(txn: {
|
|
195
|
+
$typeName: string;
|
|
196
|
+
base?: BaseTXN;
|
|
197
|
+
}, grpcConfig?: GRPCConfig): Promise<string>;
|
|
198
|
+
//# sourceMappingURL=standard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standard.d.ts","sourceRoot":"","sources":["../../../../src/shared/tx/standard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAsB,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEpH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAmBvD;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACjC,uDAAuD;I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