zkcloudworker 0.17.6 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/ts/cloud/config.js.map +1 -0
- package/lib/ts/cloud/index.d.ts +4 -0
- package/lib/ts/cloud/index.js +5 -0
- package/lib/ts/cloud/index.js.map +1 -0
- package/lib/ts/cloud/networks.js.map +1 -0
- package/lib/ts/cloud/utils/base64.js.map +1 -0
- package/lib/ts/cloud/utils/graphql.js.map +1 -0
- package/lib/ts/cloud/utils/index.d.ts +3 -0
- package/lib/ts/cloud/utils/index.js +4 -0
- package/lib/ts/cloud/utils/index.js.map +1 -0
- package/lib/ts/cloud/utils/utils.js.map +1 -0
- package/lib/{web/src → ts}/cloud/worker/cloud.d.ts +3 -3
- package/lib/ts/cloud/worker/cloud.js.map +1 -0
- package/lib/ts/cloud/worker/index.d.ts +5 -0
- package/lib/ts/cloud/worker/index.js +6 -0
- package/lib/ts/cloud/worker/index.js.map +1 -0
- package/lib/{web/src → ts}/cloud/worker/job.d.ts +1 -1
- package/lib/{web/src → ts}/cloud/worker/job.js.map +1 -1
- package/lib/{web/src → ts}/cloud/worker/task.d.ts +1 -1
- package/lib/{web/src → ts}/cloud/worker/task.js.map +1 -1
- package/lib/ts/cloud/worker/transaction.js.map +1 -0
- package/lib/{web/src → ts}/cloud/worker/worker.d.ts +1 -1
- package/lib/ts/cloud/worker/worker.js.map +1 -0
- package/lib/ts/index.d.ts +2 -0
- package/lib/ts/index.js +3 -0
- package/lib/ts/index.js.map +1 -0
- package/lib/ts/{src/mina → mina}/api/api.d.ts +2 -2
- package/lib/{web/src → ts}/mina/api/api.js +3 -3
- package/lib/ts/mina/api/api.js.map +1 -0
- package/lib/ts/mina/index.d.ts +7 -0
- package/lib/ts/mina/index.js +9 -0
- package/lib/ts/mina/index.js.map +1 -0
- package/lib/ts/{src/mina → mina}/local/local.d.ts +2 -2
- package/lib/{web/src → ts}/mina/local/local.js +1 -1
- package/lib/ts/mina/local/local.js.map +1 -0
- package/lib/ts/mina/storage/index.d.ts +3 -0
- package/lib/ts/mina/storage/index.js +4 -0
- package/lib/ts/mina/storage/index.js.map +1 -0
- package/lib/ts/mina/storage/ipfs.js +16 -0
- package/lib/ts/mina/storage/ipfs.js.map +1 -0
- package/lib/ts/{src/mina → mina}/storage/pinata.d.ts +2 -2
- package/lib/{web/src → ts}/mina/storage/pinata.js +5 -1
- package/lib/ts/mina/storage/pinata.js.map +1 -0
- package/lib/{web/src → ts}/mina/storage/storage.d.ts +12 -12
- package/lib/ts/mina/storage/storage.js.map +1 -0
- package/lib/{web/src → ts}/mina/token/FungibleToken.d.ts +21 -21
- package/lib/ts/mina/token/FungibleToken.js.map +1 -0
- package/lib/ts/{src/mina → mina}/token/FungibleTokenAdmin.d.ts +2 -2
- package/lib/ts/mina/token/FungibleTokenAdmin.js.map +1 -0
- package/lib/{web/src → ts}/mina/token/api.d.ts +3 -3
- package/lib/{web/src → ts}/mina/token/api.js +1 -1
- package/lib/ts/mina/token/api.js.map +1 -0
- package/lib/ts/mina/token/index.d.ts +5 -0
- package/lib/ts/mina/token/index.js +6 -0
- package/lib/ts/mina/token/index.js.map +1 -0
- package/lib/ts/mina/token/vk.js.map +1 -0
- package/lib/ts/mina/token/whitelist.d.ts +305 -0
- package/lib/ts/mina/token/whitelist.js +132 -0
- package/lib/ts/mina/token/whitelist.js.map +1 -0
- package/lib/{web/src → ts}/mina/transactions/account.js +1 -1
- package/lib/ts/mina/transactions/account.js.map +1 -0
- package/lib/{web/src → ts}/mina/transactions/blockberry.d.ts +1 -1
- package/lib/ts/mina/transactions/blockberry.js.map +1 -0
- package/lib/ts/mina/transactions/chain.js.map +1 -0
- package/lib/ts/mina/transactions/index.d.ts +8 -0
- package/lib/ts/mina/transactions/index.js +9 -0
- package/lib/ts/mina/transactions/index.js.map +1 -0
- package/lib/ts/{src/mina → mina}/transactions/nonce.d.ts +2 -2
- package/lib/{web/src → ts}/mina/transactions/nonce.js +2 -2
- package/lib/ts/mina/transactions/nonce.js.map +1 -0
- package/lib/{web/src → ts}/mina/transactions/send.d.ts +1 -1
- package/lib/{web/src → ts}/mina/transactions/send.js +2 -2
- package/lib/ts/mina/transactions/send.js.map +1 -0
- package/lib/{web/src → ts}/mina/transactions/tiny-contract.d.ts +1 -1
- package/lib/ts/mina/transactions/tiny-contract.js.map +1 -0
- package/lib/{web/src → ts}/mina/transactions/transaction.js +1 -1
- package/lib/ts/mina/transactions/transaction.js.map +1 -0
- package/lib/ts/{src/mina → mina}/transactions/txstatus.d.ts +1 -1
- package/lib/{web/src → ts}/mina/transactions/txstatus.js +1 -1
- package/lib/ts/mina/transactions/txstatus.js.map +1 -0
- package/lib/{web/src → ts}/mina/utils/base64.js +1 -1
- package/lib/ts/mina/utils/base64.js.map +1 -0
- package/lib/{web/src → ts}/mina/utils/fee.js +1 -1
- package/lib/ts/mina/utils/fee.js.map +1 -0
- package/lib/{web/src → ts}/mina/utils/fetch.d.ts +1 -1
- package/lib/{web/src → ts}/mina/utils/fetch.js +1 -1
- package/lib/ts/mina/utils/fetch.js.map +1 -0
- package/lib/{web/src → ts}/mina/utils/fields.js +1 -1
- package/lib/ts/mina/utils/fields.js.map +1 -0
- package/lib/ts/mina/utils/index.d.ts +6 -0
- package/lib/ts/mina/utils/index.js +7 -0
- package/lib/ts/mina/utils/index.js.map +1 -0
- package/lib/ts/{src/mina → mina}/utils/indexed-map.d.ts +4 -2
- package/lib/{web/src → ts}/mina/utils/indexed-map.js +16 -6
- package/lib/ts/mina/utils/indexed-map.js.map +1 -0
- package/lib/ts/{src/mina → mina}/utils/mina.d.ts +1 -1
- package/lib/{web/src → ts}/mina/utils/mina.js +1 -1
- package/lib/ts/mina/utils/mina.js.map +1 -0
- package/lib/ts/mina/verification/index.d.ts +1 -0
- package/lib/ts/mina/verification/index.js +2 -0
- package/lib/ts/mina/verification/index.js.map +1 -0
- package/lib/{web/src → ts}/mina/verification/verification.d.ts +1 -1
- package/lib/ts/mina/verification/verification.js.map +1 -0
- package/lib/tsconfig.web.tsbuildinfo +1 -0
- package/lib/{ts/src → web}/cloud/config.js +2 -3
- package/lib/web/cloud/config.js.map +1 -0
- package/lib/web/cloud/index.d.ts +4 -0
- package/lib/web/cloud/index.js +5 -0
- package/lib/web/cloud/index.js.map +1 -0
- package/lib/{ts/src → web}/cloud/networks.js +2 -9
- package/lib/web/cloud/networks.js.map +1 -0
- package/lib/{ts/src → web}/cloud/utils/base64.js +7 -14
- package/lib/web/cloud/utils/base64.js.map +1 -0
- package/lib/{ts/src → web}/cloud/utils/graphql.js +6 -10
- package/lib/web/cloud/utils/graphql.js.map +1 -0
- package/lib/web/cloud/utils/index.d.ts +3 -0
- package/lib/web/cloud/utils/index.js +4 -0
- package/lib/web/cloud/utils/index.js.map +1 -0
- package/lib/{ts/src → web}/cloud/utils/utils.js +5 -11
- package/lib/web/cloud/utils/utils.js.map +1 -0
- package/lib/{ts/src → web}/cloud/worker/cloud.d.ts +3 -3
- package/lib/{ts/src → web}/cloud/worker/cloud.js +2 -5
- package/lib/web/cloud/worker/cloud.js.map +1 -0
- package/lib/web/cloud/worker/index.d.ts +5 -0
- package/lib/web/cloud/worker/index.js +6 -0
- package/lib/web/cloud/worker/index.js.map +1 -0
- package/lib/{ts/src → web}/cloud/worker/job.d.ts +1 -1
- package/lib/web/cloud/worker/job.js +2 -0
- package/lib/web/cloud/worker/job.js.map +1 -0
- package/lib/{ts/src → web}/cloud/worker/task.d.ts +1 -1
- package/lib/web/cloud/worker/task.js +2 -0
- package/lib/web/cloud/worker/task.js.map +1 -0
- package/lib/{ts/src → web}/cloud/worker/transaction.js +2 -2
- package/lib/web/cloud/worker/transaction.js.map +1 -0
- package/lib/{ts/src → web}/cloud/worker/worker.d.ts +1 -1
- package/lib/{ts/src → web}/cloud/worker/worker.js +2 -5
- package/lib/web/cloud/worker/worker.js.map +1 -0
- package/lib/web/index.d.ts +2 -0
- package/lib/web/index.js +3 -0
- package/lib/web/index.js.map +1 -0
- package/lib/web/{src/mina → mina}/api/api.d.ts +2 -2
- package/lib/{ts/src → web}/mina/api/api.js +17 -23
- package/lib/web/mina/api/api.js.map +1 -0
- package/lib/web/mina/index.d.ts +7 -0
- package/lib/web/mina/index.js +9 -0
- package/lib/web/mina/index.js.map +1 -0
- package/lib/web/{src/mina → mina}/local/local.d.ts +2 -2
- package/lib/{ts/src → web}/mina/local/local.js +5 -9
- package/lib/web/mina/local/local.js.map +1 -0
- package/lib/web/mina/storage/index.d.ts +3 -0
- package/lib/web/mina/storage/index.js +4 -0
- package/lib/web/mina/storage/index.js.map +1 -0
- package/lib/web/mina/storage/ipfs.js +16 -0
- package/lib/web/mina/storage/ipfs.js.map +1 -0
- package/lib/web/{src/mina → mina}/storage/pinata.d.ts +2 -2
- package/lib/{ts/src → web}/mina/storage/pinata.js +7 -5
- package/lib/web/mina/storage/pinata.js.map +1 -0
- package/lib/{ts/src → web}/mina/storage/storage.d.ts +12 -12
- package/lib/{ts/src → web}/mina/storage/storage.js +6 -9
- package/lib/web/mina/storage/storage.js.map +1 -0
- package/lib/{ts/src → web}/mina/token/FungibleToken.d.ts +21 -21
- package/lib/{ts/src → web}/mina/token/FungibleToken.js +87 -103
- package/lib/web/mina/token/FungibleToken.js.map +1 -0
- package/lib/web/{src/mina → mina}/token/FungibleTokenAdmin.d.ts +2 -2
- package/lib/{ts/src → web}/mina/token/FungibleTokenAdmin.js +24 -35
- package/lib/web/mina/token/FungibleTokenAdmin.js.map +1 -0
- package/lib/{ts/src → web}/mina/token/api.d.ts +3 -3
- package/lib/{ts/src → web}/mina/token/api.js +4 -7
- package/lib/web/mina/token/api.js.map +1 -0
- package/lib/web/mina/token/index.d.ts +5 -0
- package/lib/web/mina/token/index.js +6 -0
- package/lib/web/mina/token/index.js.map +1 -0
- package/lib/{ts/src → web}/mina/token/vk.js +2 -4
- package/lib/web/mina/token/vk.js.map +1 -0
- package/lib/web/mina/token/whitelist.d.ts +305 -0
- package/lib/web/mina/token/whitelist.js +132 -0
- package/lib/web/mina/token/whitelist.js.map +1 -0
- package/lib/web/mina/transactions/account.js +44 -0
- package/lib/web/mina/transactions/account.js.map +1 -0
- package/lib/{ts/src → web}/mina/transactions/blockberry.d.ts +1 -1
- package/lib/{ts/src → web}/mina/transactions/blockberry.js +5 -10
- package/lib/web/mina/transactions/blockberry.js.map +1 -0
- package/lib/web/mina/transactions/chain.js +2 -0
- package/lib/web/mina/transactions/chain.js.map +1 -0
- package/lib/web/mina/transactions/index.d.ts +8 -0
- package/lib/web/mina/transactions/index.js +9 -0
- package/lib/web/mina/transactions/index.js.map +1 -0
- package/lib/web/{src/mina → mina}/transactions/nonce.d.ts +2 -2
- package/lib/{ts/src → web}/mina/transactions/nonce.js +15 -18
- package/lib/web/mina/transactions/nonce.js.map +1 -0
- package/lib/{ts/src → web}/mina/transactions/send.d.ts +1 -1
- package/lib/{ts/src → web}/mina/transactions/send.js +12 -15
- package/lib/web/mina/transactions/send.js.map +1 -0
- package/lib/{ts/src → web}/mina/transactions/tiny-contract.d.ts +1 -1
- package/lib/web/mina/transactions/tiny-contract.js +22 -0
- package/lib/web/mina/transactions/tiny-contract.js.map +1 -0
- package/lib/{ts/src → web}/mina/transactions/transaction.js +18 -22
- package/lib/web/mina/transactions/transaction.js.map +1 -0
- package/lib/web/{src/mina → mina}/transactions/txstatus.d.ts +1 -1
- package/lib/{ts/src → web}/mina/transactions/txstatus.js +4 -6
- package/lib/web/mina/transactions/txstatus.js.map +1 -0
- package/lib/web/mina/utils/base64.js +29 -0
- package/lib/web/mina/utils/base64.js.map +1 -0
- package/lib/web/mina/utils/fee.js +11 -0
- package/lib/web/mina/utils/fee.js.map +1 -0
- package/lib/{ts/src → web}/mina/utils/fetch.d.ts +1 -1
- package/lib/{ts/src → web}/mina/utils/fetch.js +11 -15
- package/lib/web/mina/utils/fetch.js.map +1 -0
- package/lib/{ts/src → web}/mina/utils/fields.js +11 -14
- package/lib/web/mina/utils/fields.js.map +1 -0
- package/lib/web/mina/utils/index.d.ts +6 -0
- package/lib/web/mina/utils/index.js +7 -0
- package/lib/web/mina/utils/index.js.map +1 -0
- package/lib/web/{src/mina → mina}/utils/indexed-map.d.ts +4 -2
- package/lib/{ts/src → web}/mina/utils/indexed-map.js +37 -33
- package/lib/web/mina/utils/indexed-map.js.map +1 -0
- package/lib/web/{src/mina → mina}/utils/mina.d.ts +1 -1
- package/lib/{ts/src → web}/mina/utils/mina.js +21 -29
- package/lib/web/mina/utils/mina.js.map +1 -0
- package/lib/web/mina/verification/index.d.ts +1 -0
- package/lib/web/mina/verification/index.js +2 -0
- package/lib/web/mina/verification/index.js.map +1 -0
- package/lib/{ts/src → web}/mina/verification/verification.d.ts +1 -1
- package/lib/web/mina/verification/verification.js +2 -0
- package/lib/web/mina/verification/verification.js.map +1 -0
- package/package.json +2 -1
- package/lib/ts/src/cloud/index.d.ts +0 -4
- package/lib/ts/src/cloud/index.js +0 -20
- package/lib/ts/src/cloud/utils/index.d.ts +0 -3
- package/lib/ts/src/cloud/utils/index.js +0 -19
- package/lib/ts/src/cloud/worker/index.d.ts +0 -5
- package/lib/ts/src/cloud/worker/index.js +0 -21
- package/lib/ts/src/cloud/worker/job.js +0 -2
- package/lib/ts/src/cloud/worker/task.js +0 -2
- package/lib/ts/src/index.d.ts +0 -2
- package/lib/ts/src/index.js +0 -18
- package/lib/ts/src/mina/index.d.ts +0 -7
- package/lib/ts/src/mina/index.js +0 -24
- package/lib/ts/src/mina/storage/index.d.ts +0 -3
- package/lib/ts/src/mina/storage/index.js +0 -19
- package/lib/ts/src/mina/storage/ipfs.js +0 -10
- package/lib/ts/src/mina/token/index.d.ts +0 -4
- package/lib/ts/src/mina/token/index.js +0 -20
- package/lib/ts/src/mina/transactions/account.js +0 -48
- package/lib/ts/src/mina/transactions/chain.js +0 -2
- package/lib/ts/src/mina/transactions/index.d.ts +0 -8
- package/lib/ts/src/mina/transactions/index.js +0 -24
- package/lib/ts/src/mina/transactions/tiny-contract.js +0 -33
- package/lib/ts/src/mina/utils/base64.js +0 -34
- package/lib/ts/src/mina/utils/fee.js +0 -16
- package/lib/ts/src/mina/utils/index.d.ts +0 -6
- package/lib/ts/src/mina/utils/index.js +0 -22
- package/lib/ts/src/mina/verification/index.d.ts +0 -1
- package/lib/ts/src/mina/verification/index.js +0 -17
- package/lib/ts/src/mina/verification/verification.js +0 -2
- package/lib/ts/tsconfig.tsbuildinfo +0 -1
- package/lib/web/src/cloud/config.js.map +0 -1
- package/lib/web/src/cloud/index.d.ts +0 -4
- package/lib/web/src/cloud/index.js +0 -5
- package/lib/web/src/cloud/index.js.map +0 -1
- package/lib/web/src/cloud/networks.js.map +0 -1
- package/lib/web/src/cloud/utils/base64.js.map +0 -1
- package/lib/web/src/cloud/utils/graphql.js.map +0 -1
- package/lib/web/src/cloud/utils/index.d.ts +0 -3
- package/lib/web/src/cloud/utils/index.js +0 -4
- package/lib/web/src/cloud/utils/index.js.map +0 -1
- package/lib/web/src/cloud/utils/utils.js.map +0 -1
- package/lib/web/src/cloud/worker/cloud.js.map +0 -1
- package/lib/web/src/cloud/worker/index.d.ts +0 -5
- package/lib/web/src/cloud/worker/index.js +0 -6
- package/lib/web/src/cloud/worker/index.js.map +0 -1
- package/lib/web/src/cloud/worker/transaction.js.map +0 -1
- package/lib/web/src/cloud/worker/worker.js.map +0 -1
- package/lib/web/src/index.d.ts +0 -2
- package/lib/web/src/index.js +0 -3
- package/lib/web/src/index.js.map +0 -1
- package/lib/web/src/mina/api/api.js.map +0 -1
- package/lib/web/src/mina/index.d.ts +0 -7
- package/lib/web/src/mina/index.js +0 -9
- package/lib/web/src/mina/index.js.map +0 -1
- package/lib/web/src/mina/local/local.js.map +0 -1
- package/lib/web/src/mina/storage/index.d.ts +0 -3
- package/lib/web/src/mina/storage/index.js +0 -4
- package/lib/web/src/mina/storage/index.js.map +0 -1
- package/lib/web/src/mina/storage/ipfs.js +0 -8
- package/lib/web/src/mina/storage/ipfs.js.map +0 -1
- package/lib/web/src/mina/storage/pinata.js.map +0 -1
- package/lib/web/src/mina/storage/storage.js.map +0 -1
- package/lib/web/src/mina/token/FungibleToken.js.map +0 -1
- package/lib/web/src/mina/token/FungibleTokenAdmin.js.map +0 -1
- package/lib/web/src/mina/token/api.js.map +0 -1
- package/lib/web/src/mina/token/index.d.ts +0 -4
- package/lib/web/src/mina/token/index.js +0 -5
- package/lib/web/src/mina/token/index.js.map +0 -1
- package/lib/web/src/mina/token/vk.js.map +0 -1
- package/lib/web/src/mina/transactions/account.js.map +0 -1
- package/lib/web/src/mina/transactions/blockberry.js.map +0 -1
- package/lib/web/src/mina/transactions/chain.js.map +0 -1
- package/lib/web/src/mina/transactions/index.d.ts +0 -8
- package/lib/web/src/mina/transactions/index.js +0 -9
- package/lib/web/src/mina/transactions/index.js.map +0 -1
- package/lib/web/src/mina/transactions/nonce.js.map +0 -1
- package/lib/web/src/mina/transactions/send.js.map +0 -1
- package/lib/web/src/mina/transactions/tiny-contract.js.map +0 -1
- package/lib/web/src/mina/transactions/transaction.js.map +0 -1
- package/lib/web/src/mina/transactions/txstatus.js.map +0 -1
- package/lib/web/src/mina/utils/base64.js.map +0 -1
- package/lib/web/src/mina/utils/fee.js.map +0 -1
- package/lib/web/src/mina/utils/fetch.js.map +0 -1
- package/lib/web/src/mina/utils/fields.js.map +0 -1
- package/lib/web/src/mina/utils/index.d.ts +0 -6
- package/lib/web/src/mina/utils/index.js +0 -7
- package/lib/web/src/mina/utils/index.js.map +0 -1
- package/lib/web/src/mina/utils/indexed-map.js.map +0 -1
- package/lib/web/src/mina/utils/mina.js.map +0 -1
- package/lib/web/src/mina/verification/index.d.ts +0 -1
- package/lib/web/src/mina/verification/index.js +0 -2
- package/lib/web/src/mina/verification/index.js.map +0 -1
- package/lib/web/src/mina/verification/verification.js.map +0 -1
- package/lib/web/tsconfig.web.tsbuildinfo +0 -1
- /package/lib/ts/{src/cloud → cloud}/config.d.ts +0 -0
- /package/lib/{web/src → ts}/cloud/config.js +0 -0
- /package/lib/ts/{src/cloud → cloud}/networks.d.ts +0 -0
- /package/lib/{web/src → ts}/cloud/networks.js +0 -0
- /package/lib/ts/{src/cloud → cloud}/utils/base64.d.ts +0 -0
- /package/lib/{web/src → ts}/cloud/utils/base64.js +0 -0
- /package/lib/ts/{src/cloud → cloud}/utils/graphql.d.ts +0 -0
- /package/lib/{web/src → ts}/cloud/utils/graphql.js +0 -0
- /package/lib/ts/{src/cloud → cloud}/utils/utils.d.ts +0 -0
- /package/lib/{web/src → ts}/cloud/utils/utils.js +0 -0
- /package/lib/{web/src → ts}/cloud/worker/cloud.js +0 -0
- /package/lib/{web/src → ts}/cloud/worker/job.js +0 -0
- /package/lib/{web/src → ts}/cloud/worker/task.js +0 -0
- /package/lib/ts/{src/cloud → cloud}/worker/transaction.d.ts +0 -0
- /package/lib/{web/src → ts}/cloud/worker/transaction.js +0 -0
- /package/lib/{web/src → ts}/cloud/worker/worker.js +0 -0
- /package/lib/ts/{src/mina → mina}/storage/ipfs.d.ts +0 -0
- /package/lib/{web/src → ts}/mina/storage/storage.js +0 -0
- /package/lib/{web/src → ts}/mina/token/FungibleToken.js +0 -0
- /package/lib/{web/src → ts}/mina/token/FungibleTokenAdmin.js +0 -0
- /package/lib/ts/{src/mina → mina}/token/vk.d.ts +0 -0
- /package/lib/{web/src → ts}/mina/token/vk.js +0 -0
- /package/lib/ts/{src/mina → mina}/transactions/account.d.ts +0 -0
- /package/lib/{web/src → ts}/mina/transactions/blockberry.js +0 -0
- /package/lib/ts/{src/mina → mina}/transactions/chain.d.ts +0 -0
- /package/lib/{web/src → ts}/mina/transactions/chain.js +0 -0
- /package/lib/{web/src → ts}/mina/transactions/tiny-contract.js +0 -0
- /package/lib/ts/{src/mina → mina}/transactions/transaction.d.ts +0 -0
- /package/lib/ts/{src/mina → mina}/utils/base64.d.ts +0 -0
- /package/lib/ts/{src/mina → mina}/utils/fee.d.ts +0 -0
- /package/lib/ts/{src/mina → mina}/utils/fields.d.ts +0 -0
- /package/lib/{web/src → ts}/mina/verification/verification.js +0 -0
- /package/lib/web/{src/cloud → cloud}/config.d.ts +0 -0
- /package/lib/web/{src/cloud → cloud}/networks.d.ts +0 -0
- /package/lib/web/{src/cloud → cloud}/utils/base64.d.ts +0 -0
- /package/lib/web/{src/cloud → cloud}/utils/graphql.d.ts +0 -0
- /package/lib/web/{src/cloud → cloud}/utils/utils.d.ts +0 -0
- /package/lib/web/{src/cloud → cloud}/worker/transaction.d.ts +0 -0
- /package/lib/web/{src/mina → mina}/storage/ipfs.d.ts +0 -0
- /package/lib/web/{src/mina → mina}/token/vk.d.ts +0 -0
- /package/lib/web/{src/mina → mina}/transactions/account.d.ts +0 -0
- /package/lib/web/{src/mina → mina}/transactions/chain.d.ts +0 -0
- /package/lib/web/{src/mina → mina}/transactions/transaction.d.ts +0 -0
- /package/lib/web/{src/mina → mina}/utils/base64.d.ts +0 -0
- /package/lib/web/{src/mina → mina}/utils/fee.d.ts +0 -0
- /package/lib/web/{src/mina → mina}/utils/fields.d.ts +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"nonce.js","sourceRoot":"","sources":["../../../../../src/mina/transactions/nonce.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,2BAA2B,GAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAGvC,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,MAI9B;IAKC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAC;IACpD,IAAI,CAAC;QACH,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC;YAChE,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,CAAC,CAAC;gBACT,OAAO,EAAE,qBAAqB;aAC/B,CAAC;QACJ,CAAC;QAED,IACE,gBAAgB,KAAK,SA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CAAC,CAAC,CAAC,CAAC;QACP,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,eAAe,GAAG,CAAC,CAAC,CAAC;QACzD,IAAI,OAAO,IAAI,KAAK,GAAG,WAAW;YAChC,OAAO,CAAC,GAAG,CACT,sBAAsB,WAAW,OAAO,KAAK,QAAQ,OAAO,EAAE,CAC/D,CAAC;QACJ,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
@@ -1,10 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
exports.getTxStatusFast = getTxStatusFast;
|
5
|
-
const o1js_1 = require("o1js");
|
6
|
-
const cloud_1 = require("../../cloud");
|
7
|
-
const __1 = require("..");
|
1
|
+
import { checkZkappTransaction } from "o1js";
|
2
|
+
import { sleep } from "../../cloud/index.js";
|
3
|
+
import { fetchMinaAccount, getCurrentNetwork } from "../index.js";
|
8
4
|
/**
|
9
5
|
* The function `sendTx` sends a transaction, checks account updates, and waits for
|
10
6
|
* confirmation on the blockchain.
|
@@ -17,8 +13,8 @@ const __1 = require("..");
|
|
17
13
|
* @returns The `sendTx` function returns a `Mina.IncludedTransaction`, `Mina.PendingTransaction`,
|
18
14
|
* `Mina.RejectedTransaction`, or `undefined` if there was an error during the process.
|
19
15
|
*/
|
20
|
-
async function sendTx(params) {
|
21
|
-
const { tx, description = "", verbose = true, wait = true, chain =
|
16
|
+
export async function sendTx(params) {
|
17
|
+
const { tx, description = "", verbose = true, wait = true, chain = getCurrentNetwork().network.chainId, } = params;
|
22
18
|
// flatten accountUpdates
|
23
19
|
const accountUpdates = JSON.parse(tx.toJSON()).accountUpdates;
|
24
20
|
const auCount = [];
|
@@ -61,7 +57,7 @@ async function sendTx(params) {
|
|
61
57
|
else if (chain === "zeko") {
|
62
58
|
if (verbose)
|
63
59
|
console.log("Retrying Zeko tx");
|
64
|
-
await
|
60
|
+
await sleep(10000);
|
65
61
|
}
|
66
62
|
else {
|
67
63
|
console.error(`${description} tx NOT sent: hash: ${txSent?.hash} status: ${txSent?.status}`, txSent.errors);
|
@@ -89,7 +85,7 @@ async function sendTx(params) {
|
|
89
85
|
const { publicKey, nonce } = tx.transaction.feePayer.body;
|
90
86
|
const started = Date.now();
|
91
87
|
while (Date.now() - started < 1000 * 60 * 10) {
|
92
|
-
const newNonce = (await
|
88
|
+
const newNonce = (await fetchMinaAccount({
|
93
89
|
publicKey,
|
94
90
|
force: true,
|
95
91
|
})).account?.nonce;
|
@@ -98,7 +94,7 @@ async function sendTx(params) {
|
|
98
94
|
return txIncluded;
|
99
95
|
if (verbose)
|
100
96
|
console.log(`Waiting for ${chain} to update state for ${Math.floor((Date.now() - started) / 1000)} sec...`);
|
101
|
-
await
|
97
|
+
await sleep(10000);
|
102
98
|
}
|
103
99
|
// finally, if the tx is still not included, show an error
|
104
100
|
console.error(`${chain} do not reflect nonce update for tx ${txIncluded.hash} with status ${txIncluded.status}`);
|
@@ -113,12 +109,12 @@ async function sendTx(params) {
|
|
113
109
|
console.error("Error sending tx", error);
|
114
110
|
}
|
115
111
|
}
|
116
|
-
async function getTxStatusFast(params) {
|
117
|
-
const { hash, chain =
|
112
|
+
export async function getTxStatusFast(params) {
|
113
|
+
const { hash, chain = getCurrentNetwork().network.chainId } = params;
|
118
114
|
if (chain === "local" || chain === "zeko")
|
119
115
|
return { success: true, result: true };
|
120
116
|
try {
|
121
|
-
const txStatus = await
|
117
|
+
const txStatus = await checkZkappTransaction(hash);
|
122
118
|
return {
|
123
119
|
success: true,
|
124
120
|
result: txStatus?.success ?? false,
|
@@ -129,3 +125,4 @@ async function getTxStatusFast(params) {
|
|
129
125
|
return { success: false, error: error?.message ?? "Cannot get tx status" };
|
130
126
|
}
|
131
127
|
}
|
128
|
+
//# sourceMappingURL=send.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"send.js","sourceRoot":"","sources":["../../../../../src/mina/transactions/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAq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,MAAM,EAAE,IAAI,EAAE,CAAC;IAEzC,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,qBAAqB,CAAC,IAAI,CAAC,CAAC;QACnD,OAAO;YACL,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,QAAQ,EAAE,OAAO,IAAI,KAAK;SACnC,CAAC;IACJ,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CACX,uDAAuD,EACvD,IAAI,EACJ,KAAK,CACN,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,IAAI,sBAAsB,EAAE,CAAC;IAC7E,CAAC;AACH,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Field, SmartContract, State } from "o1js";
|
2
2
|
export declare class TinyContract extends SmartContract {
|
3
|
-
value: State<import("o1js/dist/node/lib/provable/field").Field>;
|
3
|
+
value: State<import("node_modules/o1js/dist/node/lib/provable/field.js").Field>;
|
4
4
|
setValue(value: Field): Promise<void>;
|
5
5
|
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
2
|
+
import { Field, SmartContract, method, state, State } from "o1js";
|
3
|
+
export class TinyContract extends SmartContract {
|
4
|
+
constructor() {
|
5
|
+
super(...arguments);
|
6
|
+
this.value = State();
|
7
|
+
}
|
8
|
+
async setValue(value) {
|
9
|
+
this.value.set(value);
|
10
|
+
}
|
11
|
+
}
|
12
|
+
__decorate([
|
13
|
+
state(Field),
|
14
|
+
__metadata("design:type", Object)
|
15
|
+
], TinyContract.prototype, "value", void 0);
|
16
|
+
__decorate([
|
17
|
+
method,
|
18
|
+
__metadata("design:type", Function),
|
19
|
+
__metadata("design:paramtypes", [Field]),
|
20
|
+
__metadata("design:returntype", Promise)
|
21
|
+
], TinyContract.prototype, "setValue", null);
|
22
|
+
//# sourceMappingURL=tiny-contract.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tiny-contract.js","sourceRoot":"","sources":["../../../../../src/mina/transactions/tiny-contract.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAElE,MAAM,OAAO,YAAa,SAAQ,aAAa;IAA/C;;QACgB,UAAK,GAAG,KAAK,EAAS,CAAC;IAKvC,CAAC;IAHe,AAAN,KAAK,CAAC,QAAQ,CAAC,KAAY;QACjC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACF;AALe;IAAb,KAAK,CAAC,KAAK,CAAC;;2CAAwB;AAEvB;IAAb,MAAM;;qCAAuB,KAAK;;4CAElC"}
|
@@ -1,25 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
exports.deserializeTransaction = deserializeTransaction;
|
5
|
-
exports.serializeTransaction = serializeTransaction;
|
6
|
-
const o1js_1 = require("o1js");
|
7
|
-
const base64_1 = require("../utils/base64");
|
8
|
-
function transactionParams(serializedTransaction, signedJson) {
|
1
|
+
import { Field, PublicKey, Mina, UInt64 } from "o1js";
|
2
|
+
import { fieldToBase64, fieldFromBase64 } from "../utils/base64.js";
|
3
|
+
export function transactionParams(serializedTransaction, signedJson) {
|
9
4
|
const { sender, nonce, tx } = JSON.parse(serializedTransaction);
|
10
|
-
const transaction =
|
5
|
+
const transaction = Mina.Transaction.fromJSON(JSON.parse(tx));
|
11
6
|
const memo = transaction.transaction.memo;
|
12
7
|
return {
|
13
|
-
fee:
|
14
|
-
sender:
|
8
|
+
fee: UInt64.from(signedJson.zkappCommand.feePayer.body.fee),
|
9
|
+
sender: PublicKey.fromBase58(sender),
|
15
10
|
nonce: Number(signedJson.zkappCommand.feePayer.body.nonce),
|
16
11
|
memo,
|
17
12
|
};
|
18
13
|
}
|
19
|
-
function deserializeTransaction(serializedTransaction, txNew, signedJson) {
|
14
|
+
export function deserializeTransaction(serializedTransaction, txNew, signedJson) {
|
20
15
|
//console.log("new transaction", txNew);
|
21
16
|
const { tx, blindingValues, length, forestJSONs } = JSON.parse(serializedTransaction);
|
22
|
-
const transaction =
|
17
|
+
const transaction = Mina.Transaction.fromJSON(JSON.parse(tx));
|
23
18
|
const forests = forestJSONs.map((f) => JSON.parse(f));
|
24
19
|
//console.log("transaction", transaction);
|
25
20
|
if (length !== txNew.transaction.accountUpdates.length) {
|
@@ -38,7 +33,7 @@ function deserializeTransaction(serializedTransaction, txNew, signedJson) {
|
|
38
33
|
.blindingValue === undefined) {
|
39
34
|
throw new Error(`Lazy authorization blinding value is undefined for item ${i}`);
|
40
35
|
}
|
41
|
-
transaction.transaction.accountUpdates[i].lazyAuthorization.blindingValue =
|
36
|
+
transaction.transaction.accountUpdates[i].lazyAuthorization.blindingValue = Field.fromJSON(blindingValues[i]);
|
42
37
|
}
|
43
38
|
if (forests[i].length > 0) {
|
44
39
|
if (transaction.transaction.accountUpdates[i].lazyAuthorization ===
|
@@ -56,7 +51,7 @@ function deserializeTransaction(serializedTransaction, txNew, signedJson) {
|
|
56
51
|
}
|
57
52
|
transaction.transaction.feePayer.authorization =
|
58
53
|
signedJson.zkappCommand.feePayer.authorization;
|
59
|
-
transaction.transaction.feePayer.body.fee =
|
54
|
+
transaction.transaction.feePayer.body.fee = UInt64.from(signedJson.zkappCommand.feePayer.body.fee);
|
60
55
|
for (let i = 0; i < length; i++) {
|
61
56
|
const signature = signedJson.zkappCommand.accountUpdates[i].authorization.signature;
|
62
57
|
if (signature !== undefined && signature !== null) {
|
@@ -66,7 +61,7 @@ function deserializeTransaction(serializedTransaction, txNew, signedJson) {
|
|
66
61
|
}
|
67
62
|
return transaction;
|
68
63
|
}
|
69
|
-
function serializeTransaction(tx) {
|
64
|
+
export function serializeTransaction(tx) {
|
70
65
|
const length = tx.transaction.accountUpdates.length;
|
71
66
|
let i;
|
72
67
|
const blindingValues = [];
|
@@ -97,19 +92,19 @@ function serializeTransaction(tx) {
|
|
97
92
|
function serializeLazyAuthorization(lazyAuthorization, serialized) {
|
98
93
|
if (lazyAuthorization?.hash !== undefined && lazyAuthorization.hash.toJSON) {
|
99
94
|
serialized.items.push({
|
100
|
-
h:
|
95
|
+
h: fieldToBase64(lazyAuthorization.hash),
|
101
96
|
});
|
102
97
|
}
|
103
98
|
if (lazyAuthorization?.previousHash !== undefined &&
|
104
99
|
lazyAuthorization.previousHash.toJSON) {
|
105
100
|
serialized.items.push({
|
106
|
-
p:
|
101
|
+
p: fieldToBase64(lazyAuthorization.previousHash),
|
107
102
|
});
|
108
103
|
}
|
109
104
|
if (lazyAuthorization?.callData !== undefined &&
|
110
105
|
lazyAuthorization.callData.toJSON) {
|
111
106
|
serialized.items.push({
|
112
|
-
c:
|
107
|
+
c: fieldToBase64(lazyAuthorization.callData),
|
113
108
|
});
|
114
109
|
}
|
115
110
|
if (lazyAuthorization?.id !== undefined) {
|
@@ -138,7 +133,7 @@ function deserializeLazyAuthorization(lazyAuthorization, serialized) {
|
|
138
133
|
const hash = serialized.items[serialized.restoredItems].h;
|
139
134
|
if (hash === undefined)
|
140
135
|
throw new Error(`Hash is undefined for item ${serialized.restoredItems}`);
|
141
|
-
lazyAuthorization.hash =
|
136
|
+
lazyAuthorization.hash = fieldFromBase64(hash);
|
142
137
|
serialized.restoredItems++;
|
143
138
|
}
|
144
139
|
if (lazyAuthorization?.previousHash !== undefined &&
|
@@ -148,7 +143,7 @@ function deserializeLazyAuthorization(lazyAuthorization, serialized) {
|
|
148
143
|
const previousHash = serialized.items[serialized.restoredItems].p;
|
149
144
|
if (previousHash === undefined)
|
150
145
|
throw new Error(`Previous hash is undefined for item ${serialized.restoredItems}`);
|
151
|
-
lazyAuthorization.previousHash =
|
146
|
+
lazyAuthorization.previousHash = fieldFromBase64(previousHash);
|
152
147
|
serialized.restoredItems++;
|
153
148
|
}
|
154
149
|
if (lazyAuthorization?.callData !== undefined &&
|
@@ -158,7 +153,7 @@ function deserializeLazyAuthorization(lazyAuthorization, serialized) {
|
|
158
153
|
const callData = serialized.items[serialized.restoredItems].c;
|
159
154
|
if (callData === undefined)
|
160
155
|
throw new Error(`Call data is undefined for item ${serialized.restoredItems}`);
|
161
|
-
lazyAuthorization.callData =
|
156
|
+
lazyAuthorization.callData = fieldFromBase64(callData);
|
162
157
|
serialized.restoredItems++;
|
163
158
|
}
|
164
159
|
if (lazyAuthorization?.id !== undefined) {
|
@@ -181,3 +176,4 @@ function deserializeLazyAuthorization(lazyAuthorization, serialized) {
|
|
181
176
|
}
|
182
177
|
}
|
183
178
|
}
|
179
|
+
//# sourceMappingURL=transaction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../../../src/mina/transactions/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAe,IAAI,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAapE,MAAM,UAAU,iBAAiB,CAC/B,qBAA6B,EAC7B,UAAe;IAOf,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAChE,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9D,MAAM,IAAI,GAAG,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC;IAC1C,OAAO;QACL,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;QAC3D,MAAM,EAAE,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC;QACpC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC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AC;IAC7B,CAAC;IACD,IAAI,iBAAiB,EAAE,EAAE,KAAK,SAAS,EAAE,CAAC;QACxC,IAAI,UAAU,CAAC,aAAa,IAAI,UAAU,CAAC,MAAM;YAC/C,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACvD,MAAM,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxD,IAAI,EAAE,KAAK,SAAS;YAClB,MAAM,IAAI,KAAK,CAAC,4BAA4B,UAAU,CAAC,aAAa,EAAE,CAAC,CAAC;QAC1E,iBAAiB,CAAC,EAAE,GAAG,EAAE,CAAC;QAC1B,UAAU,CAAC,aAAa,EAAE,CAAC;IAC7B,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACrC,KAAK,MAAM,IAAI,IAAI,iBAAiB,EAAE,CAAC;YACrC,4BAA4B,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IACD,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE,CAAC;QAC1C,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;YACpC,4BAA4B,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;AACH,CAAC"}
|
@@ -1,11 +1,8 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.txStatusBlockberry = txStatusBlockberry;
|
4
|
-
const blockberry_1 = require("./blockberry");
|
1
|
+
import { getZkAppTxFromBlockBerry } from "./blockberry.js";
|
5
2
|
const TIMEOUT = 1000 * 60 * 21;
|
6
|
-
async function txStatusBlockberry(params) {
|
3
|
+
export async function txStatusBlockberry(params) {
|
7
4
|
const { hash, chain, time, blockBerryApiKey } = params;
|
8
|
-
const tx = await
|
5
|
+
const tx = await getZkAppTxFromBlockBerry({ hash, chain, blockBerryApiKey });
|
9
6
|
if (tx?.txStatus)
|
10
7
|
return tx?.txStatus;
|
11
8
|
if (Date.now() - time > (params.timeout ?? TIMEOUT)) {
|
@@ -16,3 +13,4 @@ async function txStatusBlockberry(params) {
|
|
16
13
|
return "pending";
|
17
14
|
}
|
18
15
|
}
|
16
|
+
//# sourceMappingURL=txstatus.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"txstatus.js","sourceRoot":"","sources":["../../../../../src/mina/transactions/txstatus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,MAAM,OAAO,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,CAAC;AAE/B,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,MAMxC;IACC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAC;IAEvD,MAAM,EAAE,GAAG,MAAM,wBAAwB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAC7E,IAAI,EAAE,EAAE,QAAQ;QAAE,OAAO,EAAE,EAAE,QAAQ,CAAC;IACtC,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,EAAE,CAAC;QACpD,OAAO,CAAC,KAAK,CACX,qDAAqD,EACrD,KAAK,EACL,IAAI,CACL,CAAC;QACF,OAAO,UAAU,CAAC;IACpB,CAAC;SAAM,CAAC;QACN,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { Field } from "o1js";
|
2
|
+
import { toBase, fromBase } from "../../cloud/utils/base64.js";
|
3
|
+
// URL friendly base64 encoding
|
4
|
+
const TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
5
|
+
export function fieldToBase56(field) {
|
6
|
+
const digits = toBase(field.toBigInt(), 56n);
|
7
|
+
//console.log("digits:", digits);
|
8
|
+
const str = digits.map((x) => TABLE[Number(x)]).join("");
|
9
|
+
//console.log("str:", str);
|
10
|
+
return str;
|
11
|
+
}
|
12
|
+
export function fieldFromBase56(str) {
|
13
|
+
const base56Digits = str.split("").map((x) => BigInt(TABLE.indexOf(x)));
|
14
|
+
const x = fromBase(base56Digits, 56n);
|
15
|
+
return Field(x);
|
16
|
+
}
|
17
|
+
export function fieldToBase64(field) {
|
18
|
+
const digits = toBase(field.toBigInt(), 64n);
|
19
|
+
//console.log("digits:", digits);
|
20
|
+
const str = digits.map((x) => TABLE[Number(x)]).join("");
|
21
|
+
//console.log("str:", str);
|
22
|
+
return str;
|
23
|
+
}
|
24
|
+
export function fieldFromBase64(str) {
|
25
|
+
const base64Digits = str.split("").map((x) => BigInt(TABLE.indexOf(x)));
|
26
|
+
const x = fromBase(base64Digits, 64n);
|
27
|
+
return Field(x);
|
28
|
+
}
|
29
|
+
//# sourceMappingURL=base64.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../../../../src/mina/utils/base64.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE/D,+BAA+B;AAC/B,MAAM,KAAK,GACT,kEAAkE,CAAC;AAErE,MAAM,UAAU,aAAa,CAAC,KAAY;IACxC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,GAAG,CAAC,CAAC;IAC7C,iCAAiC;IACjC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzD,2BAA2B;IAC3B,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GAAW;IACzC,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACxE,MAAM,CAAC,GAAG,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;IACtC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAY;IACxC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,GAAG,CAAC,CAAC;IAC7C,iCAAiC;IACjC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzD,2BAA2B;IAC3B,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GAAW;IACzC,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACxE,MAAM,CAAC,GAAG,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;IACtC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { UInt64 } from "o1js";
|
2
|
+
import config from "../../cloud/config.js";
|
3
|
+
/**
|
4
|
+
* Calculate the fee for a transaction
|
5
|
+
* @returns the fee for a transaction
|
6
|
+
*/
|
7
|
+
export async function fee() {
|
8
|
+
//TODO: update after mainnet launch and resolution of the issue https://github.com/o1-labs/o1js/issues/1626
|
9
|
+
return UInt64.fromJSON(config.MINAFEE);
|
10
|
+
}
|
11
|
+
//# sourceMappingURL=fee.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fee.js","sourceRoot":"","sources":["../../../../../src/mina/utils/fee.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,GAAG;IACvB,2GAA2G;IAC3G,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACzC,CAAC"}
|
@@ -14,7 +14,7 @@ export declare function fetchMinaAccount(params: {
|
|
14
14
|
}): Promise<{
|
15
15
|
account: undefined;
|
16
16
|
} | {
|
17
|
-
account: import("o1js/dist/node/bindings/mina-transaction/gen/transaction").Account;
|
17
|
+
account: import("node_modules/o1js/dist/node/bindings/mina-transaction/gen/transaction.js").Account;
|
18
18
|
error: undefined;
|
19
19
|
}>;
|
20
20
|
/**
|
@@ -1,10 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
exports.fetchMinaAccount = fetchMinaAccount;
|
4
|
-
exports.fetchMinaActions = fetchMinaActions;
|
5
|
-
exports.checkMinaZkappTransaction = checkMinaZkappTransaction;
|
6
|
-
const o1js_1 = require("o1js");
|
7
|
-
const cloud_1 = require("../../cloud");
|
1
|
+
import { Mina, fetchAccount, checkZkappTransaction, } from "o1js";
|
2
|
+
import { sleep } from "../../cloud/utils/index.js";
|
8
3
|
/**
|
9
4
|
* Fetches the Mina account for a given public key with error handling
|
10
5
|
* @param params the parameters for fetching the account
|
@@ -13,7 +8,7 @@ const cloud_1 = require("../../cloud");
|
|
13
8
|
* @param params.force whether to force the fetch - use it only if you are sure the account exists
|
14
9
|
* @returns the account object
|
15
10
|
*/
|
16
|
-
async function fetchMinaAccount(params) {
|
11
|
+
export async function fetchMinaAccount(params) {
|
17
12
|
const { publicKey, tokenId, force = false } = params;
|
18
13
|
const timeout = 1000 * 60 * 3; // 3 minutes
|
19
14
|
let attempt = 0;
|
@@ -21,7 +16,7 @@ async function fetchMinaAccount(params) {
|
|
21
16
|
let result = { account: undefined };
|
22
17
|
while (Date.now() - startTime < timeout) {
|
23
18
|
try {
|
24
|
-
const result = await
|
19
|
+
const result = await fetchAccount({
|
25
20
|
publicKey,
|
26
21
|
tokenId,
|
27
22
|
});
|
@@ -46,7 +41,7 @@ async function fetchMinaAccount(params) {
|
|
46
41
|
}
|
47
42
|
}
|
48
43
|
attempt++;
|
49
|
-
await
|
44
|
+
await sleep(1000 * 6 * attempt); // to handle rate limit we increase the interval
|
50
45
|
}
|
51
46
|
if (force === true)
|
52
47
|
throw new Error(`fetchMinaAccount timeout
|
@@ -66,12 +61,12 @@ async function fetchMinaAccount(params) {
|
|
66
61
|
* @param endActionState the ending action state
|
67
62
|
* @returns the actions array
|
68
63
|
*/
|
69
|
-
async function fetchMinaActions(publicKey, fromActionState, endActionState) {
|
64
|
+
export async function fetchMinaActions(publicKey, fromActionState, endActionState) {
|
70
65
|
const timeout = 1000 * 60 * 600; // 10 hours
|
71
66
|
const startTime = Date.now();
|
72
67
|
while (Date.now() - startTime < timeout) {
|
73
68
|
try {
|
74
|
-
let actions = await
|
69
|
+
let actions = await Mina.fetchActions(publicKey, {
|
75
70
|
fromActionState,
|
76
71
|
endActionState,
|
77
72
|
});
|
@@ -83,7 +78,7 @@ async function fetchMinaActions(publicKey, fromActionState, endActionState) {
|
|
83
78
|
catch (error) {
|
84
79
|
console.log("Error in fetchMinaActions", error.toString().substring(0, 300));
|
85
80
|
}
|
86
|
-
await
|
81
|
+
await sleep(1000 * 60 * 2);
|
87
82
|
}
|
88
83
|
console.log("Timeout in fetchMinaActions");
|
89
84
|
return undefined;
|
@@ -93,9 +88,9 @@ async function fetchMinaActions(publicKey, fromActionState, endActionState) {
|
|
93
88
|
* @param hash the hash of the transaction
|
94
89
|
* @returns the transaction object
|
95
90
|
*/
|
96
|
-
async function checkMinaZkappTransaction(hash) {
|
91
|
+
export async function checkMinaZkappTransaction(hash) {
|
97
92
|
try {
|
98
|
-
const result = await
|
93
|
+
const result = await checkZkappTransaction(hash);
|
99
94
|
return result;
|
100
95
|
}
|
101
96
|
catch (error) {
|
@@ -103,3 +98,4 @@ async function checkMinaZkappTransaction(hash) {
|
|
103
98
|
return { success: false };
|
104
99
|
}
|
105
100
|
}
|
101
|
+
//# sourceMappingURL=fetch.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../../../src/mina/utils/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,IAAI,EACJ,YAAY,EACZ,qBAAqB,GACtB,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,MAItC;IACC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;IACrD,MAAM,OAAO,GAAG,IAAI,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,YAAY;IAC3C,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,IAAI,MAAM,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IACpC,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,GAAG,OAAO,EAAE,CAAC;QACxC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC;gBAChC,SAAS;gBACT,OAAO;aACR,CAAC,CAAC;YACH,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OA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
-
|
2
|
-
|
3
|
-
exports.serializeFields = serializeFields;
|
4
|
-
exports.deserializeFields = deserializeFields;
|
5
|
-
const o1js_1 = require("o1js");
|
6
|
-
const base64_1 = require("./base64");
|
1
|
+
import { Field, Poseidon } from "o1js";
|
2
|
+
import { fieldToBase64, fieldFromBase64 } from "./base64.js";
|
7
3
|
/**
|
8
4
|
* Serialize fields to a string using base64 URL-friendly encoding
|
9
5
|
* @param fields the fields array to serialize
|
10
6
|
* @returns the serialized string
|
11
7
|
*/
|
12
|
-
function serializeFields(fields) {
|
13
|
-
const hash =
|
14
|
-
const value = [
|
8
|
+
export function serializeFields(fields) {
|
9
|
+
const hash = Poseidon.hash(fields);
|
10
|
+
const value = [Field(fields.length), hash, ...fields];
|
15
11
|
//return value.map((f) => f.toBigInt().toString(36)).join(".");
|
16
|
-
return value.map((f) =>
|
12
|
+
return value.map((f) => fieldToBase64(f)).join(".");
|
17
13
|
}
|
18
14
|
/**
|
19
15
|
* Deserialize fields from a string using base64 URL-friendly encoding
|
20
16
|
* @param s the string to deserialize
|
21
17
|
* @returns the deserialized fields array
|
22
18
|
*/
|
23
|
-
function deserializeFields(s) {
|
19
|
+
export function deserializeFields(s) {
|
24
20
|
try {
|
25
21
|
//const value = s.split(".").map((n) => Field(BigInt(convert(n, 36))));
|
26
|
-
const value = s.split(".").map((n) =>
|
22
|
+
const value = s.split(".").map((n) => fieldFromBase64(n));
|
27
23
|
const length = value[0];
|
28
|
-
if (
|
24
|
+
if (Field(value.length - 2)
|
29
25
|
.equals(length)
|
30
26
|
.toBoolean() === false)
|
31
27
|
throw new Error("deserializeFields: invalid length");
|
32
|
-
const hash =
|
28
|
+
const hash = Poseidon.hash(value.slice(2));
|
33
29
|
if (hash.equals(value[1]).toBoolean()) {
|
34
30
|
return value.slice(2);
|
35
31
|
}
|
@@ -40,3 +36,4 @@ function deserializeFields(s) {
|
|
40
36
|
throw new Error(`deserializeFields: invalid string: ${s}: ${e}`);
|
41
37
|
}
|
42
38
|
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KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC;YACtC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACxB,CAAC;;YAAM,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IAC3E,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;AACH,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mina/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Experimental } from "o1js";
|
2
|
-
declare const IndexedMerkleMap: typeof import("o1js/dist/node/lib/provable/merkle-tree-indexed").IndexedMerkleMap;
|
2
|
+
declare const IndexedMerkleMap: typeof import("node_modules/o1js/dist/node/lib/provable/merkle-tree-indexed.js").IndexedMerkleMap;
|
3
3
|
type IndexedMerkleMap = Experimental.IndexedMerkleMap;
|
4
4
|
export interface IndexedMapSerialized {
|
5
5
|
height: number;
|
@@ -11,7 +11,9 @@ export interface IndexedMapSerialized {
|
|
11
11
|
export declare function loadIndexedMerkleMap(params: {
|
12
12
|
url: string;
|
13
13
|
type: ReturnType<typeof IndexedMerkleMap>;
|
14
|
-
|
14
|
+
timeout?: number;
|
15
|
+
attempts?: number;
|
16
|
+
}): Promise<import("node_modules/o1js/dist/node/lib/provable/merkle-tree-indexed.js").IndexedMerkleMapBase>;
|
15
17
|
export declare function saveIndexedMerkleMap(params: {
|
16
18
|
map: IndexedMerkleMap;
|
17
19
|
name?: string;
|