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,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kalvora Release Transactions
|
|
3
|
+
*
|
|
4
|
+
* Inbound bridge operations: Release locked Kalvora tokens, mint wrapped SOL tokens,
|
|
5
|
+
* or create new wrapped tokens when receiving from Solana.
|
|
6
|
+
*
|
|
7
|
+
* ## Functions
|
|
8
|
+
* - `releaseKalvora` - Release locked Kalvora tokens (from Solana lock)
|
|
9
|
+
* - `mintSol` - Mint wrapped SOL tokens (for existing wrapped tokens)
|
|
10
|
+
* - `createSol` - Create wrapped SOL token (first time bridge)
|
|
11
|
+
*/
|
|
12
|
+
import { KALVORA_NATIVE_TOKEN } from '../../../../../shared/network/constants.js';
|
|
13
|
+
import { PROTONET_GRPC_CONFIG } from '../../../../../shared/utils/testing-defaults/index.js';
|
|
14
|
+
import { sendSmartContractExecuteTXN } from '../../../../execute/index.js';
|
|
15
|
+
import { BRIDGE_FUNCTIONS, createBridgeTransaction } from '../utils.js';
|
|
16
|
+
// ============================================================================
|
|
17
|
+
// RELEASE Kalvora (Solana → Kalvora, for locked Kalvora tokens)
|
|
18
|
+
// ============================================================================
|
|
19
|
+
/**
|
|
20
|
+
* Release locked Kalvora tokens
|
|
21
|
+
*
|
|
22
|
+
* Called after a user locks tokens on Solana to release the corresponding
|
|
23
|
+
* Kalvora tokens that were previously locked.
|
|
24
|
+
*
|
|
25
|
+
* @param toKalvoraAddress - Kalvora address to receive the released tokens
|
|
26
|
+
* @param publicKeyBase58Identifier - Public key of the transaction sender
|
|
27
|
+
* @param privateKeyBase58 - Private key of the transaction sender
|
|
28
|
+
* @param options - Configuration including the guardian payload
|
|
29
|
+
* @returns The created transaction (not yet sent)
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* import { guardianBridge, releaseKalvoraAndSend } from 'kalvora.js';
|
|
34
|
+
*
|
|
35
|
+
* // Fetch the guardian-signed payload for the Solana lock transaction
|
|
36
|
+
* const payload = await guardianBridge.fetchKalvoraVAA(solanaTxSignature, guardianConfig);
|
|
37
|
+
*
|
|
38
|
+
* // Release tokens on Kalvora
|
|
39
|
+
* const hash = await releaseKalvoraAndSend(
|
|
40
|
+
* kalvoraAddress,
|
|
41
|
+
* publicKey,
|
|
42
|
+
* privateKey,
|
|
43
|
+
* { payload }
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export async function releaseKalvora(toKalvoraAddress, publicKeyBase58Identifier, privateKeyBase58, options) {
|
|
48
|
+
if (!toKalvoraAddress)
|
|
49
|
+
throw new Error('toKalvoraAddress is required');
|
|
50
|
+
if (!options.payload)
|
|
51
|
+
throw new Error('payload is required');
|
|
52
|
+
const { payload } = options;
|
|
53
|
+
if (payload.payload.case !== 'releasePayload') {
|
|
54
|
+
throw new Error(`Expected releasePayload, got: ${payload.payload.case}`);
|
|
55
|
+
}
|
|
56
|
+
const releasePayload = payload.payload.value;
|
|
57
|
+
// Separate params matching the contract's release function (BRIDGE_FUNCTIONS.releaseKalvora):
|
|
58
|
+
// (contract_id, amount, wallet_address, tx_signature, signed_hash, signatures, guardian_keys)
|
|
59
|
+
const signatures = payload.signatures.join('|');
|
|
60
|
+
const guardianKeys = payload.publicKeys.join('|');
|
|
61
|
+
const parameterValue = [
|
|
62
|
+
releasePayload.zeraContractId, // contract_id (generated guardian proto field)
|
|
63
|
+
releasePayload.amount, // amount
|
|
64
|
+
toKalvoraAddress, // wallet_address
|
|
65
|
+
releasePayload.txSignature, // tx_signature
|
|
66
|
+
payload.signedHash, // signed_hash
|
|
67
|
+
signatures, // signatures (pipe-separated)
|
|
68
|
+
guardianKeys // guardian_keys (pipe-separated)
|
|
69
|
+
].join(',');
|
|
70
|
+
const feeId = options.feeId || releasePayload.zeraContractId;
|
|
71
|
+
return createBridgeTransaction(BRIDGE_FUNCTIONS.releaseKalvora, parameterValue, publicKeyBase58Identifier, privateKeyBase58, feeId, options);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Release Kalvora tokens and send in one call
|
|
75
|
+
*/
|
|
76
|
+
export async function releaseKalvoraAndSend(toKalvoraAddress, publicKeyBase58Identifier, privateKeyBase58, options) {
|
|
77
|
+
const txn = await releaseKalvora(toKalvoraAddress, publicKeyBase58Identifier, privateKeyBase58, options);
|
|
78
|
+
const grpcConfig = options.grpcConfig || PROTONET_GRPC_CONFIG;
|
|
79
|
+
return sendSmartContractExecuteTXN(txn, grpcConfig);
|
|
80
|
+
}
|
|
81
|
+
// ============================================================================
|
|
82
|
+
// MINT SOL (Solana → Kalvora, for existing wrapped SOL)
|
|
83
|
+
// ============================================================================
|
|
84
|
+
/**
|
|
85
|
+
* Mint wrapped SOL tokens on Kalvora
|
|
86
|
+
*
|
|
87
|
+
* Called after a user locks SOL/SPL tokens on Solana to mint the corresponding
|
|
88
|
+
* wrapped tokens on Kalvora. Use this for tokens that already have a wrapped version.
|
|
89
|
+
*
|
|
90
|
+
* @param toKalvoraAddress - Kalvora address to receive the minted tokens
|
|
91
|
+
* @param publicKeyBase58Identifier - Public key of the transaction sender
|
|
92
|
+
* @param privateKeyBase58 - Private key of the transaction sender
|
|
93
|
+
* @param options - Configuration including the guardian payload
|
|
94
|
+
* @returns The created transaction (not yet sent)
|
|
95
|
+
*/
|
|
96
|
+
export async function mintSol(toKalvoraAddress, publicKeyBase58Identifier, privateKeyBase58, options) {
|
|
97
|
+
if (!toKalvoraAddress)
|
|
98
|
+
throw new Error('toKalvoraAddress is required');
|
|
99
|
+
if (!options.payload)
|
|
100
|
+
throw new Error('payload is required');
|
|
101
|
+
const { payload } = options;
|
|
102
|
+
if (payload.payload.case !== 'mintPayload') {
|
|
103
|
+
throw new Error(`Expected mintPayload, got: ${payload.payload.case}`);
|
|
104
|
+
}
|
|
105
|
+
const mintPayload = payload.payload.value;
|
|
106
|
+
// Format: mint_id,amount,wallet_address,token_price,tx_signature,signed_hash,signatures,guardian_keys
|
|
107
|
+
// Rust fn signature: mint_sol(mint_id, amount, wallet_address, token_price, tx_signature, signed_hash, signatures, guardian_keys)
|
|
108
|
+
const signatures = payload.signatures.join('|');
|
|
109
|
+
const guardianKeys = payload.publicKeys.join('|');
|
|
110
|
+
const parameterValue = [
|
|
111
|
+
mintPayload.solanaMintAddress, // mint_id
|
|
112
|
+
mintPayload.amount, // amount
|
|
113
|
+
toKalvoraAddress, // wallet_address
|
|
114
|
+
mintPayload.usdPrice, // token_price
|
|
115
|
+
mintPayload.txSignature, // tx_signature
|
|
116
|
+
payload.signedHash, // signed_hash
|
|
117
|
+
signatures, // signatures (pipe-separated)
|
|
118
|
+
guardianKeys // guardian_keys (pipe-separated)
|
|
119
|
+
].join(',');
|
|
120
|
+
// Use a default fee token (e.g., Kalvora) for wrapped token minting
|
|
121
|
+
const feeId = options.feeId || KALVORA_NATIVE_TOKEN;
|
|
122
|
+
return createBridgeTransaction(BRIDGE_FUNCTIONS.mintSol, parameterValue, publicKeyBase58Identifier, privateKeyBase58, feeId, options);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Mint wrapped SOL tokens and send in one call
|
|
126
|
+
*/
|
|
127
|
+
export async function mintSolAndSend(toKalvoraAddress, publicKeyBase58Identifier, privateKeyBase58, options) {
|
|
128
|
+
const txn = await mintSol(toKalvoraAddress, publicKeyBase58Identifier, privateKeyBase58, options);
|
|
129
|
+
const grpcConfig = options.grpcConfig || PROTONET_GRPC_CONFIG;
|
|
130
|
+
return sendSmartContractExecuteTXN(txn, grpcConfig);
|
|
131
|
+
}
|
|
132
|
+
// ============================================================================
|
|
133
|
+
// CREATE SOL (Solana → Kalvora, first-time wrapped token creation)
|
|
134
|
+
// ============================================================================
|
|
135
|
+
/**
|
|
136
|
+
* Create wrapped SOL token on Kalvora (first time)
|
|
137
|
+
*
|
|
138
|
+
* Called when a Solana token is being bridged to Kalvora for the first time.
|
|
139
|
+
* This creates the wrapped token contract and mints the initial supply.
|
|
140
|
+
*
|
|
141
|
+
* @param toKalvoraAddress - Kalvora address to receive the minted tokens
|
|
142
|
+
* @param publicKeyBase58Identifier - Public key of the transaction sender
|
|
143
|
+
* @param privateKeyBase58 - Private key of the transaction sender
|
|
144
|
+
* @param options - Configuration including the guardian payload
|
|
145
|
+
* @returns The created transaction (not yet sent)
|
|
146
|
+
*/
|
|
147
|
+
export async function createSol(toKalvoraAddress, publicKeyBase58Identifier, privateKeyBase58, options) {
|
|
148
|
+
if (!toKalvoraAddress)
|
|
149
|
+
throw new Error('toKalvoraAddress is required');
|
|
150
|
+
if (!options.payload)
|
|
151
|
+
throw new Error('payload is required');
|
|
152
|
+
const { payload } = options;
|
|
153
|
+
if (payload.payload.case !== 'contractPayload') {
|
|
154
|
+
throw new Error(`Expected contractPayload, got: ${payload.payload.case}`);
|
|
155
|
+
}
|
|
156
|
+
const contractPayload = payload.payload.value;
|
|
157
|
+
// Separate params matching other release functions
|
|
158
|
+
const signatures = payload.signatures.join('|');
|
|
159
|
+
const guardianKeys = payload.publicKeys.join('|');
|
|
160
|
+
// Format: symbol,name,denomination,walletAddress,amount,solanaMintAddress,uri,solanaAuthorizedAddress,txSignature,signedHash,signatures,guardianKeys,usdPrice
|
|
161
|
+
const parameterValue = [
|
|
162
|
+
contractPayload.symbol,
|
|
163
|
+
contractPayload.name,
|
|
164
|
+
contractPayload.denomination,
|
|
165
|
+
toKalvoraAddress,
|
|
166
|
+
contractPayload.amount,
|
|
167
|
+
contractPayload.solanaMintAddress,
|
|
168
|
+
contractPayload.uri,
|
|
169
|
+
contractPayload.solanaAuthorizedAddress,
|
|
170
|
+
contractPayload.txSignature,
|
|
171
|
+
payload.signedHash, // signed_hash
|
|
172
|
+
signatures, // signatures (pipe-separated)
|
|
173
|
+
guardianKeys, // guardian_keys (pipe-separated)
|
|
174
|
+
contractPayload.usdPrice // token_price (last param)
|
|
175
|
+
].join(',');
|
|
176
|
+
const feeId = options.feeId || KALVORA_NATIVE_TOKEN;
|
|
177
|
+
return createBridgeTransaction(BRIDGE_FUNCTIONS.createSol, parameterValue, publicKeyBase58Identifier, privateKeyBase58, feeId, options);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Create wrapped SOL token and send in one call
|
|
181
|
+
*/
|
|
182
|
+
export async function createSolAndSend(toKalvoraAddress, publicKeyBase58Identifier, privateKeyBase58, options) {
|
|
183
|
+
const txn = await createSol(toKalvoraAddress, publicKeyBase58Identifier, privateKeyBase58, options);
|
|
184
|
+
const grpcConfig = options.grpcConfig || PROTONET_GRPC_CONFIG;
|
|
185
|
+
return sendSmartContractExecuteTXN(txn, grpcConfig);
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=release.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release.js","sourceRoot":"","sources":["../../../../../../../src/smart-contracts/use-cases/bridge/kalvora/transactions/release.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uDAAuD,CAAC;AAC7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAE3E,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAExE,+EAA+E;AAC/E,gEAAgE;AAChE,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;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AAU,IAAI,oBAAoB,CAAC;IAC9D,OAAO,2BAA2B,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kalvora Bridge Transaction Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for all Kalvora-side bridge operations.
|
|
5
|
+
*/
|
|
6
|
+
import type { SmartContractExecuteTXN } from '../../../../../proto/generated/txn_pb.js';
|
|
7
|
+
import type { KalvoraGuardianPayload } from '../../../../protocol/guardian-names.js';
|
|
8
|
+
import type { GRPCConfig } from '../../../../types/index.js';
|
|
9
|
+
import type { CreateSmartContractExecuteOptions } from '../../../execute/index.js';
|
|
10
|
+
/**
|
|
11
|
+
* Base options for all Kalvora bridge transactions
|
|
12
|
+
*/
|
|
13
|
+
export interface BridgeKalvoraOptions extends Omit<CreateSmartContractExecuteOptions, 'feeId'> {
|
|
14
|
+
/** gRPC configuration for network communication */
|
|
15
|
+
grpcConfig?: GRPCConfig;
|
|
16
|
+
/** Optional fee ID (defaults to the token being bridged) */
|
|
17
|
+
feeId?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Options for burning wrapped SOL tokens on Kalvora
|
|
21
|
+
*/
|
|
22
|
+
export interface BurnSolOptions extends BridgeKalvoraOptions {
|
|
23
|
+
/** Token denomination for amount conversion (e.g., 'SOL', 'USDC') */
|
|
24
|
+
denomination?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Options for releasing Kalvora tokens (from Solana lock)
|
|
28
|
+
*/
|
|
29
|
+
export interface ReleaseKalvoraOptions extends BridgeKalvoraOptions {
|
|
30
|
+
/** Guardian-signed payload from the Guardian service */
|
|
31
|
+
payload: KalvoraGuardianPayload;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Options for minting wrapped SOL on Kalvora
|
|
35
|
+
*/
|
|
36
|
+
export interface MintSolOptions extends BridgeKalvoraOptions {
|
|
37
|
+
/** Guardian-signed payload from the Guardian service */
|
|
38
|
+
payload: KalvoraGuardianPayload;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Options for creating wrapped SOL token on Kalvora (first time)
|
|
42
|
+
*/
|
|
43
|
+
export interface CreateSolOptions extends BridgeKalvoraOptions {
|
|
44
|
+
/** Guardian-signed payload from the Guardian service */
|
|
45
|
+
payload: KalvoraGuardianPayload;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Result from lock operations
|
|
49
|
+
*/
|
|
50
|
+
export interface LockKalvoraResult {
|
|
51
|
+
/** The created transaction */
|
|
52
|
+
transaction: SmartContractExecuteTXN;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Result from release operations
|
|
56
|
+
*/
|
|
57
|
+
export interface ReleaseKalvoraResult {
|
|
58
|
+
/** The created transaction */
|
|
59
|
+
transaction: SmartContractExecuteTXN;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Result from mint operations
|
|
63
|
+
*/
|
|
64
|
+
export interface MintSolResult {
|
|
65
|
+
/** The created transaction */
|
|
66
|
+
transaction: SmartContractExecuteTXN;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Result from create operations
|
|
70
|
+
*/
|
|
71
|
+
export interface CreateSolResult {
|
|
72
|
+
/** The created transaction */
|
|
73
|
+
transaction: SmartContractExecuteTXN;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Result from burn operations
|
|
77
|
+
*/
|
|
78
|
+
export interface BurnSolResult {
|
|
79
|
+
/** The created transaction */
|
|
80
|
+
transaction: SmartContractExecuteTXN;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/smart-contracts/use-cases/bridge/kalvora/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH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,MAAM,WAAW,aAAa;IAC5B,8BAA8B;IAC9B,WAAW,EAAE,uBAAuB,CAAC;CACtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/smart-contracts/use-cases/bridge/kalvora/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kalvora Bridge Utilities
|
|
3
|
+
*
|
|
4
|
+
* Helper functions for Kalvora-side bridge operations.
|
|
5
|
+
*/
|
|
6
|
+
import { SmartContractExecuteTXN } from '../../../../../proto/generated/txn_pb.js';
|
|
7
|
+
import type { KalvoraGuardianPayload } from '../../../../protocol/guardian-names.js';
|
|
8
|
+
import type { BridgeKalvoraOptions } from './types.js';
|
|
9
|
+
/** On-chain name of the bridge proxy smart contract. */
|
|
10
|
+
export declare const BRIDGE_CONTRACT_NAME = "zera_bridge_proxy";
|
|
11
|
+
/** Bridge proxy contract function names, by SDK operation. */
|
|
12
|
+
export declare const BRIDGE_FUNCTIONS: {
|
|
13
|
+
/** Lock Kalvora tokens to bridge them to Solana (`lockKalvora`). */
|
|
14
|
+
readonly lockKalvora: "lock_zera";
|
|
15
|
+
/** Release Kalvora tokens previously locked (`releaseKalvora`). */
|
|
16
|
+
readonly releaseKalvora: "release_zera";
|
|
17
|
+
/** Burn wrapped Solana tokens to bridge them back (`burnSol`). */
|
|
18
|
+
readonly burnSol: "burn_sol";
|
|
19
|
+
/** Mint wrapped Solana tokens (`mintSol`). */
|
|
20
|
+
readonly mintSol: "mint_sol";
|
|
21
|
+
/** Create a wrapped token contract for a new Solana mint (`createSol`). */
|
|
22
|
+
readonly createSol: "create_sol";
|
|
23
|
+
};
|
|
24
|
+
export declare const BRIDGE_INSTANCE = 1;
|
|
25
|
+
/**
|
|
26
|
+
* Format guardian signatures for smart contract parameter
|
|
27
|
+
*
|
|
28
|
+
* Converts the payload's signatures and public keys into the format
|
|
29
|
+
* expected by the bridge proxy smart contract (`BRIDGE_CONTRACT_NAME`).
|
|
30
|
+
*
|
|
31
|
+
* @param payload - Guardian-signed payload
|
|
32
|
+
* @returns Formatted signature string
|
|
33
|
+
*/
|
|
34
|
+
export declare function formatGuardianSignatures(payload: KalvoraGuardianPayload): string;
|
|
35
|
+
/**
|
|
36
|
+
* Create a bridge transaction with the given function and parameters
|
|
37
|
+
*
|
|
38
|
+
* This is the core utility for building bridge proxy (`BRIDGE_CONTRACT_NAME`) transactions.
|
|
39
|
+
*
|
|
40
|
+
* @param functionName - The bridge proxy function to call (see `BRIDGE_FUNCTIONS`)
|
|
41
|
+
* @param parameterValue - The formatted parameter string
|
|
42
|
+
* @param publicKeyBase58Identifier - Public key of the sender
|
|
43
|
+
* @param privateKeyBase58 - Private key of the sender
|
|
44
|
+
* @param feeId - Fee token to use
|
|
45
|
+
* @param options - Additional options
|
|
46
|
+
* @returns The created transaction
|
|
47
|
+
*/
|
|
48
|
+
export declare function createBridgeTransaction(functionName: string, parameterValue: string, publicKeyBase58Identifier: string, privateKeyBase58: string, feeId: string, options: BridgeKalvoraOptions): Promise<SmartContractExecuteTXN>;
|
|
49
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/smart-contracts/use-cases/bridge/kalvora/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AASrF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAMvD,wDAAwD;AACxD,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AAExD,8DAA8D;AAC9D,eAAO,MAAM,gBAAgB;IAC3B,oEAAoE;;IAEpE,mEAAmE;;IAEnE,kEAAkE;;IAElE,8CAA8C;;IAE9C,2EAA2E;;CAEnE,CAAC;AACX,eAAO,MAAM,eAAe,IAAI,CAAC;AAMjC;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,CAOhF;AAcD;;;;;;;;;;;;GAYG;AACH,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,yBAAyB,EAAE,MAAM,EACjC,gBAAgB,EAAE,MAAM,EACxB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,uBAAuB,CAAC,CA0BlC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kalvora Bridge Utilities
|
|
3
|
+
*
|
|
4
|
+
* Helper functions for Kalvora-side bridge operations.
|
|
5
|
+
*/
|
|
6
|
+
import { PROTONET_GRPC_CONFIG } from '../../../../shared/utils/testing-defaults/index.js';
|
|
7
|
+
import { createSmartContractExecuteTXN, ParamType } from '../../../execute/index.js';
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// CONSTANTS
|
|
10
|
+
// ============================================================================
|
|
11
|
+
/** On-chain name of the bridge proxy smart contract. */
|
|
12
|
+
export const BRIDGE_CONTRACT_NAME = 'zera_bridge_proxy'; // wire value; fixed by the deployed contract
|
|
13
|
+
/** Bridge proxy contract function names, by SDK operation. */
|
|
14
|
+
export const BRIDGE_FUNCTIONS = {
|
|
15
|
+
/** Lock Kalvora tokens to bridge them to Solana (`lockKalvora`). */
|
|
16
|
+
lockKalvora: 'lock_zera', // wire value; fixed by the deployed contract
|
|
17
|
+
/** Release Kalvora tokens previously locked (`releaseKalvora`). */
|
|
18
|
+
releaseKalvora: 'release_zera', // wire value; fixed by the deployed contract
|
|
19
|
+
/** Burn wrapped Solana tokens to bridge them back (`burnSol`). */
|
|
20
|
+
burnSol: 'burn_sol',
|
|
21
|
+
/** Mint wrapped Solana tokens (`mintSol`). */
|
|
22
|
+
mintSol: 'mint_sol',
|
|
23
|
+
/** Create a wrapped token contract for a new Solana mint (`createSol`). */
|
|
24
|
+
createSol: 'create_sol'
|
|
25
|
+
};
|
|
26
|
+
export const BRIDGE_INSTANCE = 1;
|
|
27
|
+
// ============================================================================
|
|
28
|
+
// HELPER FUNCTIONS
|
|
29
|
+
// ============================================================================
|
|
30
|
+
/**
|
|
31
|
+
* Format guardian signatures for smart contract parameter
|
|
32
|
+
*
|
|
33
|
+
* Converts the payload's signatures and public keys into the format
|
|
34
|
+
* expected by the bridge proxy smart contract (`BRIDGE_CONTRACT_NAME`).
|
|
35
|
+
*
|
|
36
|
+
* @param payload - Guardian-signed payload
|
|
37
|
+
* @returns Formatted signature string
|
|
38
|
+
*/
|
|
39
|
+
export function formatGuardianSignatures(payload) {
|
|
40
|
+
// Format: signedHash|sig1,pk1|sig2,pk2|...
|
|
41
|
+
const sigPairs = payload.signatures.map((sig, i) => `${sig},${payload.publicKeys[i] || ''}`).join('|');
|
|
42
|
+
return `${payload.signedHash}|${sigPairs}`;
|
|
43
|
+
}
|
|
44
|
+
function resolveFeeAmountParts(options) {
|
|
45
|
+
const { feeAmountParts } = options;
|
|
46
|
+
if (feeAmountParts !== undefined && !/^\d+$/.test(feeAmountParts)) {
|
|
47
|
+
throw new Error('feeAmountParts must be an integer string in raw token parts. Use gasFeeInUsd to add USD-denominated smart-contract gas.');
|
|
48
|
+
}
|
|
49
|
+
return feeAmountParts;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Create a bridge transaction with the given function and parameters
|
|
53
|
+
*
|
|
54
|
+
* This is the core utility for building bridge proxy (`BRIDGE_CONTRACT_NAME`) transactions.
|
|
55
|
+
*
|
|
56
|
+
* @param functionName - The bridge proxy function to call (see `BRIDGE_FUNCTIONS`)
|
|
57
|
+
* @param parameterValue - The formatted parameter string
|
|
58
|
+
* @param publicKeyBase58Identifier - Public key of the sender
|
|
59
|
+
* @param privateKeyBase58 - Private key of the sender
|
|
60
|
+
* @param feeId - Fee token to use
|
|
61
|
+
* @param options - Additional options
|
|
62
|
+
* @returns The created transaction
|
|
63
|
+
*/
|
|
64
|
+
export async function createBridgeTransaction(functionName, parameterValue, publicKeyBase58Identifier, privateKeyBase58, feeId, options) {
|
|
65
|
+
const grpcConfig = options.grpcConfig || PROTONET_GRPC_CONFIG;
|
|
66
|
+
const feeAmountParts = resolveFeeAmountParts(options);
|
|
67
|
+
const executeOptionsBase = { ...options };
|
|
68
|
+
const parameters = [
|
|
69
|
+
{ type: ParamType.STRING, value: functionName },
|
|
70
|
+
{ type: ParamType.STRING, value: parameterValue }
|
|
71
|
+
];
|
|
72
|
+
const executeOptions = {
|
|
73
|
+
...executeOptionsBase,
|
|
74
|
+
feeId,
|
|
75
|
+
...(feeAmountParts !== undefined && { feeAmountParts }),
|
|
76
|
+
grpcConfig
|
|
77
|
+
};
|
|
78
|
+
return createSmartContractExecuteTXN(BRIDGE_CONTRACT_NAME, BRIDGE_INSTANCE, 'execute', parameters, publicKeyBase58Identifier, privateKeyBase58, executeOptions);
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../src/smart-contracts/use-cases/bridge/kalvora/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC1F,OAAO,EACL,6BAA6B,EAC7B,SAAS,EAGV,MAAM,2BAA2B,CAAC;AAInC,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,wDAAwD;AACxD,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,CAAC,6CAA6C;AAEtG,8DAA8D;AAC9D,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,oEAAoE;IACpE,WAAW,EAAE,WAAW,EAAE,6CAA6C;IACvE,mEAAmE;IACnE,cAAc,E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B;QACrC,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE;QAC/C,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE;KAClD,CAAC;IAEF,MAAM,cAAc,GAAsC;QACxD,GAAG,kBAAkB;QACrB,KAAK;QACL,GAAG,CAAC,cAAc,KAAK,SAAS,IAAI,EAAE,cAAc,EAAE,CAAC;QACvD,UAAU;KACX,CAAC;IAEF,OAAO,6BAA6B,CAClC,oBAAoB,EACpB,eAAe,EACf,SAAS,EACT,UAAU,EACV,yBAAyB,EACzB,gBAAgB,EAChB,cAAc,CACf,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Solana Bridge Constants
|
|
3
|
+
*
|
|
4
|
+
* Program IDs and other constants for the Solana-side of the Kalvora bridge.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Default Solana RPC URL (mainnet-beta)
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_SOLANA_RPC_URL = "https://api.mainnet-beta.solana.com";
|
|
10
|
+
/**
|
|
11
|
+
* Core bridge program ID on Solana mainnet
|
|
12
|
+
*/
|
|
13
|
+
export declare const CORE_PROGRAM_ID = "zera3giq7oM9QJaD6mY1ajGmakv9TZcax5Giky99HD8";
|
|
14
|
+
/**
|
|
15
|
+
* Token bridge program ID on Solana mainnet
|
|
16
|
+
*/
|
|
17
|
+
export declare const TOKEN_BRIDGE_PROGRAM_ID = "WrapZ8f88HR8waSp7wR8Vgc68z4hKj3p3i2b81oeSxR";
|
|
18
|
+
/**
|
|
19
|
+
* Metaplex token metadata program ID
|
|
20
|
+
*/
|
|
21
|
+
export declare const METADATA_PROGRAM_ID = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s";
|
|
22
|
+
/**
|
|
23
|
+
* BPF Loader Upgradeable program ID
|
|
24
|
+
*/
|
|
25
|
+
export declare const BPF_LOADER_UPGRADEABLE_ID = "BPFLoaderUpgradeab1e11111111111111111111111";
|
|
26
|
+
/**
|
|
27
|
+
* SPL Token program ID
|
|
28
|
+
*/
|
|
29
|
+
export declare const TOKEN_PROGRAM_ID = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
30
|
+
/**
|
|
31
|
+
* Token-2022 program ID
|
|
32
|
+
*/
|
|
33
|
+
export declare const TOKEN_2022_PROGRAM_ID = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
34
|
+
/**
|
|
35
|
+
* SPL Associated Token Account program ID
|
|
36
|
+
*/
|
|
37
|
+
export declare const ATA_PROGRAM_ID = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
38
|
+
/**
|
|
39
|
+
* System program ID
|
|
40
|
+
*/
|
|
41
|
+
export declare const SYSTEM_PROGRAM_ID = "11111111111111111111111111111111";
|
|
42
|
+
/**
|
|
43
|
+
* Default VAA version
|
|
44
|
+
*/
|
|
45
|
+
export declare const DEFAULT_VAA_VERSION = 1;
|
|
46
|
+
/**
|
|
47
|
+
* Default VAA expiry (0 = no expiry)
|
|
48
|
+
*/
|
|
49
|
+
export declare const DEFAULT_VAA_EXPIRY = 0;
|
|
50
|
+
/**
|
|
51
|
+
* Default event index
|
|
52
|
+
*/
|
|
53
|
+
export declare const DEFAULT_EVENT_INDEX = 0;
|
|
54
|
+
/**
|
|
55
|
+
* Bridge action codes
|
|
56
|
+
*/
|
|
57
|
+
export declare const BridgeAction: {
|
|
58
|
+
/** Release SOL */
|
|
59
|
+
readonly RELEASE_SOL: 0;
|
|
60
|
+
/** Release SPL tokens */
|
|
61
|
+
readonly RELEASE_SPL: 1;
|
|
62
|
+
/** Mint wrapped token (initial creation) */
|
|
63
|
+
readonly MINT_WRAPPED_INIT: 2;
|
|
64
|
+
/** Mint wrapped token (existing token) */
|
|
65
|
+
readonly MINT_WRAPPED: 3;
|
|
66
|
+
/** Register token */
|
|
67
|
+
readonly REGISTER_TOKEN: 4;
|
|
68
|
+
/** Release Token-2022 tokens */
|
|
69
|
+
readonly RELEASE_2022: 5;
|
|
70
|
+
};
|
|
71
|
+
export type BridgeActionType = typeof BridgeAction[keyof typeof BridgeAction];
|
|
72
|
+
/**
|
|
73
|
+
* User-facing Solana asset type selector.
|
|
74
|
+
*/
|
|
75
|
+
export declare const SolanaTokenType: {
|
|
76
|
+
/** Native SOL */
|
|
77
|
+
readonly SOL: "SOL";
|
|
78
|
+
/** Classic SPL token */
|
|
79
|
+
readonly SPL: "SPL";
|
|
80
|
+
/** Token-2022 token */
|
|
81
|
+
readonly TOKEN2022: "TOKEN2022";
|
|
82
|
+
};
|
|
83
|
+
export type SolanaTokenTypeValue = typeof SolanaTokenType[keyof typeof SolanaTokenType];
|
|
84
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/smart-contracts/use-cases/bridge/solana/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB,wCAAwC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,eAAe,gDAAgD,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,uBAAuB,gDAAgD,CAAC;AAErF;;GAEG;AACH,eAAO,MAAM,mBAAmB,gDAAgD,CAAC;AAEjF;;GAEG;AACH,eAAO,MAAM,yBAAyB,gDAAgD,CAAC;AAEvF;;GAEG;AACH,eAAO,MAAM,gBAAgB,gDAAgD,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,qBAAqB,gDAAgD,CAAC;AAEnF;;GAEG;AACH,eAAO,MAAM,cAAc,iDAAiD,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,iBAAiB,qCAAqC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,YAAY;IACvB,kBAAkB;;IAElB,yBAAyB;;IAEzB,4CAA4C;;IAE5C,0CAA0C;;IAE1C,qBAAqB;;IAErB,gCAAgC;;CAExB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,eAAe;IAC1B,iBAAiB;;IAEjB,wBAAwB;;IAExB,uBAAuB;;CAEf,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Solana Bridge Constants
|
|
3
|
+
*
|
|
4
|
+
* Program IDs and other constants for the Solana-side of the Kalvora bridge.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Default Solana RPC URL (mainnet-beta)
|
|
8
|
+
*/
|
|
9
|
+
export const DEFAULT_SOLANA_RPC_URL = 'https://api.mainnet-beta.solana.com';
|
|
10
|
+
/**
|
|
11
|
+
* Core bridge program ID on Solana mainnet
|
|
12
|
+
*/
|
|
13
|
+
export const CORE_PROGRAM_ID = 'zera3giq7oM9QJaD6mY1ajGmakv9TZcax5Giky99HD8'; // wire value; deployed Solana program address
|
|
14
|
+
/**
|
|
15
|
+
* Token bridge program ID on Solana mainnet
|
|
16
|
+
*/
|
|
17
|
+
export const TOKEN_BRIDGE_PROGRAM_ID = 'WrapZ8f88HR8waSp7wR8Vgc68z4hKj3p3i2b81oeSxR';
|
|
18
|
+
/**
|
|
19
|
+
* Metaplex token metadata program ID
|
|
20
|
+
*/
|
|
21
|
+
export const METADATA_PROGRAM_ID = 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s';
|
|
22
|
+
/**
|
|
23
|
+
* BPF Loader Upgradeable program ID
|
|
24
|
+
*/
|
|
25
|
+
export const BPF_LOADER_UPGRADEABLE_ID = 'BPFLoaderUpgradeab1e11111111111111111111111';
|
|
26
|
+
/**
|
|
27
|
+
* SPL Token program ID
|
|
28
|
+
*/
|
|
29
|
+
export const TOKEN_PROGRAM_ID = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
30
|
+
/**
|
|
31
|
+
* Token-2022 program ID
|
|
32
|
+
*/
|
|
33
|
+
export const TOKEN_2022_PROGRAM_ID = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';
|
|
34
|
+
/**
|
|
35
|
+
* SPL Associated Token Account program ID
|
|
36
|
+
*/
|
|
37
|
+
export const ATA_PROGRAM_ID = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
|
|
38
|
+
/**
|
|
39
|
+
* System program ID
|
|
40
|
+
*/
|
|
41
|
+
export const SYSTEM_PROGRAM_ID = '11111111111111111111111111111111';
|
|
42
|
+
/**
|
|
43
|
+
* Default VAA version
|
|
44
|
+
*/
|
|
45
|
+
export const DEFAULT_VAA_VERSION = 1;
|
|
46
|
+
/**
|
|
47
|
+
* Default VAA expiry (0 = no expiry)
|
|
48
|
+
*/
|
|
49
|
+
export const DEFAULT_VAA_EXPIRY = 0;
|
|
50
|
+
/**
|
|
51
|
+
* Default event index
|
|
52
|
+
*/
|
|
53
|
+
export const DEFAULT_EVENT_INDEX = 0;
|
|
54
|
+
/**
|
|
55
|
+
* Bridge action codes
|
|
56
|
+
*/
|
|
57
|
+
export const BridgeAction = {
|
|
58
|
+
/** Release SOL */
|
|
59
|
+
RELEASE_SOL: 0,
|
|
60
|
+
/** Release SPL tokens */
|
|
61
|
+
RELEASE_SPL: 1,
|
|
62
|
+
/** Mint wrapped token (initial creation) */
|
|
63
|
+
MINT_WRAPPED_INIT: 2,
|
|
64
|
+
/** Mint wrapped token (existing token) */
|
|
65
|
+
MINT_WRAPPED: 3,
|
|
66
|
+
/** Register token */
|
|
67
|
+
REGISTER_TOKEN: 4,
|
|
68
|
+
/** Release Token-2022 tokens */
|
|
69
|
+
RELEASE_2022: 5
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* User-facing Solana asset type selector.
|
|
73
|
+
*/
|
|
74
|
+
export const SolanaTokenType = {
|
|
75
|
+
/** Native SOL */
|
|
76
|
+
SOL: 'SOL',
|
|
77
|
+
/** Classic SPL token */
|
|
78
|
+
SPL: 'SPL',
|
|
79
|
+
/** Token-2022 token */
|
|
80
|
+
TOKEN2022: 'TOKEN2022'
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../src/smart-contracts/use-cases/bridge/solana/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,qCAAqC,CAAC;AAE5E;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,6CAA6C,CAAC,CAAC,8CAA8C;AAE5H;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,6CAA6C,CAAC;AAErF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,6CAA6C,CAAC;AAEjF;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,6CAA6C,CAAC;AAEvF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,6CAA6C,CAAC;AAE9E;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,6CAA6C,CAAC;AAEnF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,8CAA8C,CAAC;AAE7E;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,kCAA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