@paimaexample/wallets 0.3.117
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/README.md +1 -0
- package/esm/chain-types/src/hash.d.ts +28 -0
- package/esm/chain-types/src/hash.d.ts.map +1 -0
- package/esm/chain-types/src/hash.js +29 -0
- package/esm/chain-types/src/mod.d.ts +3 -0
- package/esm/chain-types/src/mod.d.ts.map +1 -0
- package/esm/chain-types/src/mod.js +2 -0
- package/esm/chain-types/src/types.d.ts +70 -0
- package/esm/chain-types/src/types.d.ts.map +1 -0
- package/esm/chain-types/src/types.js +1 -0
- package/esm/concise/src/batcher.d.ts +40 -0
- package/esm/concise/src/batcher.d.ts.map +1 -0
- package/esm/concise/src/batcher.js +117 -0
- package/esm/concise/src/delegate.d.ts +18 -0
- package/esm/concise/src/delegate.d.ts.map +1 -0
- package/esm/concise/src/delegate.js +118 -0
- package/esm/concise/src/mod.d.ts +5 -0
- package/esm/concise/src/mod.d.ts.map +1 -0
- package/esm/concise/src/mod.js +3 -0
- package/esm/concise/src/v2/builtins/batcher.d.ts +27 -0
- package/esm/concise/src/v2/builtins/batcher.d.ts.map +1 -0
- package/esm/concise/src/v2/builtins/batcher.js +51 -0
- package/esm/concise/src/v2/builtins/grammar.d.ts +25 -0
- package/esm/concise/src/v2/builtins/grammar.d.ts.map +1 -0
- package/esm/concise/src/v2/builtins/grammar.js +40 -0
- package/esm/concise/src/v2/builtins/index.d.ts +3 -0
- package/esm/concise/src/v2/builtins/index.d.ts.map +1 -0
- package/esm/concise/src/v2/builtins/index.js +3 -0
- package/esm/concise/src/v2/grammar.d.ts +8 -0
- package/esm/concise/src/v2/grammar.d.ts.map +1 -0
- package/esm/concise/src/v2/grammar.js +19 -0
- package/esm/concise/src/v2/inputs.d.ts +7 -0
- package/esm/concise/src/v2/inputs.d.ts.map +1 -0
- package/esm/concise/src/v2/inputs.js +37 -0
- package/esm/concise/src/v2/mod.d.ts +5 -0
- package/esm/concise/src/v2/mod.d.ts.map +1 -0
- package/esm/concise/src/v2/mod.js +4 -0
- package/esm/concise/src/v2/types.d.ts +23 -0
- package/esm/concise/src/v2/types.d.ts.map +1 -0
- package/esm/concise/src/v2/types.js +1 -0
- package/esm/config/src/config/builder.d.ts +33 -0
- package/esm/config/src/config/builder.d.ts.map +1 -0
- package/esm/config/src/config/builder.js +82 -0
- package/esm/config/src/config/configCheck.d.ts +32 -0
- package/esm/config/src/config/configCheck.d.ts.map +1 -0
- package/esm/config/src/config/configCheck.js +67 -0
- package/esm/config/src/config/context.d.ts +23 -0
- package/esm/config/src/config/context.d.ts.map +1 -0
- package/esm/config/src/config/context.js +25 -0
- package/esm/config/src/config/mod.d.ts +7 -0
- package/esm/config/src/config/mod.d.ts.map +1 -0
- package/esm/config/src/config/mod.js +4 -0
- package/esm/config/src/config/parts/deployedAddresses.d.ts +17 -0
- package/esm/config/src/config/parts/deployedAddresses.d.ts.map +1 -0
- package/esm/config/src/config/parts/deployedAddresses.js +24 -0
- package/esm/config/src/config/parts/network.d.ts +19 -0
- package/esm/config/src/config/parts/network.d.ts.map +1 -0
- package/esm/config/src/config/parts/network.js +29 -0
- package/esm/config/src/config/parts/primitive.d.ts +31 -0
- package/esm/config/src/config/parts/primitive.d.ts.map +1 -0
- package/esm/config/src/config/parts/primitive.js +28 -0
- package/esm/config/src/config/parts/securityNamespace.d.ts +14 -0
- package/esm/config/src/config/parts/securityNamespace.d.ts.map +1 -0
- package/esm/config/src/config/parts/securityNamespace.js +26 -0
- package/esm/config/src/config/parts/syncProtocols.d.ts +43 -0
- package/esm/config/src/config/parts/syncProtocols.d.ts.map +1 -0
- package/esm/config/src/config/parts/syncProtocols.js +66 -0
- package/esm/config/src/config/utils.d.ts +40 -0
- package/esm/config/src/config/utils.d.ts.map +1 -0
- package/esm/config/src/config/utils.js +55 -0
- package/esm/config/src/mod.d.ts +3 -0
- package/esm/config/src/mod.d.ts.map +1 -0
- package/esm/config/src/mod.js +2 -0
- package/esm/config/src/schema/common.d.ts +26 -0
- package/esm/config/src/schema/common.d.ts.map +1 -0
- package/esm/config/src/schema/common.js +51 -0
- package/esm/config/src/schema/mod.d.ts +7 -0
- package/esm/config/src/schema/mod.d.ts.map +1 -0
- package/esm/config/src/schema/mod.js +6 -0
- package/esm/config/src/schema/namespace.d.ts +39 -0
- package/esm/config/src/schema/namespace.d.ts.map +1 -0
- package/esm/config/src/schema/namespace.js +34 -0
- package/esm/config/src/schema/network/algorand.d.ts +12 -0
- package/esm/config/src/schema/network/algorand.d.ts.map +1 -0
- package/esm/config/src/schema/network/algorand.js +23 -0
- package/esm/config/src/schema/network/all.d.ts +175 -0
- package/esm/config/src/schema/network/all.d.ts.map +1 -0
- package/esm/config/src/schema/network/all.js +24 -0
- package/esm/config/src/schema/network/bitcoin.d.ts +19 -0
- package/esm/config/src/schema/network/bitcoin.d.ts.map +1 -0
- package/esm/config/src/schema/network/bitcoin.js +21 -0
- package/esm/config/src/schema/network/cardano.d.ts +12 -0
- package/esm/config/src/schema/network/cardano.d.ts.map +1 -0
- package/esm/config/src/schema/network/cardano.js +27 -0
- package/esm/config/src/schema/network/evm.d.ts +68 -0
- package/esm/config/src/schema/network/evm.d.ts.map +1 -0
- package/esm/config/src/schema/network/evm.js +70 -0
- package/esm/config/src/schema/network/mina.d.ts +14 -0
- package/esm/config/src/schema/network/mina.d.ts.map +1 -0
- package/esm/config/src/schema/network/mina.js +25 -0
- package/esm/config/src/schema/network/mod.d.ts +9 -0
- package/esm/config/src/schema/network/mod.d.ts.map +1 -0
- package/esm/config/src/schema/network/mod.js +8 -0
- package/esm/config/src/schema/network/ntp.d.ts +32 -0
- package/esm/config/src/schema/network/ntp.d.ts.map +1 -0
- package/esm/config/src/schema/network/ntp.js +39 -0
- package/esm/config/src/schema/network/substrate/avail.d.ts +14 -0
- package/esm/config/src/schema/network/substrate/avail.d.ts.map +1 -0
- package/esm/config/src/schema/network/substrate/avail.js +26 -0
- package/esm/config/src/schema/network/substrate/common.d.ts +18 -0
- package/esm/config/src/schema/network/substrate/common.d.ts.map +1 -0
- package/esm/config/src/schema/network/substrate/common.js +32 -0
- package/esm/config/src/schema/network/substrate/midnight.d.ts +20 -0
- package/esm/config/src/schema/network/substrate/midnight.d.ts.map +1 -0
- package/esm/config/src/schema/network/substrate/midnight.js +32 -0
- package/esm/config/src/schema/network/substrate/mod.d.ts +4 -0
- package/esm/config/src/schema/network/substrate/mod.d.ts.map +1 -0
- package/esm/config/src/schema/network/substrate/mod.js +3 -0
- package/esm/config/src/schema/network/types.d.ts +13 -0
- package/esm/config/src/schema/network/types.d.ts.map +1 -0
- package/esm/config/src/schema/network/types.js +13 -0
- package/esm/config/src/schema/network/utils.d.ts +5 -0
- package/esm/config/src/schema/network/utils.d.ts.map +1 -0
- package/esm/config/src/schema/network/utils.js +73 -0
- package/esm/config/src/schema/primitive/mod.d.ts +2 -0
- package/esm/config/src/schema/primitive/mod.d.ts.map +1 -0
- package/esm/config/src/schema/primitive/mod.js +1 -0
- package/esm/config/src/schema/primitive/types.d.ts +58 -0
- package/esm/config/src/schema/primitive/types.d.ts.map +1 -0
- package/esm/config/src/schema/primitive/types.js +1 -0
- package/esm/config/src/schema/sync-protocols/all.d.ts +583 -0
- package/esm/config/src/schema/sync-protocols/all.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/all.js +55 -0
- package/esm/config/src/schema/sync-protocols/avail/rpc.d.ts +76 -0
- package/esm/config/src/schema/sync-protocols/avail/rpc.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/avail/rpc.js +56 -0
- package/esm/config/src/schema/sync-protocols/bitcoin/rpc.d.ts +76 -0
- package/esm/config/src/schema/sync-protocols/bitcoin/rpc.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/bitcoin/rpc.js +47 -0
- package/esm/config/src/schema/sync-protocols/cardano/carp.d.ts +80 -0
- package/esm/config/src/schema/sync-protocols/cardano/carp.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/cardano/carp.js +62 -0
- package/esm/config/src/schema/sync-protocols/cardano/mod.d.ts +2 -0
- package/esm/config/src/schema/sync-protocols/cardano/mod.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/cardano/mod.js +1 -0
- package/esm/config/src/schema/sync-protocols/cardano/utxorpc.d.ts +56 -0
- package/esm/config/src/schema/sync-protocols/cardano/utxorpc.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/cardano/utxorpc.js +56 -0
- package/esm/config/src/schema/sync-protocols/common.d.ts +60 -0
- package/esm/config/src/schema/sync-protocols/common.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/common.js +54 -0
- package/esm/config/src/schema/sync-protocols/decorators/all.d.ts +17 -0
- package/esm/config/src/schema/sync-protocols/decorators/all.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/decorators/all.js +8 -0
- package/esm/config/src/schema/sync-protocols/decorators/emulated.d.ts +8 -0
- package/esm/config/src/schema/sync-protocols/decorators/emulated.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/decorators/emulated.js +12 -0
- package/esm/config/src/schema/sync-protocols/decorators/mod.d.ts +4 -0
- package/esm/config/src/schema/sync-protocols/decorators/mod.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/decorators/mod.js +3 -0
- package/esm/config/src/schema/sync-protocols/decorators/types.d.ts +4 -0
- package/esm/config/src/schema/sync-protocols/decorators/types.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/decorators/types.js +4 -0
- package/esm/config/src/schema/sync-protocols/evm/rpc.d.ts +68 -0
- package/esm/config/src/schema/sync-protocols/evm/rpc.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/evm/rpc.js +44 -0
- package/esm/config/src/schema/sync-protocols/midnight/graphql.d.ts +66 -0
- package/esm/config/src/schema/sync-protocols/midnight/graphql.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/midnight/graphql.js +50 -0
- package/esm/config/src/schema/sync-protocols/mina/graphql.d.ts +73 -0
- package/esm/config/src/schema/sync-protocols/mina/graphql.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/mina/graphql.js +59 -0
- package/esm/config/src/schema/sync-protocols/mod.d.ts +10 -0
- package/esm/config/src/schema/sync-protocols/mod.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/mod.js +9 -0
- package/esm/config/src/schema/sync-protocols/ntp/rpc.d.ts +45 -0
- package/esm/config/src/schema/sync-protocols/ntp/rpc.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/ntp/rpc.js +33 -0
- package/esm/config/src/schema/sync-protocols/types.d.ts +125 -0
- package/esm/config/src/schema/sync-protocols/types.d.ts.map +1 -0
- package/esm/config/src/schema/sync-protocols/types.js +22 -0
- package/esm/config/src/schema/utils.d.ts +53 -0
- package/esm/config/src/schema/utils.d.ts.map +1 -0
- package/esm/config/src/schema/utils.js +58 -0
- package/esm/events/src/app-events.d.ts +65 -0
- package/esm/events/src/app-events.d.ts.map +1 -0
- package/esm/events/src/app-events.js +51 -0
- package/esm/events/src/asyncapi.d.ts +1173 -0
- package/esm/events/src/asyncapi.d.ts.map +1 -0
- package/esm/events/src/asyncapi.js +7 -0
- package/esm/events/src/builtin-event-utils.d.ts +5 -0
- package/esm/events/src/builtin-event-utils.d.ts.map +1 -0
- package/esm/events/src/builtin-event-utils.js +58 -0
- package/esm/events/src/builtin-events.d.ts +106 -0
- package/esm/events/src/builtin-events.d.ts.map +1 -0
- package/esm/events/src/builtin-events.js +198 -0
- package/esm/events/src/event-connect.d.ts +15 -0
- package/esm/events/src/event-connect.d.ts.map +1 -0
- package/esm/events/src/event-connect.js +75 -0
- package/esm/events/src/event-manager.d.ts +54 -0
- package/esm/events/src/event-manager.d.ts.map +1 -0
- package/esm/events/src/event-manager.js +129 -0
- package/esm/events/src/evm.d.ts +6 -0
- package/esm/events/src/evm.d.ts.map +1 -0
- package/esm/events/src/evm.js +55 -0
- package/esm/events/src/mod.d.ts +10 -0
- package/esm/events/src/mod.d.ts.map +1 -0
- package/esm/events/src/mod.js +9 -0
- package/esm/events/src/types.d.ts +255 -0
- package/esm/events/src/types.d.ts.map +1 -0
- package/esm/events/src/types.js +103 -0
- package/esm/events/src/utils.d.ts +16 -0
- package/esm/events/src/utils.d.ts.map +1 -0
- package/esm/events/src/utils.js +93 -0
- package/esm/package.json +3 -0
- package/esm/utils/src/binary-search.d.ts +7 -0
- package/esm/utils/src/binary-search.d.ts.map +1 -0
- package/esm/utils/src/binary-search.js +38 -0
- package/esm/utils/src/captcha.d.ts +9 -0
- package/esm/utils/src/captcha.d.ts.map +1 -0
- package/esm/utils/src/captcha.js +19 -0
- package/esm/utils/src/concurrency/condVar.d.ts +25 -0
- package/esm/utils/src/concurrency/condVar.d.ts.map +1 -0
- package/esm/utils/src/concurrency/condVar.js +39 -0
- package/esm/utils/src/concurrency/latch.d.ts +25 -0
- package/esm/utils/src/concurrency/latch.d.ts.map +1 -0
- package/esm/utils/src/concurrency/latch.js +51 -0
- package/esm/utils/src/concurrency/mod.d.ts +5 -0
- package/esm/utils/src/concurrency/mod.d.ts.map +1 -0
- package/esm/utils/src/concurrency/mod.js +4 -0
- package/esm/utils/src/concurrency/retry.d.ts +14 -0
- package/esm/utils/src/concurrency/retry.d.ts.map +1 -0
- package/esm/utils/src/concurrency/retry.js +26 -0
- package/esm/utils/src/concurrency/utils.d.ts +27 -0
- package/esm/utils/src/concurrency/utils.d.ts.map +1 -0
- package/esm/utils/src/concurrency/utils.js +27 -0
- package/esm/utils/src/constants.d.ts +4 -0
- package/esm/utils/src/constants.d.ts.map +1 -0
- package/esm/utils/src/constants.js +7 -0
- package/esm/utils/src/decorators/bound.d.ts +10 -0
- package/esm/utils/src/decorators/bound.d.ts.map +1 -0
- package/esm/utils/src/decorators/bound.js +17 -0
- package/esm/utils/src/decorators/mod.d.ts +2 -0
- package/esm/utils/src/decorators/mod.d.ts.map +1 -0
- package/esm/utils/src/decorators/mod.js +1 -0
- package/esm/utils/src/mod.d.ts +8 -0
- package/esm/utils/src/mod.d.ts.map +1 -0
- package/esm/utils/src/mod.js +7 -0
- package/esm/utils/src/types/json-query.d.ts +30 -0
- package/esm/utils/src/types/json-query.d.ts.map +1 -0
- package/esm/utils/src/types/json-query.js +1 -0
- package/esm/utils/src/types/misc.d.ts +109 -0
- package/esm/utils/src/types/misc.d.ts.map +1 -0
- package/esm/utils/src/types/misc.js +2 -0
- package/esm/utils/src/types/mod.d.ts +7 -0
- package/esm/utils/src/types/mod.d.ts.map +1 -0
- package/esm/utils/src/types/mod.js +3 -0
- package/esm/utils/src/types/nominal.d.ts +87 -0
- package/esm/utils/src/types/nominal.d.ts.map +1 -0
- package/esm/utils/src/types/nominal.js +1 -0
- package/esm/utils/src/types/typebox-helpers.d.ts +183 -0
- package/esm/utils/src/types/typebox-helpers.d.ts.map +1 -0
- package/esm/utils/src/types/typebox-helpers.js +235 -0
- package/esm/utils/src/types/utils.d.ts +37 -0
- package/esm/utils/src/types/utils.d.ts.map +1 -0
- package/esm/utils/src/types/utils.js +46 -0
- package/esm/utils/src/types/validators/algorand.d.ts +31 -0
- package/esm/utils/src/types/validators/algorand.d.ts.map +1 -0
- package/esm/utils/src/types/validators/algorand.js +90 -0
- package/esm/utils/src/types/validators/cardano.d.ts +26 -0
- package/esm/utils/src/types/validators/cardano.d.ts.map +1 -0
- package/esm/utils/src/types/validators/cardano.js +113 -0
- package/esm/utils/src/types/validators/mina.d.ts +15 -0
- package/esm/utils/src/types/validators/mina.d.ts.map +1 -0
- package/esm/utils/src/types/validators/mina.js +43 -0
- package/esm/utils/src/types/validators/minicbor.d.ts +98 -0
- package/esm/utils/src/types/validators/minicbor.d.ts.map +1 -0
- package/esm/utils/src/types/validators/minicbor.js +332 -0
- package/esm/utils/src/types/validators/mod.d.ts +3 -0
- package/esm/utils/src/types/validators/mod.d.ts.map +1 -0
- package/esm/utils/src/types/validators/mod.js +2 -0
- package/esm/utils/src/types/validators/utils.d.ts +6 -0
- package/esm/utils/src/types/validators/utils.d.ts.map +1 -0
- package/esm/utils/src/types/validators/utils.js +24 -0
- package/esm/utils/src/viem.d.ts +6 -0
- package/esm/utils/src/viem.d.ts.map +1 -0
- package/esm/utils/src/viem.js +15 -0
- package/esm/wallets/src/IProvider.d.ts +48 -0
- package/esm/wallets/src/IProvider.d.ts.map +1 -0
- package/esm/wallets/src/IProvider.js +7 -0
- package/esm/wallets/src/avail/avail.d.ts +28 -0
- package/esm/wallets/src/avail/avail.d.ts.map +1 -0
- package/esm/wallets/src/avail/avail.js +65 -0
- package/esm/wallets/src/avail/wrapper.d.ts +6 -0
- package/esm/wallets/src/avail/wrapper.d.ts.map +1 -0
- package/esm/wallets/src/avail/wrapper.js +31 -0
- package/esm/wallets/src/cardano/cardano.d.ts +30 -0
- package/esm/wallets/src/cardano/cardano.d.ts.map +1 -0
- package/esm/wallets/src/cardano/cardano.js +158 -0
- package/esm/wallets/src/cardano/wrapper.d.ts +7 -0
- package/esm/wallets/src/cardano/wrapper.d.ts.map +1 -0
- package/esm/wallets/src/cardano/wrapper.js +22 -0
- package/esm/wallets/src/evm/ethers.d.ts +28 -0
- package/esm/wallets/src/evm/ethers.d.ts.map +1 -0
- package/esm/wallets/src/evm/ethers.js +79 -0
- package/esm/wallets/src/evm/injected.d.ts +74 -0
- package/esm/wallets/src/evm/injected.d.ts.map +1 -0
- package/esm/wallets/src/evm/injected.js +322 -0
- package/esm/wallets/src/evm/types.d.ts +3 -0
- package/esm/wallets/src/evm/types.d.ts.map +1 -0
- package/esm/wallets/src/evm/types.js +1 -0
- package/esm/wallets/src/evm/wrapper-ethers.d.ts +6 -0
- package/esm/wallets/src/evm/wrapper-ethers.d.ts.map +1 -0
- package/esm/wallets/src/evm/wrapper-ethers.js +38 -0
- package/esm/wallets/src/evm/wrapper-injected.d.ts +7 -0
- package/esm/wallets/src/evm/wrapper-injected.d.ts.map +1 -0
- package/esm/wallets/src/evm/wrapper-injected.js +80 -0
- package/esm/wallets/src/midnight/midnight.d.ts +26 -0
- package/esm/wallets/src/midnight/midnight.d.ts.map +1 -0
- package/esm/wallets/src/midnight/midnight.js +112 -0
- package/esm/wallets/src/midnight/wrapper.d.ts +7 -0
- package/esm/wallets/src/midnight/wrapper.d.ts.map +1 -0
- package/esm/wallets/src/midnight/wrapper.js +22 -0
- package/esm/wallets/src/mina/mina.d.ts +28 -0
- package/esm/wallets/src/mina/mina.d.ts.map +1 -0
- package/esm/wallets/src/mina/mina.js +133 -0
- package/esm/wallets/src/mina/wrapper.d.ts +6 -0
- package/esm/wallets/src/mina/wrapper.d.ts.map +1 -0
- package/esm/wallets/src/mina/wrapper.js +12 -0
- package/esm/wallets/src/mod.d.ts +8 -0
- package/esm/wallets/src/mod.d.ts.map +1 -0
- package/esm/wallets/src/mod.js +5 -0
- package/esm/wallets/src/paima.d.ts +104 -0
- package/esm/wallets/src/paima.d.ts.map +1 -0
- package/esm/wallets/src/paima.js +244 -0
- package/esm/wallets/src/types.d.ts +49 -0
- package/esm/wallets/src/types.d.ts.map +1 -0
- package/esm/wallets/src/types.js +1 -0
- package/esm/wallets/src/utils.d.ts +41 -0
- package/esm/wallets/src/utils.d.ts.map +1 -0
- package/esm/wallets/src/utils.js +75 -0
- package/esm/wallets/src/wallet-modes.d.ts +49 -0
- package/esm/wallets/src/wallet-modes.d.ts.map +1 -0
- package/esm/wallets/src/wallet-modes.js +26 -0
- package/esm/wallets/src/wallets.d.ts +5 -0
- package/esm/wallets/src/wallets.d.ts.map +1 -0
- package/esm/wallets/src/wallets.js +55 -0
- package/esm/wallets/src/windows.d.ts +5 -0
- package/esm/wallets/src/windows.d.ts.map +1 -0
- package/esm/wallets/src/windows.js +9 -0
- package/package.json +51 -0
- package/script/chain-types/src/hash.d.ts +28 -0
- package/script/chain-types/src/hash.d.ts.map +1 -0
- package/script/chain-types/src/hash.js +36 -0
- package/script/chain-types/src/mod.d.ts +3 -0
- package/script/chain-types/src/mod.d.ts.map +1 -0
- package/script/chain-types/src/mod.js +18 -0
- package/script/chain-types/src/types.d.ts +70 -0
- package/script/chain-types/src/types.d.ts.map +1 -0
- package/script/chain-types/src/types.js +2 -0
- package/script/concise/src/batcher.d.ts +40 -0
- package/script/concise/src/batcher.d.ts.map +1 -0
- package/script/concise/src/batcher.js +122 -0
- package/script/concise/src/delegate.d.ts +18 -0
- package/script/concise/src/delegate.d.ts.map +1 -0
- package/script/concise/src/delegate.js +123 -0
- package/script/concise/src/mod.d.ts +5 -0
- package/script/concise/src/mod.d.ts.map +1 -0
- package/script/concise/src/mod.js +19 -0
- package/script/concise/src/v2/builtins/batcher.d.ts +27 -0
- package/script/concise/src/v2/builtins/batcher.d.ts.map +1 -0
- package/script/concise/src/v2/builtins/batcher.js +54 -0
- package/script/concise/src/v2/builtins/grammar.d.ts +25 -0
- package/script/concise/src/v2/builtins/grammar.d.ts.map +1 -0
- package/script/concise/src/v2/builtins/grammar.js +43 -0
- package/script/concise/src/v2/builtins/index.d.ts +3 -0
- package/script/concise/src/v2/builtins/index.d.ts.map +1 -0
- package/script/concise/src/v2/builtins/index.js +19 -0
- package/script/concise/src/v2/grammar.d.ts +8 -0
- package/script/concise/src/v2/grammar.d.ts.map +1 -0
- package/script/concise/src/v2/grammar.js +24 -0
- package/script/concise/src/v2/inputs.d.ts +7 -0
- package/script/concise/src/v2/inputs.d.ts.map +1 -0
- package/script/concise/src/v2/inputs.js +43 -0
- package/script/concise/src/v2/mod.d.ts +5 -0
- package/script/concise/src/v2/mod.d.ts.map +1 -0
- package/script/concise/src/v2/mod.js +20 -0
- package/script/concise/src/v2/types.d.ts +23 -0
- package/script/concise/src/v2/types.d.ts.map +1 -0
- package/script/concise/src/v2/types.js +2 -0
- package/script/config/src/config/builder.d.ts +33 -0
- package/script/config/src/config/builder.d.ts.map +1 -0
- package/script/config/src/config/builder.js +86 -0
- package/script/config/src/config/configCheck.d.ts +32 -0
- package/script/config/src/config/configCheck.d.ts.map +1 -0
- package/script/config/src/config/configCheck.js +70 -0
- package/script/config/src/config/context.d.ts +23 -0
- package/script/config/src/config/context.d.ts.map +1 -0
- package/script/config/src/config/context.js +31 -0
- package/script/config/src/config/mod.d.ts +7 -0
- package/script/config/src/config/mod.d.ts.map +1 -0
- package/script/config/src/config/mod.js +22 -0
- package/script/config/src/config/parts/deployedAddresses.d.ts +17 -0
- package/script/config/src/config/parts/deployedAddresses.d.ts.map +1 -0
- package/script/config/src/config/parts/deployedAddresses.js +28 -0
- package/script/config/src/config/parts/network.d.ts +19 -0
- package/script/config/src/config/parts/network.d.ts.map +1 -0
- package/script/config/src/config/parts/network.js +33 -0
- package/script/config/src/config/parts/primitive.d.ts +31 -0
- package/script/config/src/config/parts/primitive.d.ts.map +1 -0
- package/script/config/src/config/parts/primitive.js +32 -0
- package/script/config/src/config/parts/securityNamespace.d.ts +14 -0
- package/script/config/src/config/parts/securityNamespace.d.ts.map +1 -0
- package/script/config/src/config/parts/securityNamespace.js +30 -0
- package/script/config/src/config/parts/syncProtocols.d.ts +43 -0
- package/script/config/src/config/parts/syncProtocols.d.ts.map +1 -0
- package/script/config/src/config/parts/syncProtocols.js +70 -0
- package/script/config/src/config/utils.d.ts +40 -0
- package/script/config/src/config/utils.d.ts.map +1 -0
- package/script/config/src/config/utils.js +62 -0
- package/script/config/src/mod.d.ts +3 -0
- package/script/config/src/mod.d.ts.map +1 -0
- package/script/config/src/mod.js +18 -0
- package/script/config/src/schema/common.d.ts +26 -0
- package/script/config/src/schema/common.d.ts.map +1 -0
- package/script/config/src/schema/common.js +54 -0
- package/script/config/src/schema/mod.d.ts +7 -0
- package/script/config/src/schema/mod.d.ts.map +1 -0
- package/script/config/src/schema/mod.js +22 -0
- package/script/config/src/schema/namespace.d.ts +39 -0
- package/script/config/src/schema/namespace.d.ts.map +1 -0
- package/script/config/src/schema/namespace.js +38 -0
- package/script/config/src/schema/network/algorand.d.ts +12 -0
- package/script/config/src/schema/network/algorand.d.ts.map +1 -0
- package/script/config/src/schema/network/algorand.js +26 -0
- package/script/config/src/schema/network/all.d.ts +175 -0
- package/script/config/src/schema/network/all.d.ts.map +1 -0
- package/script/config/src/schema/network/all.js +28 -0
- package/script/config/src/schema/network/bitcoin.d.ts +19 -0
- package/script/config/src/schema/network/bitcoin.d.ts.map +1 -0
- package/script/config/src/schema/network/bitcoin.js +24 -0
- package/script/config/src/schema/network/cardano.d.ts +12 -0
- package/script/config/src/schema/network/cardano.d.ts.map +1 -0
- package/script/config/src/schema/network/cardano.js +30 -0
- package/script/config/src/schema/network/evm.d.ts +68 -0
- package/script/config/src/schema/network/evm.d.ts.map +1 -0
- package/script/config/src/schema/network/evm.js +75 -0
- package/script/config/src/schema/network/mina.d.ts +14 -0
- package/script/config/src/schema/network/mina.d.ts.map +1 -0
- package/script/config/src/schema/network/mina.js +28 -0
- package/script/config/src/schema/network/mod.d.ts +9 -0
- package/script/config/src/schema/network/mod.d.ts.map +1 -0
- package/script/config/src/schema/network/mod.js +24 -0
- package/script/config/src/schema/network/ntp.d.ts +32 -0
- package/script/config/src/schema/network/ntp.d.ts.map +1 -0
- package/script/config/src/schema/network/ntp.js +42 -0
- package/script/config/src/schema/network/substrate/avail.d.ts +14 -0
- package/script/config/src/schema/network/substrate/avail.d.ts.map +1 -0
- package/script/config/src/schema/network/substrate/avail.js +29 -0
- package/script/config/src/schema/network/substrate/common.d.ts +18 -0
- package/script/config/src/schema/network/substrate/common.d.ts.map +1 -0
- package/script/config/src/schema/network/substrate/common.js +35 -0
- package/script/config/src/schema/network/substrate/midnight.d.ts +20 -0
- package/script/config/src/schema/network/substrate/midnight.d.ts.map +1 -0
- package/script/config/src/schema/network/substrate/midnight.js +35 -0
- package/script/config/src/schema/network/substrate/mod.d.ts +4 -0
- package/script/config/src/schema/network/substrate/mod.d.ts.map +1 -0
- package/script/config/src/schema/network/substrate/mod.js +19 -0
- package/script/config/src/schema/network/types.d.ts +13 -0
- package/script/config/src/schema/network/types.d.ts.map +1 -0
- package/script/config/src/schema/network/types.js +16 -0
- package/script/config/src/schema/network/utils.d.ts +5 -0
- package/script/config/src/schema/network/utils.d.ts.map +1 -0
- package/script/config/src/schema/network/utils.js +76 -0
- package/script/config/src/schema/primitive/mod.d.ts +2 -0
- package/script/config/src/schema/primitive/mod.d.ts.map +1 -0
- package/script/config/src/schema/primitive/mod.js +17 -0
- package/script/config/src/schema/primitive/types.d.ts +58 -0
- package/script/config/src/schema/primitive/types.d.ts.map +1 -0
- package/script/config/src/schema/primitive/types.js +2 -0
- package/script/config/src/schema/sync-protocols/all.d.ts +583 -0
- package/script/config/src/schema/sync-protocols/all.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/all.js +62 -0
- package/script/config/src/schema/sync-protocols/avail/rpc.d.ts +76 -0
- package/script/config/src/schema/sync-protocols/avail/rpc.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/avail/rpc.js +59 -0
- package/script/config/src/schema/sync-protocols/bitcoin/rpc.d.ts +76 -0
- package/script/config/src/schema/sync-protocols/bitcoin/rpc.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/bitcoin/rpc.js +50 -0
- package/script/config/src/schema/sync-protocols/cardano/carp.d.ts +80 -0
- package/script/config/src/schema/sync-protocols/cardano/carp.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/cardano/carp.js +65 -0
- package/script/config/src/schema/sync-protocols/cardano/mod.d.ts +2 -0
- package/script/config/src/schema/sync-protocols/cardano/mod.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/cardano/mod.js +17 -0
- package/script/config/src/schema/sync-protocols/cardano/utxorpc.d.ts +56 -0
- package/script/config/src/schema/sync-protocols/cardano/utxorpc.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/cardano/utxorpc.js +59 -0
- package/script/config/src/schema/sync-protocols/common.d.ts +60 -0
- package/script/config/src/schema/sync-protocols/common.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/common.js +61 -0
- package/script/config/src/schema/sync-protocols/decorators/all.d.ts +17 -0
- package/script/config/src/schema/sync-protocols/decorators/all.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/decorators/all.js +12 -0
- package/script/config/src/schema/sync-protocols/decorators/emulated.d.ts +8 -0
- package/script/config/src/schema/sync-protocols/decorators/emulated.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/decorators/emulated.js +15 -0
- package/script/config/src/schema/sync-protocols/decorators/mod.d.ts +4 -0
- package/script/config/src/schema/sync-protocols/decorators/mod.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/decorators/mod.js +19 -0
- package/script/config/src/schema/sync-protocols/decorators/types.d.ts +4 -0
- package/script/config/src/schema/sync-protocols/decorators/types.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/decorators/types.js +7 -0
- package/script/config/src/schema/sync-protocols/evm/rpc.d.ts +68 -0
- package/script/config/src/schema/sync-protocols/evm/rpc.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/evm/rpc.js +47 -0
- package/script/config/src/schema/sync-protocols/midnight/graphql.d.ts +66 -0
- package/script/config/src/schema/sync-protocols/midnight/graphql.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/midnight/graphql.js +53 -0
- package/script/config/src/schema/sync-protocols/mina/graphql.d.ts +73 -0
- package/script/config/src/schema/sync-protocols/mina/graphql.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/mina/graphql.js +62 -0
- package/script/config/src/schema/sync-protocols/mod.d.ts +10 -0
- package/script/config/src/schema/sync-protocols/mod.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/mod.js +25 -0
- package/script/config/src/schema/sync-protocols/ntp/rpc.d.ts +45 -0
- package/script/config/src/schema/sync-protocols/ntp/rpc.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/ntp/rpc.js +36 -0
- package/script/config/src/schema/sync-protocols/types.d.ts +125 -0
- package/script/config/src/schema/sync-protocols/types.d.ts.map +1 -0
- package/script/config/src/schema/sync-protocols/types.js +25 -0
- package/script/config/src/schema/utils.d.ts +53 -0
- package/script/config/src/schema/utils.d.ts.map +1 -0
- package/script/config/src/schema/utils.js +62 -0
- package/script/events/src/app-events.d.ts +65 -0
- package/script/events/src/app-events.d.ts.map +1 -0
- package/script/events/src/app-events.js +62 -0
- package/script/events/src/asyncapi.d.ts +1173 -0
- package/script/events/src/asyncapi.d.ts.map +1 -0
- package/script/events/src/asyncapi.js +8 -0
- package/script/events/src/builtin-event-utils.d.ts +5 -0
- package/script/events/src/builtin-event-utils.d.ts.map +1 -0
- package/script/events/src/builtin-event-utils.js +63 -0
- package/script/events/src/builtin-events.d.ts +106 -0
- package/script/events/src/builtin-events.d.ts.map +1 -0
- package/script/events/src/builtin-events.js +204 -0
- package/script/events/src/event-connect.d.ts +15 -0
- package/script/events/src/event-connect.d.ts.map +1 -0
- package/script/events/src/event-connect.js +82 -0
- package/script/events/src/event-manager.d.ts +54 -0
- package/script/events/src/event-manager.d.ts.map +1 -0
- package/script/events/src/event-manager.js +133 -0
- package/script/events/src/evm.d.ts +6 -0
- package/script/events/src/evm.d.ts.map +1 -0
- package/script/events/src/evm.js +59 -0
- package/script/events/src/mod.d.ts +10 -0
- package/script/events/src/mod.d.ts.map +1 -0
- package/script/events/src/mod.js +25 -0
- package/script/events/src/types.d.ts +255 -0
- package/script/events/src/types.d.ts.map +1 -0
- package/script/events/src/types.js +111 -0
- package/script/events/src/utils.d.ts +16 -0
- package/script/events/src/utils.d.ts.map +1 -0
- package/script/events/src/utils.js +98 -0
- package/script/package.json +3 -0
- package/script/utils/src/binary-search.d.ts +7 -0
- package/script/utils/src/binary-search.d.ts.map +1 -0
- package/script/utils/src/binary-search.js +41 -0
- package/script/utils/src/captcha.d.ts +9 -0
- package/script/utils/src/captcha.d.ts.map +1 -0
- package/script/utils/src/captcha.js +22 -0
- package/script/utils/src/concurrency/condVar.d.ts +25 -0
- package/script/utils/src/concurrency/condVar.d.ts.map +1 -0
- package/script/utils/src/concurrency/condVar.js +42 -0
- package/script/utils/src/concurrency/latch.d.ts +25 -0
- package/script/utils/src/concurrency/latch.d.ts.map +1 -0
- package/script/utils/src/concurrency/latch.js +54 -0
- package/script/utils/src/concurrency/mod.d.ts +5 -0
- package/script/utils/src/concurrency/mod.d.ts.map +1 -0
- package/script/utils/src/concurrency/mod.js +20 -0
- package/script/utils/src/concurrency/retry.d.ts +14 -0
- package/script/utils/src/concurrency/retry.d.ts.map +1 -0
- package/script/utils/src/concurrency/retry.js +30 -0
- package/script/utils/src/concurrency/utils.d.ts +27 -0
- package/script/utils/src/concurrency/utils.d.ts.map +1 -0
- package/script/utils/src/concurrency/utils.js +30 -0
- package/script/utils/src/constants.d.ts +4 -0
- package/script/utils/src/constants.d.ts.map +1 -0
- package/script/utils/src/constants.js +12 -0
- package/script/utils/src/decorators/bound.d.ts +10 -0
- package/script/utils/src/decorators/bound.d.ts.map +1 -0
- package/script/utils/src/decorators/bound.js +20 -0
- package/script/utils/src/decorators/mod.d.ts +2 -0
- package/script/utils/src/decorators/mod.d.ts.map +1 -0
- package/script/utils/src/decorators/mod.js +17 -0
- package/script/utils/src/mod.d.ts +8 -0
- package/script/utils/src/mod.d.ts.map +1 -0
- package/script/utils/src/mod.js +23 -0
- package/script/utils/src/types/json-query.d.ts +30 -0
- package/script/utils/src/types/json-query.d.ts.map +1 -0
- package/script/utils/src/types/json-query.js +2 -0
- package/script/utils/src/types/misc.d.ts +109 -0
- package/script/utils/src/types/misc.d.ts.map +1 -0
- package/script/utils/src/types/misc.js +3 -0
- package/script/utils/src/types/mod.d.ts +7 -0
- package/script/utils/src/types/mod.d.ts.map +1 -0
- package/script/utils/src/types/mod.js +19 -0
- package/script/utils/src/types/nominal.d.ts +87 -0
- package/script/utils/src/types/nominal.d.ts.map +1 -0
- package/script/utils/src/types/nominal.js +2 -0
- package/script/utils/src/types/typebox-helpers.d.ts +183 -0
- package/script/utils/src/types/typebox-helpers.d.ts.map +1 -0
- package/script/utils/src/types/typebox-helpers.js +277 -0
- package/script/utils/src/types/utils.d.ts +37 -0
- package/script/utils/src/types/utils.d.ts.map +1 -0
- package/script/utils/src/types/utils.js +52 -0
- package/script/utils/src/types/validators/algorand.d.ts +31 -0
- package/script/utils/src/types/validators/algorand.d.ts.map +1 -0
- package/script/utils/src/types/validators/algorand.js +98 -0
- package/script/utils/src/types/validators/cardano.d.ts +26 -0
- package/script/utils/src/types/validators/cardano.d.ts.map +1 -0
- package/script/utils/src/types/validators/cardano.js +121 -0
- package/script/utils/src/types/validators/mina.d.ts +15 -0
- package/script/utils/src/types/validators/mina.d.ts.map +1 -0
- package/script/utils/src/types/validators/mina.js +51 -0
- package/script/utils/src/types/validators/minicbor.d.ts +98 -0
- package/script/utils/src/types/validators/minicbor.d.ts.map +1 -0
- package/script/utils/src/types/validators/minicbor.js +337 -0
- package/script/utils/src/types/validators/mod.d.ts +3 -0
- package/script/utils/src/types/validators/mod.d.ts.map +1 -0
- package/script/utils/src/types/validators/mod.js +18 -0
- package/script/utils/src/types/validators/utils.d.ts +6 -0
- package/script/utils/src/types/validators/utils.d.ts.map +1 -0
- package/script/utils/src/types/validators/utils.js +31 -0
- package/script/utils/src/viem.d.ts +6 -0
- package/script/utils/src/viem.d.ts.map +1 -0
- package/script/utils/src/viem.js +19 -0
- package/script/wallets/src/IProvider.d.ts +48 -0
- package/script/wallets/src/IProvider.d.ts.map +1 -0
- package/script/wallets/src/IProvider.js +10 -0
- package/script/wallets/src/avail/avail.d.ts +28 -0
- package/script/wallets/src/avail/avail.d.ts.map +1 -0
- package/script/wallets/src/avail/avail.js +70 -0
- package/script/wallets/src/avail/wrapper.d.ts +6 -0
- package/script/wallets/src/avail/wrapper.d.ts.map +1 -0
- package/script/wallets/src/avail/wrapper.js +34 -0
- package/script/wallets/src/cardano/cardano.d.ts +30 -0
- package/script/wallets/src/cardano/cardano.d.ts.map +1 -0
- package/script/wallets/src/cardano/cardano.js +163 -0
- package/script/wallets/src/cardano/wrapper.d.ts +7 -0
- package/script/wallets/src/cardano/wrapper.d.ts.map +1 -0
- package/script/wallets/src/cardano/wrapper.js +26 -0
- package/script/wallets/src/evm/ethers.d.ts +28 -0
- package/script/wallets/src/evm/ethers.d.ts.map +1 -0
- package/script/wallets/src/evm/ethers.js +84 -0
- package/script/wallets/src/evm/injected.d.ts +74 -0
- package/script/wallets/src/evm/injected.d.ts.map +1 -0
- package/script/wallets/src/evm/injected.js +360 -0
- package/script/wallets/src/evm/types.d.ts +3 -0
- package/script/wallets/src/evm/types.d.ts.map +1 -0
- package/script/wallets/src/evm/types.js +4 -0
- package/script/wallets/src/evm/wrapper-ethers.d.ts +6 -0
- package/script/wallets/src/evm/wrapper-ethers.d.ts.map +1 -0
- package/script/wallets/src/evm/wrapper-ethers.js +41 -0
- package/script/wallets/src/evm/wrapper-injected.d.ts +7 -0
- package/script/wallets/src/evm/wrapper-injected.d.ts.map +1 -0
- package/script/wallets/src/evm/wrapper-injected.js +84 -0
- package/script/wallets/src/midnight/midnight.d.ts +26 -0
- package/script/wallets/src/midnight/midnight.d.ts.map +1 -0
- package/script/wallets/src/midnight/midnight.js +117 -0
- package/script/wallets/src/midnight/wrapper.d.ts +7 -0
- package/script/wallets/src/midnight/wrapper.d.ts.map +1 -0
- package/script/wallets/src/midnight/wrapper.js +26 -0
- package/script/wallets/src/mina/mina.d.ts +28 -0
- package/script/wallets/src/mina/mina.d.ts.map +1 -0
- package/script/wallets/src/mina/mina.js +138 -0
- package/script/wallets/src/mina/wrapper.d.ts +6 -0
- package/script/wallets/src/mina/wrapper.d.ts.map +1 -0
- package/script/wallets/src/mina/wrapper.js +15 -0
- package/script/wallets/src/mod.d.ts +8 -0
- package/script/wallets/src/mod.d.ts.map +1 -0
- package/script/wallets/src/mod.js +26 -0
- package/script/wallets/src/paima.d.ts +104 -0
- package/script/wallets/src/paima.d.ts.map +1 -0
- package/script/wallets/src/paima.js +253 -0
- package/script/wallets/src/types.d.ts +49 -0
- package/script/wallets/src/types.d.ts.map +1 -0
- package/script/wallets/src/types.js +2 -0
- package/script/wallets/src/utils.d.ts +41 -0
- package/script/wallets/src/utils.d.ts.map +1 -0
- package/script/wallets/src/utils.js +81 -0
- package/script/wallets/src/wallet-modes.d.ts +49 -0
- package/script/wallets/src/wallet-modes.d.ts.map +1 -0
- package/script/wallets/src/wallet-modes.js +29 -0
- package/script/wallets/src/wallets.d.ts +5 -0
- package/script/wallets/src/wallets.d.ts.map +1 -0
- package/script/wallets/src/wallets.js +58 -0
- package/script/wallets/src/windows.d.ts +5 -0
- package/script/wallets/src/windows.d.ts.map +1 -0
- package/script/wallets/src/windows.js +12 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Result } from "../../../utils/src/mod.js";
|
|
2
|
+
import type { IProvider } from "../IProvider.js";
|
|
3
|
+
import type { WalletMode, ApiForMode } from "../utils.js";
|
|
4
|
+
import { type LoginInfoMap } from "../wallet-modes.js";
|
|
5
|
+
export declare function checkMidnightWalletStatus(): Promise<Result<string>>;
|
|
6
|
+
export declare function midnightLoginWrapper(loginInfo: LoginInfoMap[WalletMode.Midnight]): Promise<Result<IProvider<ApiForMode<WalletMode.Midnight>>>>;
|
|
7
|
+
//# sourceMappingURL=wrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../../../src/wallets/src/midnight/wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,oBAAoB,CAAC;AAGxE,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAUzE;AAED,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,GAC3C,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAa7D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkMidnightWalletStatus = checkMidnightWalletStatus;
|
|
4
|
+
exports.midnightLoginWrapper = midnightLoginWrapper;
|
|
5
|
+
const wallet_modes_js_1 = require("../wallet-modes.js");
|
|
6
|
+
const midnight_js_1 = require("./midnight.js");
|
|
7
|
+
async function checkMidnightWalletStatus() {
|
|
8
|
+
const provider = midnight_js_1.MidnightConnector.instance().getProvider();
|
|
9
|
+
if (provider == null) {
|
|
10
|
+
return {
|
|
11
|
+
success: false,
|
|
12
|
+
errorMessage: "No Midnight wallet found",
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
return { success: true, result: "OK" };
|
|
16
|
+
}
|
|
17
|
+
async function midnightLoginWrapper(loginInfo) {
|
|
18
|
+
const loginResult = await (0, wallet_modes_js_1.connectInjected)("midnightLoginWrapper", loginInfo, midnight_js_1.MidnightConnector.instance());
|
|
19
|
+
if (loginResult.success === false) {
|
|
20
|
+
return loginResult;
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
success: true,
|
|
24
|
+
result: loginResult.result,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as AuroMinaApi from "@aurowallet/mina-provider";
|
|
2
|
+
import { type IConnector, type IInjectedConnector, type ConnectionOption, type IProvider, type ActiveConnection, type AddressAndType, type UserSignature } from "../IProvider.js";
|
|
3
|
+
export type MinaApi = AuroMinaApi.default;
|
|
4
|
+
type MinaAddress = any;
|
|
5
|
+
export declare class MinaConnector implements IConnector<MinaApi>, IInjectedConnector<MinaApi> {
|
|
6
|
+
private provider;
|
|
7
|
+
private static INSTANCE;
|
|
8
|
+
static getWalletOptions(): ConnectionOption<MinaApi>[];
|
|
9
|
+
static instance(): MinaConnector;
|
|
10
|
+
connectSimple(): Promise<IProvider<any>>;
|
|
11
|
+
connectNamed(name: string): Promise<IProvider<any>>;
|
|
12
|
+
connectExternal: (conn: ActiveConnection<MinaApi>) => Promise<MinaProvider>;
|
|
13
|
+
getProvider: () => undefined | MinaProvider;
|
|
14
|
+
getOrThrowProvider: () => MinaProvider;
|
|
15
|
+
isConnected: () => boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare class MinaProvider implements IProvider<MinaApi> {
|
|
18
|
+
private readonly conn;
|
|
19
|
+
readonly address: MinaAddress;
|
|
20
|
+
constructor(conn: ActiveConnection<MinaApi>, address: MinaAddress);
|
|
21
|
+
static init: (conn: ActiveConnection<MinaApi>) => Promise<MinaProvider>;
|
|
22
|
+
getConnection: () => ActiveConnection<MinaApi>;
|
|
23
|
+
getAddress: () => AddressAndType;
|
|
24
|
+
signMessage: (message: string) => Promise<UserSignature>;
|
|
25
|
+
static fetchAddress: (conn: ActiveConnection<MinaApi>) => Promise<string>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=mina.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mina.d.ts","sourceRoot":"","sources":["../../../../src/wallets/src/mina/mina.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EACL,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAEd,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,iBAAiB,CAAC;AAGzB,MAAM,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;AAE1C,KAAK,WAAW,GAAG,GAAG,CAAC;AASvB,qBAAa,aACX,YAAW,UAAU,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC;IAE3D,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAwC;IAE/D,MAAM,CAAC,gBAAgB,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE;IAiBtD,MAAM,CAAC,QAAQ,IAAI,aAAa;IAQ1B,aAAa,IAAI,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAcxC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAazD,eAAe,GACb,MAAM,gBAAgB,CAAC,OAAO,CAAC,KAC9B,OAAO,CAAC,YAAY,CAAC,CActB;IACF,WAAW,QAAO,SAAS,GAAG,YAAY,CAExC;IACF,kBAAkB,QAAO,YAAY,CAKnC;IACF,WAAW,QAAO,OAAO,CAEvB;CACH;AAED,qBAAa,YAAa,YAAW,SAAS,CAAC,OAAO,CAAC;IAEnD,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,QAAQ,CAAC,OAAO,EAAE,WAAW;gBADZ,IAAI,EAAE,gBAAgB,CAAC,OAAO,CAAC,EACvC,OAAO,EAAE,WAAW;IAG/B,MAAM,CAAC,IAAI,GACT,MAAM,gBAAgB,CAAC,OAAO,CAAC,KAC9B,OAAO,CAAC,YAAY,CAAC,CAItB;IACF,aAAa,QAAO,gBAAgB,CAAC,OAAO,CAAC,CAE3C;IACF,UAAU,QAAO,cAAc,CAK7B;IACF,WAAW,GAAU,SAAS,MAAM,KAAG,OAAO,CAAC,aAAa,CAAC,CAoB3D;IAEF,MAAM,CAAC,YAAY,GACjB,MAAM,gBAAgB,CAAC,OAAO,CAAC,KAC9B,OAAO,CAAC,MAAM,CAAC,CAahB;CACH"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MinaProvider = exports.MinaConnector = void 0;
|
|
4
|
+
const mod_js_1 = require("../../../utils/src/mod.js");
|
|
5
|
+
const IProvider_js_1 = require("../IProvider.js");
|
|
6
|
+
const windows_js_1 = require("../windows.js");
|
|
7
|
+
// JSR Error: modifying global types is not allowed
|
|
8
|
+
// declare global {
|
|
9
|
+
// interface Window {
|
|
10
|
+
// mina?: Record<string, { name?: string; enable?: () => Promise<MinaApi> }>;
|
|
11
|
+
// }
|
|
12
|
+
// }
|
|
13
|
+
class MinaConnector {
|
|
14
|
+
provider;
|
|
15
|
+
static INSTANCE = undefined;
|
|
16
|
+
static getWalletOptions() {
|
|
17
|
+
const minaApi = (0, windows_js_1.getWindow)()?.mina;
|
|
18
|
+
if (minaApi == null || !minaApi.isAuro)
|
|
19
|
+
return [];
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
metadata: {
|
|
23
|
+
name: "auro",
|
|
24
|
+
displayName: "Auro Wallet",
|
|
25
|
+
},
|
|
26
|
+
api: async () => {
|
|
27
|
+
return minaApi;
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
static instance() {
|
|
33
|
+
if (MinaConnector.INSTANCE == null) {
|
|
34
|
+
const newInstance = new MinaConnector();
|
|
35
|
+
MinaConnector.INSTANCE = newInstance;
|
|
36
|
+
}
|
|
37
|
+
return MinaConnector.INSTANCE;
|
|
38
|
+
}
|
|
39
|
+
async connectSimple() {
|
|
40
|
+
if (this.provider != null) {
|
|
41
|
+
return this.provider;
|
|
42
|
+
}
|
|
43
|
+
const options = MinaConnector.getWalletOptions();
|
|
44
|
+
if (options.length === 0) {
|
|
45
|
+
throw new Error(`No Mina wallet found`);
|
|
46
|
+
}
|
|
47
|
+
return await this.connectExternal(await (0, IProvider_js_1.optionToActive)(options[0]));
|
|
48
|
+
}
|
|
49
|
+
async connectNamed(name) {
|
|
50
|
+
if (this.provider?.getConnection().metadata?.name === name) {
|
|
51
|
+
return this.provider;
|
|
52
|
+
}
|
|
53
|
+
const provider = MinaConnector.getWalletOptions().find((entry) => entry.metadata.name === name);
|
|
54
|
+
if (provider == null) {
|
|
55
|
+
throw new Error(`MinaProvider: unsupported connection type ${name}`);
|
|
56
|
+
}
|
|
57
|
+
return await this.connectExternal(await (0, IProvider_js_1.optionToActive)(provider));
|
|
58
|
+
}
|
|
59
|
+
connectExternal = async (conn) => {
|
|
60
|
+
if (this.provider?.getConnection().metadata?.name === conn.metadata.name) {
|
|
61
|
+
return this.provider;
|
|
62
|
+
}
|
|
63
|
+
this.provider = await MinaProvider.init(conn);
|
|
64
|
+
conn.api.on("accountsChanged", (accounts) => {
|
|
65
|
+
if (!accounts || !accounts[0] || accounts[0] !== this.provider?.address) {
|
|
66
|
+
this.provider = undefined;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
return this.provider;
|
|
70
|
+
};
|
|
71
|
+
getProvider = () => {
|
|
72
|
+
return this.provider;
|
|
73
|
+
};
|
|
74
|
+
getOrThrowProvider = () => {
|
|
75
|
+
if (this.provider == null) {
|
|
76
|
+
throw new Error(`MinaConnector provider isn't initialized yet`);
|
|
77
|
+
}
|
|
78
|
+
return this.provider;
|
|
79
|
+
};
|
|
80
|
+
isConnected = () => {
|
|
81
|
+
return this.provider != null;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
exports.MinaConnector = MinaConnector;
|
|
85
|
+
class MinaProvider {
|
|
86
|
+
conn;
|
|
87
|
+
address;
|
|
88
|
+
constructor(conn, address) {
|
|
89
|
+
this.conn = conn;
|
|
90
|
+
this.address = address;
|
|
91
|
+
}
|
|
92
|
+
static init = async (conn) => {
|
|
93
|
+
const address = await MinaProvider.fetchAddress(conn);
|
|
94
|
+
return new MinaProvider(conn, address);
|
|
95
|
+
};
|
|
96
|
+
getConnection = () => {
|
|
97
|
+
return this.conn;
|
|
98
|
+
};
|
|
99
|
+
getAddress = () => {
|
|
100
|
+
return {
|
|
101
|
+
type: mod_js_1.AddressType.MINA,
|
|
102
|
+
address: this.address,
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
signMessage = async (message) => {
|
|
106
|
+
// There is no way of choosing the signing account here. At most we could
|
|
107
|
+
// monitor the changed events and erroring out if it changed.
|
|
108
|
+
const signed = await this.conn.api.signMessage({ message: message });
|
|
109
|
+
if ("signature" in signed) {
|
|
110
|
+
const { signature } = signed;
|
|
111
|
+
const networkKind = await this.conn.api.requestNetwork();
|
|
112
|
+
// only these two options are used
|
|
113
|
+
// https://github.com/aurowallet/auro-wallet-browser-extension/blob/624de322dd99baaa09617bbad4a4a838f0a88edc/src/background/lib/index.js#L17
|
|
114
|
+
// this is part of the hashed message
|
|
115
|
+
const network = networkKind.networkID === "mainnet" ? "mainnet" : "testnet";
|
|
116
|
+
return `${signature.field};${signature.scalar};${network}`;
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
throw new Error("Failed to sign message");
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
static fetchAddress = async (conn) => {
|
|
123
|
+
try {
|
|
124
|
+
const addresses = await conn.api.requestAccounts();
|
|
125
|
+
if ("length" in addresses && addresses.length > 0) {
|
|
126
|
+
return addresses[0];
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
throw new Error("requestAccounts request failed");
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
catch (err) {
|
|
133
|
+
console.log("[pickMinaAddress] error calling requestAccounts:", err);
|
|
134
|
+
}
|
|
135
|
+
throw new Error("[pickMinaAddress] no used or unused addresses");
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
exports.MinaProvider = MinaProvider;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Result } from "../../../utils/src/mod.js";
|
|
2
|
+
import type { IProvider } from "../IProvider.js";
|
|
3
|
+
import type { WalletMode, ApiForMode } from "../utils.js";
|
|
4
|
+
import { type LoginInfoMap } from "../wallet-modes.js";
|
|
5
|
+
export declare function minaLoginWrapper(loginInfo: LoginInfoMap[WalletMode.Mina]): Promise<Result<IProvider<ApiForMode<WalletMode.Mina>>>>;
|
|
6
|
+
//# sourceMappingURL=wrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../../../src/wallets/src/mina/wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,oBAAoB,CAAC;AAGxE,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,GACvC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAazD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.minaLoginWrapper = minaLoginWrapper;
|
|
4
|
+
const wallet_modes_js_1 = require("../wallet-modes.js");
|
|
5
|
+
const mina_js_1 = require("./mina.js");
|
|
6
|
+
async function minaLoginWrapper(loginInfo) {
|
|
7
|
+
const loginResult = await (0, wallet_modes_js_1.connectInjected)("minaLoginWrapper", loginInfo, mina_js_1.MinaConnector.instance());
|
|
8
|
+
if (loginResult.success === false) {
|
|
9
|
+
return loginResult;
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
success: true,
|
|
13
|
+
result: loginResult.result,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { IProvider, AddressAndType, UserSignature, WalletOption } from "./IProvider.js";
|
|
2
|
+
export type { Wallet } from "./types.js";
|
|
3
|
+
export type { WalletAddress } from "../../utils/src/mod.js";
|
|
4
|
+
export { WalletMode, WalletNameMap } from "./utils.js";
|
|
5
|
+
export { walletLogin } from "./wallets.js";
|
|
6
|
+
export { allInjectedWallets } from "./utils.js";
|
|
7
|
+
export * from "./paima.js";
|
|
8
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/wallets/src/mod.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC7F,YAAY,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.allInjectedWallets = exports.walletLogin = exports.WalletNameMap = exports.WalletMode = void 0;
|
|
18
|
+
var utils_js_1 = require("./utils.js");
|
|
19
|
+
Object.defineProperty(exports, "WalletMode", { enumerable: true, get: function () { return utils_js_1.WalletMode; } });
|
|
20
|
+
Object.defineProperty(exports, "WalletNameMap", { enumerable: true, get: function () { return utils_js_1.WalletNameMap; } });
|
|
21
|
+
// Main entry point
|
|
22
|
+
var wallets_js_1 = require("./wallets.js");
|
|
23
|
+
Object.defineProperty(exports, "walletLogin", { enumerable: true, get: function () { return wallets_js_1.walletLogin; } });
|
|
24
|
+
var utils_js_2 = require("./utils.js");
|
|
25
|
+
Object.defineProperty(exports, "allInjectedWallets", { enumerable: true, get: function () { return utils_js_2.allInjectedWallets; } });
|
|
26
|
+
__exportStar(require("./paima.js"), exports);
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { type EvmAddress } from "../../utils/src/mod.js";
|
|
2
|
+
import type { Wallet } from "./types.js";
|
|
3
|
+
import { type Chain } from "viem";
|
|
4
|
+
import type { AbiItem } from "web3-utils";
|
|
5
|
+
import { type TransactionReceipt, Web3 } from "web3";
|
|
6
|
+
/**
|
|
7
|
+
* This is main class used for setting up the Paima Engine
|
|
8
|
+
* communication. It sets up the location of the Paima L2 Contact.
|
|
9
|
+
*/
|
|
10
|
+
export declare class PaimaEngineConfig {
|
|
11
|
+
appName: string;
|
|
12
|
+
paimaL2SyncProtocolName: string;
|
|
13
|
+
paimaL2ContractAddress: EvmAddress;
|
|
14
|
+
paimaL2Abi: AbiItem[];
|
|
15
|
+
paimaL2Chain: Chain;
|
|
16
|
+
paimaL2CurrentFee: bigint;
|
|
17
|
+
web3: Web3 | undefined;
|
|
18
|
+
batcherURL: string | undefined;
|
|
19
|
+
preferBatchedMode: boolean;
|
|
20
|
+
constructor(appName: string | undefined, paimaL2SyncProtocolName: string, paimaL2ContractAddress: EvmAddress, paimaL2Chain: Chain, paimaL2Abi: AbiItem[] | undefined, batcherURL: string | undefined, preferBatchedMode?: boolean);
|
|
21
|
+
/** Return a Web3 client for the PaimaL2 chain. */
|
|
22
|
+
getWeb3Client(): Promise<Web3>;
|
|
23
|
+
/** Return a Paima L2 Contract Instance for the PaimaL2. */
|
|
24
|
+
getPaimaL2Contract(): Promise<import("web3").Contract<import("web3").AbiFragment[]>>;
|
|
25
|
+
private fallbackABI;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Paima Wallet Interface - Sign a message with a wallet.
|
|
29
|
+
* @param wallet - The wallet to sign the message with.
|
|
30
|
+
* @param message - The message to sign.
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
export declare function signMessage(wallet: Wallet, message: string): Promise<string>;
|
|
34
|
+
/**
|
|
35
|
+
* Main function to send a transaction to a Paima L2 contract.
|
|
36
|
+
* It will decide whether to use the batcher or the self-sequenced transaction based on the preferBatchedMode flag.
|
|
37
|
+
*
|
|
38
|
+
* @param wallet - The wallet to send the transaction with.
|
|
39
|
+
* @param conciseData - The concise data to send.
|
|
40
|
+
* @param paimaEngineConfig - The Paima Engine configuration.
|
|
41
|
+
* @param waitForConfirmation - The confirmation mode to use:
|
|
42
|
+
* no-wait: Do not wait for any confirmation.
|
|
43
|
+
* wait-receipt: Wait only for the chain transaction receipt.
|
|
44
|
+
* wait-effectstream-processed: Wait for the transaction to be processed by the Paima Engine.
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
export declare function sendTransaction(wallet: Wallet, conciseData: any[], paimaEngineConfig: PaimaEngineConfig, waitForConfirmation?: "wait-effectstream-processed" | "wait-receipt" | "no-wait", batcherTarget?: string | undefined): Promise<ReturnType<typeof sendBatcherTransaction> | ReturnType<typeof sendSelfSequencedTransaction>>;
|
|
48
|
+
/**
|
|
49
|
+
* Paima Wallet Interface - Send a transaction to a Paima L2 contract with a wallet.
|
|
50
|
+
* The concise data must match the grammar; if not the input will be rejected by Paima Engine.
|
|
51
|
+
* @param wallet - The wallet to send the transaction with.
|
|
52
|
+
* @param conciseData - The concise data to send.
|
|
53
|
+
* @param paimaEngineConfig - The Paima Engine configuration.
|
|
54
|
+
* @param waitForConfirmation - The confirmation mode to use:
|
|
55
|
+
* no-wait: Do not wait for any confirmation.
|
|
56
|
+
* wait-receipt: Wait only for the chain transaction receipt.
|
|
57
|
+
* wait-effectstream-processed: Wait for the transaction to be processed by the Paima Engine.
|
|
58
|
+
** @returns
|
|
59
|
+
*/
|
|
60
|
+
export declare function sendSelfSequencedTransaction(wallet: Wallet, conciseData: any[], paimaEngineConfig: PaimaEngineConfig, waitForConfirmation?: "wait-effectstream-processed" | "wait-receipt" | "no-wait"): Promise<{
|
|
61
|
+
success: boolean;
|
|
62
|
+
type: "self-sequenced";
|
|
63
|
+
} & ({
|
|
64
|
+
wait: "wait-effectstream-processed";
|
|
65
|
+
hash: string;
|
|
66
|
+
receipt: TransactionReceipt;
|
|
67
|
+
rollup: number;
|
|
68
|
+
} | {
|
|
69
|
+
wait: "wait-receipt" | "no-wait";
|
|
70
|
+
hash: string;
|
|
71
|
+
})>;
|
|
72
|
+
/**
|
|
73
|
+
* Wait for specific block number to be processed by the Paima Engine.
|
|
74
|
+
* This guarantees that the block number is processed by the Paima Engine.
|
|
75
|
+
* @param blockNumber - The block number to wait for.
|
|
76
|
+
* @param paimaEngineConfig - The Paima Engine configuration.
|
|
77
|
+
* @param timeout (optional) - The timeout in milliseconds.
|
|
78
|
+
* @returns
|
|
79
|
+
*/
|
|
80
|
+
export declare function waitForPaimaEngineBlockProcessed(blockNumber: number, paimaEngineConfig: PaimaEngineConfig, timeout?: number): Promise<{
|
|
81
|
+
latestBlock: number;
|
|
82
|
+
rollup: number;
|
|
83
|
+
} | void>;
|
|
84
|
+
/**
|
|
85
|
+
* Paima Wallet Interface - Standard batcher communication for a Paima L2 contract.
|
|
86
|
+
* This is only a default implementation, your own batcher might have different requirements.
|
|
87
|
+
* @param wallet - The wallet to send the batched transaction with.
|
|
88
|
+
* @param paimaL2Address - The address of the Paima L2 contract.
|
|
89
|
+
* @param conciseData - The concise data to send.
|
|
90
|
+
* @param waitForConfirmation - The confirmation mode to use:
|
|
91
|
+
* no-wait: Do not wait for any confirmation.
|
|
92
|
+
* wait-receipt: Wait only for the chain transaction receipt.
|
|
93
|
+
* wait-effectstream-processed: Wait for the transaction to be processed by the Paima Engine.
|
|
94
|
+
* @returns
|
|
95
|
+
*/
|
|
96
|
+
export declare function sendBatcherTransaction(wallet: Wallet, conciseData: any[], paimaEngineConfig: PaimaEngineConfig, waitForConfirmation?: "wait-effectstream-processed" | "wait-receipt" | "no-wait", batcherTarget?: string | undefined): Promise<{
|
|
97
|
+
success: boolean;
|
|
98
|
+
type: "batcher";
|
|
99
|
+
message: string;
|
|
100
|
+
blockNumber: number;
|
|
101
|
+
blockHash: string;
|
|
102
|
+
rollup: number;
|
|
103
|
+
}>;
|
|
104
|
+
//# sourceMappingURL=paima.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paima.d.ts","sourceRoot":"","sources":["../../../src/wallets/src/paima.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,KAAK,KAAK,EAAe,MAAM,MAAM,CAAC;AAI/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,KAAK,kBAAkB,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAIrD;;;GAGG;AACH,qBAAa,iBAAiB;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,UAAU,CAAC;IACnC,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB,YAAY,EAAE,KAAK,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAM;IAC/B,IAAI,EAAE,IAAI,GAAG,SAAS,CAAa;IACnC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAa;IAC3C,iBAAiB,EAAE,OAAO,CAAS;gBAGxC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,uBAAuB,EAAE,MAAM,EAC/B,sBAAsB,EAAE,UAAU,EAClC,YAAY,EAAE,KAAK,EACnB,UAAU,EAAE,OAAO,EAAE,GAAG,SAAS,EACjC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,iBAAiB,GAAE,OAAe;IAgBpC,kDAAkD;IACrC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAS3C,2DAA2D;IAC9C,kBAAkB;IAK/B,OAAO,CAAC,WAAW;CAWpB;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAGhE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,GAAG,EAAE,EAClB,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,GAAE,6BAA6B,GAAG,cAAc,GAAG,SACvC,EAC/B,aAAa,GAAE,MAAM,GAAG,SAAqB,GAC5C,OAAO,CACN,UAAU,CAAC,OAAO,sBAAsB,CAAC,GACzC,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAClD,CAgBA;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,MAAM,EAEd,WAAW,EAAE,GAAG,EAAE,EAClB,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,GAAE,6BAA6B,GAAG,cAAc,GAAG,SACvC,GAC9B,OAAO,CACN;IACA,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,gBAAgB,CAAC;CACxB,GACC,CACE;IACA,IAAI,EAAE,6BAA6B,CAAC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,kBAAkB,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB,GACC;IACA,IAAI,EAAE,cAAc,GAAG,SAAS,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;CACd,CACF,CACF,CA4DA;AAqBD;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE,MAAM,EACnB,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,GAAE,MAAc,GACtB,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CAyCzD;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,EAEd,WAAW,EAAE,GAAG,EAAE,EAClB,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,GAAE,6BAA6B,GAAG,cAAc,GAAG,SACvC,EAC/B,aAAa,GAAE,MAAM,GAAG,SAAqB,GAC5C,OAAO,CAAC;IACT,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC,CAmDD"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaimaEngineConfig = void 0;
|
|
4
|
+
exports.signMessage = signMessage;
|
|
5
|
+
exports.sendTransaction = sendTransaction;
|
|
6
|
+
exports.sendSelfSequencedTransaction = sendSelfSequencedTransaction;
|
|
7
|
+
exports.waitForPaimaEngineBlockProcessed = waitForPaimaEngineBlockProcessed;
|
|
8
|
+
exports.sendBatcherTransaction = sendBatcherTransaction;
|
|
9
|
+
const mod_js_1 = require("../../utils/src/mod.js");
|
|
10
|
+
const viem_1 = require("viem");
|
|
11
|
+
const web3_utils_1 = require("web3-utils");
|
|
12
|
+
const web3_1 = require("web3");
|
|
13
|
+
const mod_js_2 = require("../../concise/src/mod.js");
|
|
14
|
+
const mod_js_3 = require("../../events/src/mod.js");
|
|
15
|
+
/**
|
|
16
|
+
* This is main class used for setting up the Paima Engine
|
|
17
|
+
* communication. It sets up the location of the Paima L2 Contact.
|
|
18
|
+
*/
|
|
19
|
+
class PaimaEngineConfig {
|
|
20
|
+
appName;
|
|
21
|
+
paimaL2SyncProtocolName;
|
|
22
|
+
paimaL2ContractAddress;
|
|
23
|
+
paimaL2Abi;
|
|
24
|
+
paimaL2Chain;
|
|
25
|
+
paimaL2CurrentFee = 0n;
|
|
26
|
+
web3 = undefined;
|
|
27
|
+
batcherURL = undefined;
|
|
28
|
+
preferBatchedMode = false;
|
|
29
|
+
constructor(appName, paimaL2SyncProtocolName, paimaL2ContractAddress, paimaL2Chain, paimaL2Abi, batcherURL, preferBatchedMode = false) {
|
|
30
|
+
this.appName = appName ?? "";
|
|
31
|
+
this.paimaL2SyncProtocolName = paimaL2SyncProtocolName;
|
|
32
|
+
this.paimaL2ContractAddress = paimaL2ContractAddress;
|
|
33
|
+
this.paimaL2Abi = paimaL2Abi ?? this.fallbackABI();
|
|
34
|
+
this.paimaL2Chain = paimaL2Chain;
|
|
35
|
+
this.batcherURL = batcherURL;
|
|
36
|
+
if (!this.batcherURL && preferBatchedMode) {
|
|
37
|
+
throw new Error("To enable batcher, you need to set the batcher URL.");
|
|
38
|
+
}
|
|
39
|
+
this.preferBatchedMode = preferBatchedMode;
|
|
40
|
+
}
|
|
41
|
+
/** Return a Web3 client for the PaimaL2 chain. */
|
|
42
|
+
async getWeb3Client() {
|
|
43
|
+
if (this.web3) {
|
|
44
|
+
return this.web3;
|
|
45
|
+
}
|
|
46
|
+
this.web3 = new web3_1.Web3(this.paimaL2Chain.rpcUrls.default.http[0]);
|
|
47
|
+
await this.web3.eth.getNodeInfo();
|
|
48
|
+
return this.web3;
|
|
49
|
+
}
|
|
50
|
+
/** Return a Paima L2 Contract Instance for the PaimaL2. */
|
|
51
|
+
async getPaimaL2Contract() {
|
|
52
|
+
const web3 = await this.getWeb3Client();
|
|
53
|
+
return new web3.eth.Contract(this.paimaL2Abi, this.paimaL2ContractAddress);
|
|
54
|
+
}
|
|
55
|
+
fallbackABI() {
|
|
56
|
+
return [
|
|
57
|
+
{
|
|
58
|
+
inputs: [{ name: "data", type: "bytes" }],
|
|
59
|
+
name: "paimaSubmitGameInput",
|
|
60
|
+
outputs: [],
|
|
61
|
+
stateMutability: "payable",
|
|
62
|
+
type: "function",
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.PaimaEngineConfig = PaimaEngineConfig;
|
|
68
|
+
/**
|
|
69
|
+
* Paima Wallet Interface - Sign a message with a wallet.
|
|
70
|
+
* @param wallet - The wallet to sign the message with.
|
|
71
|
+
* @param message - The message to sign.
|
|
72
|
+
* @returns
|
|
73
|
+
*/
|
|
74
|
+
async function signMessage(wallet, message) {
|
|
75
|
+
const signature = await wallet.provider.signMessage(message);
|
|
76
|
+
return signature;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Main function to send a transaction to a Paima L2 contract.
|
|
80
|
+
* It will decide whether to use the batcher or the self-sequenced transaction based on the preferBatchedMode flag.
|
|
81
|
+
*
|
|
82
|
+
* @param wallet - The wallet to send the transaction with.
|
|
83
|
+
* @param conciseData - The concise data to send.
|
|
84
|
+
* @param paimaEngineConfig - The Paima Engine configuration.
|
|
85
|
+
* @param waitForConfirmation - The confirmation mode to use:
|
|
86
|
+
* no-wait: Do not wait for any confirmation.
|
|
87
|
+
* wait-receipt: Wait only for the chain transaction receipt.
|
|
88
|
+
* wait-effectstream-processed: Wait for the transaction to be processed by the Paima Engine.
|
|
89
|
+
* @returns
|
|
90
|
+
*/
|
|
91
|
+
async function sendTransaction(wallet, conciseData, paimaEngineConfig, waitForConfirmation = "wait-effectstream-processed", batcherTarget = undefined) {
|
|
92
|
+
if (paimaEngineConfig.preferBatchedMode) {
|
|
93
|
+
return await sendBatcherTransaction(wallet, conciseData, paimaEngineConfig, waitForConfirmation, batcherTarget);
|
|
94
|
+
}
|
|
95
|
+
return await sendSelfSequencedTransaction(wallet, conciseData, paimaEngineConfig, waitForConfirmation);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Paima Wallet Interface - Send a transaction to a Paima L2 contract with a wallet.
|
|
99
|
+
* The concise data must match the grammar; if not the input will be rejected by Paima Engine.
|
|
100
|
+
* @param wallet - The wallet to send the transaction with.
|
|
101
|
+
* @param conciseData - The concise data to send.
|
|
102
|
+
* @param paimaEngineConfig - The Paima Engine configuration.
|
|
103
|
+
* @param waitForConfirmation - The confirmation mode to use:
|
|
104
|
+
* no-wait: Do not wait for any confirmation.
|
|
105
|
+
* wait-receipt: Wait only for the chain transaction receipt.
|
|
106
|
+
* wait-effectstream-processed: Wait for the transaction to be processed by the Paima Engine.
|
|
107
|
+
** @returns
|
|
108
|
+
*/
|
|
109
|
+
async function sendSelfSequencedTransaction(wallet,
|
|
110
|
+
// TODO this should be any type of grammar.
|
|
111
|
+
conciseData, paimaEngineConfig, waitForConfirmation = "wait-effectstream-processed") {
|
|
112
|
+
// TODO: Where to get this value from?
|
|
113
|
+
const DEFAULT_GAS_PRICE = BigInt("61000000000");
|
|
114
|
+
const provider = wallet.provider;
|
|
115
|
+
const addressAndType = provider.getAddress();
|
|
116
|
+
// NOTE: If the Paima L2 contract interface is implemented in other chains,
|
|
117
|
+
// we need to add support for them here. Paima L2 is EVM only for now.
|
|
118
|
+
if (addressAndType.type !== mod_js_1.AddressType.EVM) {
|
|
119
|
+
throw new Error("Paima L2 is EVM contract.");
|
|
120
|
+
}
|
|
121
|
+
const evmProvider = wallet.provider;
|
|
122
|
+
const hexData = (0, web3_utils_1.utf8ToHex)(JSON.stringify(conciseData));
|
|
123
|
+
const paimaL2Contract = await paimaEngineConfig.getPaimaL2Contract();
|
|
124
|
+
const txData = paimaL2Contract.methods["paimaSubmitGameInput"](hexData)
|
|
125
|
+
.encodeABI();
|
|
126
|
+
const tx = {
|
|
127
|
+
from: addressAndType.address,
|
|
128
|
+
data: txData,
|
|
129
|
+
to: paimaEngineConfig.paimaL2ContractAddress,
|
|
130
|
+
gasPrice: (0, viem_1.numberToHex)(DEFAULT_GAS_PRICE),
|
|
131
|
+
value: (0, viem_1.numberToHex)(paimaEngineConfig.paimaL2CurrentFee),
|
|
132
|
+
};
|
|
133
|
+
const tx_result = await evmProvider.sendTransaction(tx);
|
|
134
|
+
if (waitForConfirmation === "no-wait" || waitForConfirmation === "wait-receipt") {
|
|
135
|
+
return {
|
|
136
|
+
success: true,
|
|
137
|
+
type: "self-sequenced",
|
|
138
|
+
wait: waitForConfirmation,
|
|
139
|
+
hash: tx_result.txHash,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
// Wait for paima engine to process the transaction
|
|
143
|
+
const receipt = await getTxReceipt(tx_result.txHash, paimaEngineConfig);
|
|
144
|
+
const response = await waitForPaimaEngineBlockProcessed(Number(receipt.blockNumber), paimaEngineConfig);
|
|
145
|
+
const rollup = response ? response.rollup : 0;
|
|
146
|
+
return {
|
|
147
|
+
success: true,
|
|
148
|
+
type: "self-sequenced",
|
|
149
|
+
hash: tx_result.txHash,
|
|
150
|
+
wait: waitForConfirmation,
|
|
151
|
+
receipt: serializeBigInts(receipt),
|
|
152
|
+
rollup,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
// We return a json version of object for the frontend.
|
|
156
|
+
function serializeBigInts(value) {
|
|
157
|
+
return JSON.parse(JSON.stringify(value, (_, v) => typeof v === "bigint" ? v.toString() : v));
|
|
158
|
+
}
|
|
159
|
+
// Wait for the transaction receipt for a given transaction hash.
|
|
160
|
+
async function getTxReceipt(txHash, paimaEngineConfig) {
|
|
161
|
+
const web3 = await paimaEngineConfig.getWeb3Client();
|
|
162
|
+
return await web3.eth.getTransactionReceipt(txHash);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Wait for specific block number to be processed by the Paima Engine.
|
|
166
|
+
* This guarantees that the block number is processed by the Paima Engine.
|
|
167
|
+
* @param blockNumber - The block number to wait for.
|
|
168
|
+
* @param paimaEngineConfig - The Paima Engine configuration.
|
|
169
|
+
* @param timeout (optional) - The timeout in milliseconds.
|
|
170
|
+
* @returns
|
|
171
|
+
*/
|
|
172
|
+
function waitForPaimaEngineBlockProcessed(blockNumber, paimaEngineConfig, timeout = 60000) {
|
|
173
|
+
let subscriptionReference = undefined;
|
|
174
|
+
let latestBlock = 0;
|
|
175
|
+
let timer = undefined; // node & deno differ in type of timer
|
|
176
|
+
return Promise.race([
|
|
177
|
+
new Promise((_, reject) => {
|
|
178
|
+
timer = setTimeout(() => reject(new Error("Timeout")), timeout);
|
|
179
|
+
}),
|
|
180
|
+
new Promise((resolve, reject) => {
|
|
181
|
+
if (!paimaEngineConfig.paimaL2SyncProtocolName) {
|
|
182
|
+
reject(new Error("Paima L2 Sync Protocol Name is not set"));
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
mod_js_3.PaimaEventManager.Instance.subscribe({
|
|
186
|
+
topic: mod_js_3.BuiltinEvents.SyncChains,
|
|
187
|
+
filter: {
|
|
188
|
+
chain: paimaEngineConfig.paimaL2SyncProtocolName,
|
|
189
|
+
block: undefined,
|
|
190
|
+
},
|
|
191
|
+
}, (event) => {
|
|
192
|
+
latestBlock = Math.max(event.block, latestBlock);
|
|
193
|
+
if (latestBlock > blockNumber) {
|
|
194
|
+
resolve({ latestBlock, rollup: event.rollup });
|
|
195
|
+
}
|
|
196
|
+
})
|
|
197
|
+
.then((subscription) => subscriptionReference = subscription)
|
|
198
|
+
.catch(reject);
|
|
199
|
+
}),
|
|
200
|
+
]).finally(() => {
|
|
201
|
+
if (subscriptionReference) {
|
|
202
|
+
mod_js_3.PaimaEventManager.Instance.unsubscribe(subscriptionReference);
|
|
203
|
+
}
|
|
204
|
+
if (timer) {
|
|
205
|
+
clearTimeout(timer);
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Paima Wallet Interface - Standard batcher communication for a Paima L2 contract.
|
|
211
|
+
* This is only a default implementation, your own batcher might have different requirements.
|
|
212
|
+
* @param wallet - The wallet to send the batched transaction with.
|
|
213
|
+
* @param paimaL2Address - The address of the Paima L2 contract.
|
|
214
|
+
* @param conciseData - The concise data to send.
|
|
215
|
+
* @param waitForConfirmation - The confirmation mode to use:
|
|
216
|
+
* no-wait: Do not wait for any confirmation.
|
|
217
|
+
* wait-receipt: Wait only for the chain transaction receipt.
|
|
218
|
+
* wait-effectstream-processed: Wait for the transaction to be processed by the Paima Engine.
|
|
219
|
+
* @returns
|
|
220
|
+
*/
|
|
221
|
+
async function sendBatcherTransaction(wallet,
|
|
222
|
+
// TODO we need to pass the batcher address here.
|
|
223
|
+
conciseData, paimaEngineConfig, waitForConfirmation = "wait-effectstream-processed", batcherTarget = undefined) {
|
|
224
|
+
if (!paimaEngineConfig.batcherURL) {
|
|
225
|
+
throw new Error("Batcher URL is not set");
|
|
226
|
+
}
|
|
227
|
+
const conciseDataStr = JSON.stringify(conciseData);
|
|
228
|
+
// Send a batched message.
|
|
229
|
+
const timestamp = Date.now().toString();
|
|
230
|
+
const signature = await wallet.provider.signMessage((0, mod_js_2.createMessageForBatcher)(paimaEngineConfig.appName, timestamp, wallet.provider.getAddress().address, wallet.provider.getAddress().type, conciseDataStr, batcherTarget));
|
|
231
|
+
const response = await fetch(`${paimaEngineConfig.batcherURL}/send-input`, {
|
|
232
|
+
method: "POST",
|
|
233
|
+
headers: {
|
|
234
|
+
"Content-Type": "application/json",
|
|
235
|
+
},
|
|
236
|
+
body: JSON.stringify({
|
|
237
|
+
data: {
|
|
238
|
+
target: batcherTarget,
|
|
239
|
+
addressType: wallet.provider.getAddress().type,
|
|
240
|
+
address: wallet.provider.getAddress().address,
|
|
241
|
+
signature,
|
|
242
|
+
input: conciseDataStr,
|
|
243
|
+
timestamp,
|
|
244
|
+
},
|
|
245
|
+
confirmationLevel: waitForConfirmation,
|
|
246
|
+
}),
|
|
247
|
+
});
|
|
248
|
+
return await {
|
|
249
|
+
...(await response.json()),
|
|
250
|
+
type: "batcher",
|
|
251
|
+
success: response.ok,
|
|
252
|
+
};
|
|
253
|
+
}
|