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
@@ -1,12 +1,9 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.zkCloudWorker = void 0;
|
4
1
|
/**
|
5
2
|
* Abstract class for the zkCloudWorker
|
6
3
|
* Used to define the zkCloudWorker methods and properties
|
7
4
|
* Should be implemented for by the developer for the zkCloudWorker in the cloud
|
8
5
|
*/
|
9
|
-
class zkCloudWorker {
|
6
|
+
export class zkCloudWorker {
|
10
7
|
/**
|
11
8
|
* Constructor for the zkCloudWorker class
|
12
9
|
* @param cloud the cloud instance provided by the zkCloudWorker in the local environment or in the cloud
|
@@ -53,4 +50,4 @@ class zkCloudWorker {
|
|
53
50
|
return undefined;
|
54
51
|
}
|
55
52
|
}
|
56
|
-
|
53
|
+
//# sourceMappingURL=worker.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../../../../src/cloud/worker/worker.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,OAAgB,aAAa;IAIjC;;;OAGG;IACH,YAAY,KAAY;QACtB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,wEAAwE;IACxE;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,KAAK,CAAC,MAAc,EAAE,MAAc;QACxC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,+EAA+E;IAC/E;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,YAAsB;QAClC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,mBAAmB,CAAC,YAAgC,IAAkB,CAAC;IAE7E;;;OAGG;IACH,KAAK,CAAC,IAAI;QACR,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
|
package/lib/web/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { zkCloudWorker, Cloud, JobData } from "../../cloud/worker";
|
2
|
-
import { blockchain } from "../../cloud/networks";
|
1
|
+
import { zkCloudWorker, Cloud, JobData } from "../../cloud/worker/index.js";
|
2
|
+
import { blockchain } from "../../cloud/networks.js";
|
3
3
|
/**
|
4
4
|
* The APICommand type for interacting with the zkCloudWorker
|
5
5
|
* @typedef { "recursiveProof" | "execute" | "sendTransactions" | "jobResult" | "deploy" | "getBalance" | "queryBilling" } ApiCommand
|
@@ -1,15 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
};
|
5
|
-
|
6
|
-
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
8
|
-
const chalk_1 = __importDefault(require("chalk"));
|
9
|
-
const utils_1 = require("../../cloud/utils");
|
10
|
-
const local_1 = require("../local/local");
|
11
|
-
const config_1 = __importDefault(require("../../cloud/config"));
|
12
|
-
const { ZKCLOUDWORKER_AUTH, ZKCLOUDWORKER_API } = config_1.default;
|
1
|
+
import axios from "axios";
|
2
|
+
import chalk from "chalk";
|
3
|
+
import { sleep } from "../../cloud/utils/index.js";
|
4
|
+
import { LocalCloud, LocalStorage } from "../local/local.js";
|
5
|
+
import config from "../../cloud/config.js";
|
6
|
+
const { ZKCLOUDWORKER_AUTH, ZKCLOUDWORKER_API } = config;
|
13
7
|
/**
|
14
8
|
* API class for interacting with the zkCloudWorker
|
15
9
|
* @property jwt The jwt token for authentication, get it at https://t.me/minanft_bot?start=auth
|
@@ -18,7 +12,7 @@ const { ZKCLOUDWORKER_AUTH, ZKCLOUDWORKER_API } = config_1.default;
|
|
18
12
|
* @property webhook The webhook for the serverless api to get the results
|
19
13
|
* @property localWorker The local worker for the serverless api to test the code locally
|
20
14
|
*/
|
21
|
-
class zkCloudWorkerClient {
|
15
|
+
export class zkCloudWorkerClient {
|
22
16
|
/**
|
23
17
|
* Constructor for the API class
|
24
18
|
* @param params the parameters for the API class
|
@@ -286,7 +280,7 @@ class zkCloudWorkerClient {
|
|
286
280
|
printedLogs.push(log);
|
287
281
|
if (printLogs) {
|
288
282
|
// replace all occurrences of "error" with red color
|
289
|
-
const text = log.replace(/error/gi, (matched) =>
|
283
|
+
const text = log.replace(/error/gi, (matched) => chalk.red(matched));
|
290
284
|
console.log(text);
|
291
285
|
}
|
292
286
|
}
|
@@ -314,7 +308,7 @@ class zkCloudWorkerClient {
|
|
314
308
|
result: undefined,
|
315
309
|
};
|
316
310
|
}
|
317
|
-
await
|
311
|
+
await sleep(errorDelay * errors);
|
318
312
|
}
|
319
313
|
else {
|
320
314
|
if (this.isError(result.data) && isAllLogsFetched)
|
@@ -337,7 +331,7 @@ class zkCloudWorkerClient {
|
|
337
331
|
result: result.data,
|
338
332
|
};
|
339
333
|
}
|
340
|
-
await
|
334
|
+
await sleep(interval);
|
341
335
|
}
|
342
336
|
attempts++;
|
343
337
|
}
|
@@ -362,7 +356,7 @@ class zkCloudWorkerClient {
|
|
362
356
|
throw new Error("localWorker is undefined");
|
363
357
|
switch (command) {
|
364
358
|
case "recursiveProof": {
|
365
|
-
const jobId = await
|
359
|
+
const jobId = await LocalCloud.run({
|
366
360
|
command: "recursiveProof",
|
367
361
|
data,
|
368
362
|
chain: this.chain,
|
@@ -374,7 +368,7 @@ class zkCloudWorkerClient {
|
|
374
368
|
};
|
375
369
|
}
|
376
370
|
case "execute": {
|
377
|
-
const jobId = await
|
371
|
+
const jobId = await LocalCloud.run({
|
378
372
|
command: "execute",
|
379
373
|
data,
|
380
374
|
chain: this.chain,
|
@@ -383,7 +377,7 @@ class zkCloudWorkerClient {
|
|
383
377
|
if (data.mode === "sync")
|
384
378
|
return {
|
385
379
|
success: true,
|
386
|
-
data:
|
380
|
+
data: LocalStorage.jobEvents[jobId].result,
|
387
381
|
};
|
388
382
|
else
|
389
383
|
return {
|
@@ -392,7 +386,7 @@ class zkCloudWorkerClient {
|
|
392
386
|
};
|
393
387
|
}
|
394
388
|
case "jobResult": {
|
395
|
-
const job =
|
389
|
+
const job = LocalStorage.jobs[data.jobId];
|
396
390
|
if (job === undefined) {
|
397
391
|
return {
|
398
392
|
success: false,
|
@@ -409,7 +403,7 @@ class zkCloudWorkerClient {
|
|
409
403
|
case "sendTransactions": {
|
410
404
|
return {
|
411
405
|
success: true,
|
412
|
-
data: await
|
406
|
+
data: await LocalCloud.addTransactions(data.transactions),
|
413
407
|
};
|
414
408
|
}
|
415
409
|
case "deploy":
|
@@ -441,7 +435,7 @@ class zkCloudWorkerClient {
|
|
441
435
|
webhook: this.webhook, // TODO: implement webhook code on AWS
|
442
436
|
};
|
443
437
|
try {
|
444
|
-
const response = await
|
438
|
+
const response = await axios.post(this.endpoint, apiData);
|
445
439
|
return { success: true, data: response.data };
|
446
440
|
}
|
447
441
|
catch (error) {
|
@@ -463,4 +457,4 @@ class zkCloudWorkerClient {
|
|
463
457
|
return false;
|
464
458
|
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AO,EAAE,IAAI,CAAC,OAAO,EAAE,sCAAsC;aAC9D,CAAC;YAEF,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;gBAC1D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;YAChD,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,CAAC;gBACvD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;YAC1C,CAAC;QACH,CAAC;IACH,CAAC;IAED,8DAA8D;IACtD,OAAO,CAAC,IAAS;QACvB,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO,IAAI,CAAC;QAClC,IAAI,IAAI,EAAE,SAAS,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC9C,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;YACpE,OAAO,IAAI,CAAC;QACd,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC;QAChE,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export * from "./api/api.js";
|
2
|
+
//export * from "./encryption";
|
3
|
+
export * from "./utils/index.js";
|
4
|
+
export * from "./local/local.js";
|
5
|
+
export * from "./verification/index.js";
|
6
|
+
export * from "./token/index.js";
|
7
|
+
export * from "./transactions/index.js";
|
8
|
+
export * from "./storage/index.js";
|
9
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mina/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,+BAA+B;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { blockchain, TransactionMetadata, CloudTransaction, DeployerKeyPair, TaskData, JobData, JobEvent, Cloud, zkCloudWorker } from "../../cloud";
|
2
|
-
import { ApiCommand } from "../api/api";
|
1
|
+
import { blockchain, TransactionMetadata, CloudTransaction, DeployerKeyPair, TaskData, JobData, JobEvent, Cloud, zkCloudWorker } from "../../cloud/index.js";
|
2
|
+
import { ApiCommand } from "../api/api.js";
|
3
3
|
/**
|
4
4
|
* LocalCloud is a cloud that runs on the local machine for testing and development
|
5
5
|
* It uses LocalStorage to store jobs, tasks, transactions, and data
|
@@ -1,7 +1,4 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.LocalStorage = exports.LocalCloud = void 0;
|
4
|
-
const cloud_1 = require("../../cloud");
|
1
|
+
import { makeString, Cloud, } from "../../cloud/index.js";
|
5
2
|
/**
|
6
3
|
* LocalCloud is a cloud that runs on the local machine for testing and development
|
7
4
|
* It uses LocalStorage to store jobs, tasks, transactions, and data
|
@@ -9,7 +6,7 @@ const cloud_1 = require("../../cloud");
|
|
9
6
|
* It can be used to test the cloud functionality without deploying to the cloud
|
10
7
|
* @param localWorker the worker to execute the tasks
|
11
8
|
*/
|
12
|
-
class LocalCloud extends
|
9
|
+
export class LocalCloud extends Cloud {
|
13
10
|
/**
|
14
11
|
* Constructor for LocalCloud
|
15
12
|
* @param params the parameters to create the LocalCloud
|
@@ -145,7 +142,7 @@ class LocalCloud extends cloud_1.Cloud {
|
|
145
142
|
//const data =
|
146
143
|
// tx ?? JSON.stringify({ time: Date.now(), data: makeString(32) });
|
147
144
|
//return stringHash(data);
|
148
|
-
return Date.now() + "." +
|
145
|
+
return Date.now() + "." + makeString(32);
|
149
146
|
}
|
150
147
|
/**
|
151
148
|
* Send transactions to the local cloud
|
@@ -475,13 +472,12 @@ class LocalCloud extends cloud_1.Cloud {
|
|
475
472
|
throw new Error("forceWorkerRestart called in LocalCloud");
|
476
473
|
}
|
477
474
|
}
|
478
|
-
exports.LocalCloud = LocalCloud;
|
479
475
|
/**
|
480
476
|
* LocalStorage is a local storage for the local cloud.
|
481
477
|
* It stores jobs, tasks, transactions, and data.
|
482
478
|
* It can be used to test the cloud functionality without deploying to the cloud.
|
483
479
|
*/
|
484
|
-
class LocalStorage {
|
480
|
+
export class LocalStorage {
|
485
481
|
/**
|
486
482
|
* Saves the data.
|
487
483
|
* @param name The name to save the data under.
|
@@ -516,7 +512,6 @@ class LocalStorage {
|
|
516
512
|
*/
|
517
513
|
}
|
518
514
|
}
|
519
|
-
exports.LocalStorage = LocalStorage;
|
520
515
|
/** The jobs */
|
521
516
|
LocalStorage.jobs = {};
|
522
517
|
/** The job events */
|
@@ -529,3 +524,4 @@ LocalStorage.files = {};
|
|
529
524
|
LocalStorage.transactions = {};
|
530
525
|
/** The tasks */
|
531
526
|
LocalStorage.tasks = {};
|
527
|
+
//# sourceMappingURL=local.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../../../../src/mina/local/local.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAQV,KAAK,GAGN,MAAM,sBAAsB,CAAC;AAG9B;;;;;;GAMG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK;IAGnC;;;;;;;;OAQG;IACH,YAAY,MAMX;QACC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAE1D,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,IAA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AAQ,CAAC,IAAY;QAChC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG;YACX,IAAI,EAAE,YAAY,CAAC,IAAI;YACvB,IAAI,EAAE,YAAY,CAAC,IAAI;YACvB,YAAY,EAAE,YAAY,CAAC,YAAY;YACvC,KAAK,EAAE,YAAY,CAAC,KAAK;SAC1B,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,GAAG,QAAQ,CAAC;QACjC,sCAAsC;IACxC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAY;QAChC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACrE,MAAM,QAAQ,GAAG,IAAI,GAAG,QAAQ,CAAC;QACjC;;;;;;;UAOE;IACJ,CAAC;;AArDD,eAAe;AACR,iBAAI,GAA+B,EAAE,CAAC;AAE7C,qBAAqB;AACd,sBAAS,GAAgC,EAAE,CAAC;AAEnD,eAAe;AACR,iBAAI,GAA8B,EAAE,CAAC;AAE5C,gBAAgB;AACT,kBAAK,GAA8B,EAAE,CAAC;AAE7C,uBAAuB;AAChB,yBAAY,GAEf,EAAE,CAAC;AAEP,gBAAgB;AACT,kBAAK,GAAgC,EAAE,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mina/storage/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export function createIpfsURL(params) {
|
2
|
+
let { hash, gateway, apiToken } = params;
|
3
|
+
gateway ??=
|
4
|
+
process.env.PINATA_IPFS_GATEWAY ??
|
5
|
+
process.env.NEXT_PUBLIC_PINATA_IPFS_GATEWAY ??
|
6
|
+
process.env.REACT_APP_PINATA_IPFS_GATEWAY;
|
7
|
+
apiToken ??=
|
8
|
+
process.env.PINATA_GATEWAY_TOKEN ??
|
9
|
+
process.env.NEXT_PUBLIC_PINATA_GATEWAY_TOKEN ??
|
10
|
+
process.env.REACT_APP_PINATA_GATEWAY_TOKEN;
|
11
|
+
if (!gateway) {
|
12
|
+
gateway = "https://gateway.pinata.cloud/ipfs/";
|
13
|
+
}
|
14
|
+
return gateway + hash + (apiToken ? "?pinataGatewayToken=" + apiToken : "");
|
15
|
+
}
|
16
|
+
//# sourceMappingURL=ipfs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ipfs.js","sourceRoot":"","sources":["../../../../../src/mina/storage/ipfs.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,aAAa,CAAC,MAI7B;IACC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IACzC,OAAO;QACL,OAAO,CAAC,GAAG,CAAC,mBAAmB;YAC/B,OAAO,CAAC,GAAG,CAAC,+BAA+B;YAC3C,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC;IAC5C,QAAQ;QACN,OAAO,CAAC,GAAG,CAAC,oBAAoB;YAChC,OAAO,CAAC,GAAG,CAAC,gCAAgC;YAC5C,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;IAE7C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,GAAG,oCAAoC,CAAC;IACjD,CAAC;IACD,OAAO,OAAO,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,sBAAsB,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAC9E,CAAC"}
|
@@ -1,8 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
export async function pinJSON(params) {
|
2
|
+
const { data, name = "data.json", keyvalues = [{ key: "library", value: "zkcloudworker" }], } = params;
|
3
|
+
const auth = params.auth ??
|
4
|
+
process.env.PINATA_JWT ??
|
5
|
+
process.env.NEXT_PUBLIC_PINATA_JWT ??
|
6
|
+
process.env.REACT_APP_PINATA_JWT;
|
6
7
|
try {
|
7
8
|
const pinataData = {
|
8
9
|
pinataOptions: {
|
@@ -34,3 +35,4 @@ async function pinJSON(params) {
|
|
34
35
|
return undefined;
|
35
36
|
}
|
36
37
|
}
|
38
|
+
//# sourceMappingURL=pinata.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pinata.js","sourceRoot":"","sources":["../../../../../src/mina/storage/pinata.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,MAK7B;IACC,MAAM,EACJ,IAAI,EACJ,IAAI,GAAG,WAAW,EAClB,SAAS,GAAG,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,GACzD,GAAG,MAAM,CAAC;IACX,MAAM,IAAI,GACR,MAAM,CAAC,IAAI;QACX,OAAO,CAAC,GAAG,CAAC,UAAU;QACtB,OAAO,CAAC,GAAG,CAAC,sBAAsB;QAClC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;IAEnC,IAAI,CAAC;QACH,MAAM,UAAU,GAAG;YACjB,aAAa,EAAE;gBACb,UAAU,EAAE,CAAC;aACd;YACD,cAAc,EAAE;gBACd,IAAI;gBACJ,SAAS;aACV;YACD,aAAa,EAAE,IAAI;SACpB,CAAC;QAEF,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,gDAAgD,EAAE;YACxE,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,SAAS,GAAG,IAAI;aAChC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;SACjC,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;QAC3E,CAAC;QAED,MAAM,YAAY,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;QAChD,OACE,YACD,EAAE,QAAQ,CAAC;IACd,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QACnD,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
@@ -1,42 +1,42 @@
|
|
1
1
|
import { Field, Bool } from "o1js";
|
2
2
|
declare const Storage_base: (new (value: {
|
3
|
-
url: import("o1js/dist/node/lib/provable/field").Field[];
|
3
|
+
url: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[];
|
4
4
|
}) => {
|
5
|
-
url: import("o1js/dist/node/lib/provable/field").Field[];
|
5
|
+
url: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[];
|
6
6
|
}) & {
|
7
7
|
_isStruct: true;
|
8
|
-
} & Omit<import("o1js/dist/node/lib/provable/types/provable-intf").Provable<{
|
9
|
-
url: import("o1js/dist/node/lib/provable/field").Field[];
|
8
|
+
} & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
9
|
+
url: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[];
|
10
10
|
}, {
|
11
11
|
url: bigint[];
|
12
12
|
}>, "fromFields"> & {
|
13
|
-
fromFields: (fields: import("o1js/dist/node/lib/provable/field").Field[]) => {
|
14
|
-
url: import("o1js/dist/node/lib/provable/field").Field[];
|
13
|
+
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
|
14
|
+
url: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[];
|
15
15
|
};
|
16
16
|
} & {
|
17
17
|
fromValue: (value: {
|
18
|
-
url: import("o1js/dist/node/lib/provable/field").Field[] | bigint[];
|
18
|
+
url: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[] | bigint[];
|
19
19
|
}) => {
|
20
|
-
url: import("o1js/dist/node/lib/provable/field").Field[];
|
20
|
+
url: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[];
|
21
21
|
};
|
22
22
|
toInput: (x: {
|
23
|
-
url: import("o1js/dist/node/lib/provable/field").Field[];
|
23
|
+
url: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[];
|
24
24
|
}) => {
|
25
25
|
fields?: Field[] | undefined;
|
26
26
|
packed?: [Field, number][] | undefined;
|
27
27
|
};
|
28
28
|
toJSON: (x: {
|
29
|
-
url: import("o1js/dist/node/lib/provable/field").Field[];
|
29
|
+
url: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[];
|
30
30
|
}) => {
|
31
31
|
url: string[];
|
32
32
|
};
|
33
33
|
fromJSON: (x: {
|
34
34
|
url: string[];
|
35
35
|
}) => {
|
36
|
-
url: import("o1js/dist/node/lib/provable/field").Field[];
|
36
|
+
url: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[];
|
37
37
|
};
|
38
38
|
empty: () => {
|
39
|
-
url: import("o1js/dist/node/lib/provable/field").Field[];
|
39
|
+
url: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[];
|
40
40
|
};
|
41
41
|
};
|
42
42
|
/**
|
@@ -1,13 +1,10 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Storage = void 0;
|
4
|
-
const o1js_1 = require("o1js");
|
1
|
+
import { Field, Struct, Encoding, Provable } from "o1js";
|
5
2
|
/**
|
6
3
|
* Represents the off-chain storage information,
|
7
4
|
* such as an IPFS hash.
|
8
5
|
*/
|
9
|
-
class Storage extends
|
10
|
-
url:
|
6
|
+
export class Storage extends Struct({
|
7
|
+
url: Provable.Array(Field, 2),
|
11
8
|
}) {
|
12
9
|
constructor(value) {
|
13
10
|
super(value);
|
@@ -36,7 +33,7 @@ class Storage extends (0, o1js_1.Struct)({
|
|
36
33
|
* @returns A new Storage instance.
|
37
34
|
*/
|
38
35
|
static fromString(url) {
|
39
|
-
const fields =
|
36
|
+
const fields = Encoding.stringToFields(url);
|
40
37
|
if (fields.length !== 2)
|
41
38
|
throw new Error("Invalid string length");
|
42
39
|
return new Storage({ url: [fields[0], fields[1]] });
|
@@ -49,7 +46,7 @@ class Storage extends (0, o1js_1.Struct)({
|
|
49
46
|
if (this.url[0].toBigInt() === 0n && this.url[1].toBigInt() === 0n) {
|
50
47
|
throw new Error("Invalid string");
|
51
48
|
}
|
52
|
-
return
|
49
|
+
return Encoding.stringFromFields([this.url[0], this.url[1]]);
|
53
50
|
}
|
54
51
|
}
|
55
|
-
|
52
|
+
//# sourceMappingURL=storage.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../../../src/mina/storage/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAQ,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAE/D;;;GAGG;AACH,MAAM,OAAO,OAAQ,SAAQ,MAAM,CAAC;IAClC,GAAG,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;CAC9B,CAAC;IACA,YAAY,KAA8B;QACxC,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,CAAU,EAAE,CAAU;QACxC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAChC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,CAAU,EAAE,CAAU;QAClC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,GAAW;QAC3B,MAAM,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;QAC5C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAClE,OAAO,IAAI,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC;IAED;;;OAGG;IACH,QAAQ;QACN,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC;YACnE,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;QACpC,CAAC;QACD,OAAO,QAAQ,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/D,CAAC;CACF"}
|
@@ -22,7 +22,7 @@ export declare const FungibleTokenErrors: {
|
|
22
22
|
export declare class FungibleToken extends TokenContract {
|
23
23
|
decimals: State<UInt8>;
|
24
24
|
admin: State<PublicKey>;
|
25
|
-
paused: State<import("o1js/dist/node/lib/provable/bool.js").Bool>;
|
25
|
+
paused: State<import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool>;
|
26
26
|
static AdminContract: new (...args: any) => FungibleTokenAdminBase;
|
27
27
|
readonly events: {
|
28
28
|
SetAdmin: typeof SetAdminEvent;
|
@@ -68,7 +68,7 @@ declare const SetAdminEvent_base: (new (value: {
|
|
68
68
|
adminKey: PublicKey;
|
69
69
|
}) & {
|
70
70
|
_isStruct: true;
|
71
|
-
} & Omit<import("o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
71
|
+
} & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
72
72
|
adminKey: PublicKey;
|
73
73
|
}, {
|
74
74
|
adminKey: {
|
@@ -76,7 +76,7 @@ declare const SetAdminEvent_base: (new (value: {
|
|
76
76
|
isOdd: boolean;
|
77
77
|
};
|
78
78
|
}>, "fromFields"> & {
|
79
|
-
fromFields: (fields: import("o1js/dist/node/lib/provable/field.js").Field[]) => {
|
79
|
+
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
|
80
80
|
adminKey: PublicKey;
|
81
81
|
};
|
82
82
|
} & {
|
@@ -111,43 +111,43 @@ declare const SetAdminEvent_base: (new (value: {
|
|
111
111
|
export declare class SetAdminEvent extends SetAdminEvent_base {
|
112
112
|
}
|
113
113
|
declare const PauseEvent_base: (new (value: {
|
114
|
-
isPaused: import("o1js/dist/node/lib/provable/bool.js").Bool;
|
114
|
+
isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
115
115
|
}) => {
|
116
|
-
isPaused: import("o1js/dist/node/lib/provable/bool.js").Bool;
|
116
|
+
isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
117
117
|
}) & {
|
118
118
|
_isStruct: true;
|
119
|
-
} & Omit<import("o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
120
|
-
isPaused: import("o1js/dist/node/lib/provable/bool.js").Bool;
|
119
|
+
} & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
120
|
+
isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
121
121
|
}, {
|
122
122
|
isPaused: boolean;
|
123
123
|
}>, "fromFields"> & {
|
124
|
-
fromFields: (fields: import("o1js/dist/node/lib/provable/field.js").Field[]) => {
|
125
|
-
isPaused: import("o1js/dist/node/lib/provable/bool.js").Bool;
|
124
|
+
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
|
125
|
+
isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
126
126
|
};
|
127
127
|
} & {
|
128
128
|
fromValue: (value: {
|
129
|
-
isPaused: boolean | import("o1js/dist/node/lib/provable/bool.js").Bool;
|
129
|
+
isPaused: boolean | import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
130
130
|
}) => {
|
131
|
-
isPaused: import("o1js/dist/node/lib/provable/bool.js").Bool;
|
131
|
+
isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
132
132
|
};
|
133
133
|
toInput: (x: {
|
134
|
-
isPaused: import("o1js/dist/node/lib/provable/bool.js").Bool;
|
134
|
+
isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
135
135
|
}) => {
|
136
136
|
fields?: Field[] | undefined;
|
137
137
|
packed?: [Field, number][] | undefined;
|
138
138
|
};
|
139
139
|
toJSON: (x: {
|
140
|
-
isPaused: import("o1js/dist/node/lib/provable/bool.js").Bool;
|
140
|
+
isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
141
141
|
}) => {
|
142
142
|
isPaused: boolean;
|
143
143
|
};
|
144
144
|
fromJSON: (x: {
|
145
145
|
isPaused: boolean;
|
146
146
|
}) => {
|
147
|
-
isPaused: import("o1js/dist/node/lib/provable/bool.js").Bool;
|
147
|
+
isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
148
148
|
};
|
149
149
|
empty: () => {
|
150
|
-
isPaused: import("o1js/dist/node/lib/provable/bool.js").Bool;
|
150
|
+
isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
151
151
|
};
|
152
152
|
};
|
153
153
|
export declare class PauseEvent extends PauseEvent_base {
|
@@ -160,7 +160,7 @@ declare const MintEvent_base: (new (value: {
|
|
160
160
|
amount: Types.UInt64;
|
161
161
|
}) & {
|
162
162
|
_isStruct: true;
|
163
|
-
} & Omit<import("o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
163
|
+
} & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
164
164
|
recipient: PublicKey;
|
165
165
|
amount: Types.UInt64;
|
166
166
|
}, {
|
@@ -170,7 +170,7 @@ declare const MintEvent_base: (new (value: {
|
|
170
170
|
};
|
171
171
|
amount: bigint;
|
172
172
|
}>, "fromFields"> & {
|
173
|
-
fromFields: (fields: import("o1js/dist/node/lib/provable/field.js").Field[]) => {
|
173
|
+
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
|
174
174
|
recipient: PublicKey;
|
175
175
|
amount: Types.UInt64;
|
176
176
|
};
|
@@ -221,7 +221,7 @@ declare const BurnEvent_base: (new (value: {
|
|
221
221
|
amount: Types.UInt64;
|
222
222
|
}) & {
|
223
223
|
_isStruct: true;
|
224
|
-
} & Omit<import("o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
224
|
+
} & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
225
225
|
from: PublicKey;
|
226
226
|
amount: Types.UInt64;
|
227
227
|
}, {
|
@@ -231,7 +231,7 @@ declare const BurnEvent_base: (new (value: {
|
|
231
231
|
};
|
232
232
|
amount: bigint;
|
233
233
|
}>, "fromFields"> & {
|
234
|
-
fromFields: (fields: import("o1js/dist/node/lib/provable/field.js").Field[]) => {
|
234
|
+
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
|
235
235
|
from: PublicKey;
|
236
236
|
amount: Types.UInt64;
|
237
237
|
};
|
@@ -282,7 +282,7 @@ declare const BalanceChangeEvent_base: (new (value: {
|
|
282
282
|
amount: Int64;
|
283
283
|
}) & {
|
284
284
|
_isStruct: true;
|
285
|
-
} & Omit<import("o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
285
|
+
} & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
286
286
|
address: PublicKey;
|
287
287
|
amount: Int64;
|
288
288
|
}, {
|
@@ -292,7 +292,7 @@ declare const BalanceChangeEvent_base: (new (value: {
|
|
292
292
|
};
|
293
293
|
amount: any;
|
294
294
|
}>, "fromFields"> & {
|
295
|
-
fromFields: (fields: import("o1js/dist/node/lib/provable/field.js").Field[]) => {
|
295
|
+
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
|
296
296
|
address: PublicKey;
|
297
297
|
amount: Int64;
|
298
298
|
};
|