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,21 +1,24 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
import { Experimental, Field } from "o1js";
|
2
|
+
import { bigintToBase64, bigintFromBase64, sleep } from "../../cloud/index.js";
|
3
|
+
import { pinJSON } from "../storage/pinata.js";
|
4
|
+
const { IndexedMerkleMap } = Experimental;
|
5
|
+
export async function loadIndexedMerkleMap(params) {
|
6
|
+
const { url, type, timeout = 60000, attempts = 5 } = params;
|
7
|
+
let attempt = 0;
|
8
|
+
const start = Date.now();
|
9
|
+
let response = await fetch(url);
|
10
|
+
while (!response.ok && attempt < attempts && Date.now() - start < timeout) {
|
11
|
+
attempt++;
|
12
|
+
await sleep(5000 * attempt); // handle rate limiting
|
13
|
+
response = await fetch(url);
|
14
|
+
}
|
15
15
|
if (!response.ok) {
|
16
16
|
throw new Error("Failed to fetch IndexedMerkleMap");
|
17
17
|
}
|
18
|
-
const
|
18
|
+
const json = await response.json();
|
19
|
+
const serializedIndexedMap = json.map;
|
20
|
+
if (!serializedIndexedMap)
|
21
|
+
throw new Error("wrong IndexedMerkleMap json format");
|
19
22
|
const map = deserializeIndexedMerkleMapInternal({
|
20
23
|
serializedIndexedMap,
|
21
24
|
type,
|
@@ -25,34 +28,34 @@ async function loadIndexedMerkleMap(params) {
|
|
25
28
|
}
|
26
29
|
return map;
|
27
30
|
}
|
28
|
-
async function saveIndexedMerkleMap(params) {
|
31
|
+
export async function saveIndexedMerkleMap(params) {
|
29
32
|
const { map, name = "indexed-map", keyvalues, auth } = params;
|
30
33
|
const serialized = serializeIndexedMap(map);
|
31
|
-
const ipfsHash = await
|
32
|
-
data: serialized,
|
34
|
+
const ipfsHash = await pinJSON({
|
35
|
+
data: { map: serialized },
|
33
36
|
name,
|
34
37
|
keyvalues,
|
35
38
|
auth,
|
36
39
|
});
|
37
40
|
return ipfsHash;
|
38
41
|
}
|
39
|
-
function serializeIndexedMap(map) {
|
42
|
+
export function serializeIndexedMap(map) {
|
40
43
|
return {
|
41
44
|
height: map.height,
|
42
45
|
root: map.root.toJSON(),
|
43
46
|
length: map.length.toJSON(),
|
44
|
-
nodes: JSON.stringify(map.data.get().nodes, (_, v) => typeof v === "bigint" ? "n" +
|
47
|
+
nodes: JSON.stringify(map.data.get().nodes, (_, v) => typeof v === "bigint" ? "n" + bigintToBase64(v) : v),
|
45
48
|
sortedLeaves: JSON.stringify(map.data
|
46
49
|
.get()
|
47
50
|
.sortedLeaves.map((v) => [
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
51
|
+
bigintToBase64(v.key),
|
52
|
+
bigintToBase64(v.nextKey),
|
53
|
+
bigintToBase64(v.value),
|
54
|
+
bigintToBase64(BigInt(v.index)),
|
52
55
|
])),
|
53
56
|
};
|
54
57
|
}
|
55
|
-
function deserializeIndexedMerkleMap(params) {
|
58
|
+
export function deserializeIndexedMerkleMap(params) {
|
56
59
|
try {
|
57
60
|
const { serializedIndexedMap, type } = params;
|
58
61
|
return deserializeIndexedMerkleMapInternal({
|
@@ -65,7 +68,7 @@ function deserializeIndexedMerkleMap(params) {
|
|
65
68
|
return undefined;
|
66
69
|
}
|
67
70
|
}
|
68
|
-
function parseIndexedMapSerialized(serializedMap) {
|
71
|
+
export function parseIndexedMapSerialized(serializedMap) {
|
69
72
|
const json = JSON.parse(serializedMap);
|
70
73
|
if (json.height === undefined ||
|
71
74
|
json.root === undefined ||
|
@@ -95,20 +98,20 @@ function deserializeIndexedMerkleMapInternal(params) {
|
|
95
98
|
// Check if the value is a string that represents a BigInt
|
96
99
|
if (typeof v === "string" && v[0] === "n") {
|
97
100
|
// Remove the first 'n' and convert the string to a BigInt
|
98
|
-
return
|
101
|
+
return bigintFromBase64(v.slice(1));
|
99
102
|
}
|
100
103
|
return v;
|
101
104
|
});
|
102
105
|
const sortedLeaves = JSON.parse(serializedIndexedMap.sortedLeaves).map((row) => {
|
103
106
|
return {
|
104
|
-
key:
|
105
|
-
nextKey:
|
106
|
-
value:
|
107
|
-
index: Number(
|
107
|
+
key: bigintFromBase64(row[0]),
|
108
|
+
nextKey: bigintFromBase64(row[1]),
|
109
|
+
value: bigintFromBase64(row[2]),
|
110
|
+
index: Number(bigintFromBase64(row[3])),
|
108
111
|
};
|
109
112
|
});
|
110
|
-
map.root =
|
111
|
-
map.length =
|
113
|
+
map.root = Field.fromJSON(serializedIndexedMap.root);
|
114
|
+
map.length = Field.fromJSON(serializedIndexedMap.length);
|
112
115
|
map.data.updateAsProver(() => {
|
113
116
|
return {
|
114
117
|
nodes: nodes.map((row) => [...row]),
|
@@ -117,3 +120,4 @@ function deserializeIndexedMerkleMapInternal(params) {
|
|
117
120
|
});
|
118
121
|
return map;
|
119
122
|
}
|
123
|
+
//# sourceMappingURL=indexed-map.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"indexed-map.js","sourceRoot":"","sources":["../../../../../src/mina/utils/indexed-map.ts"],"names":[],"mappings":"AAAA,OA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AAC,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACrD,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACzD,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE;QAC3B,OAAO;YACL,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;YACxC,YAAY,EAAE,CAAC,GAAG,YAAY,CAAC;SAChC,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export { initBlockchain, accountBalance, accountBalanceMina, MinaNetworkInstance, currentNetwork, getNetworkIdHash, getCurrentNetwork, getDeployer, };
|
2
2
|
import { Mina, PublicKey, UInt64, Field } from "o1js";
|
3
|
-
import { blockchain, MinaNetwork } from "../../cloud";
|
3
|
+
import { blockchain, MinaNetwork } from "../../cloud/networks.js";
|
4
4
|
/**
|
5
5
|
* MinaNetworkInstance is the data structure for a Mina network instance, keeping track of the keys, network, and network ID hash.
|
6
6
|
*/
|
@@ -1,16 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
exports.initBlockchain = initBlockchain;
|
5
|
-
exports.accountBalance = accountBalance;
|
6
|
-
exports.accountBalanceMina = accountBalanceMina;
|
7
|
-
exports.getNetworkIdHash = getNetworkIdHash;
|
8
|
-
exports.getCurrentNetwork = getCurrentNetwork;
|
9
|
-
exports.getDeployer = getDeployer;
|
10
|
-
const o1js_1 = require("o1js");
|
11
|
-
const cloud_1 = require("../../cloud");
|
1
|
+
export { initBlockchain, accountBalance, accountBalanceMina, currentNetwork, getNetworkIdHash, getCurrentNetwork, getDeployer, };
|
2
|
+
import { Mina, PrivateKey, UInt64, fetchAccount, Lightnet, CircuitString, } from "o1js";
|
3
|
+
import { networks, Local, } from "../../cloud/networks.js";
|
12
4
|
let currentNetwork = undefined;
|
13
|
-
exports.currentNetwork = currentNetwork;
|
14
5
|
function getNetworkIdHash() {
|
15
6
|
if (currentNetwork === undefined) {
|
16
7
|
throw new Error("Network is not initialized");
|
@@ -53,39 +44,39 @@ async function initBlockchain(instance, deployersNumber = 0) {
|
|
53
44
|
throw new Error(`Network is already initialized to different chain ${currentNetwork.network.chainId}, cannot initialize to ${instance}`);
|
54
45
|
}
|
55
46
|
}
|
56
|
-
const networkIdHash =
|
47
|
+
const networkIdHash = CircuitString.fromString(instance).hash();
|
57
48
|
// await used for compatibility with future versions of o1js
|
58
49
|
if (instance === "local") {
|
59
|
-
const local = await
|
50
|
+
const local = await Mina.LocalBlockchain({
|
60
51
|
proofsEnabled: true,
|
61
52
|
});
|
62
|
-
|
53
|
+
Mina.setActiveInstance(local);
|
63
54
|
if (deployersNumber > local.testAccounts.length)
|
64
55
|
throw new Error("Not enough test accounts");
|
65
|
-
|
56
|
+
currentNetwork = {
|
66
57
|
keys: local.testAccounts,
|
67
|
-
network:
|
58
|
+
network: Local,
|
68
59
|
networkIdHash,
|
69
60
|
};
|
70
61
|
return currentNetwork;
|
71
62
|
}
|
72
|
-
const network =
|
63
|
+
const network = networks.find((n) => n.chainId === instance);
|
73
64
|
if (network === undefined) {
|
74
65
|
throw new Error("Unknown network");
|
75
66
|
}
|
76
|
-
const networkInstance =
|
67
|
+
const networkInstance = Mina.Network({
|
77
68
|
mina: network.mina,
|
78
69
|
archive: network.archive,
|
79
70
|
lightnetAccountManager: network.accountManager,
|
80
71
|
networkId: instance === "mainnet" ? "mainnet" : "testnet",
|
81
72
|
});
|
82
|
-
|
73
|
+
Mina.setActiveInstance(networkInstance);
|
83
74
|
const keys = [];
|
84
75
|
if (deployersNumber > 0) {
|
85
76
|
if (instance === "lightnet") {
|
86
77
|
for (let i = 0; i < deployersNumber; i++) {
|
87
|
-
const keyPair = await
|
88
|
-
const key =
|
78
|
+
const keyPair = await Lightnet.acquireKeyPair();
|
79
|
+
const key = Mina.TestPublicKey(keyPair.privateKey);
|
89
80
|
keys.push(key);
|
90
81
|
}
|
91
82
|
}
|
@@ -96,13 +87,13 @@ async function initBlockchain(instance, deployersNumber = 0) {
|
|
96
87
|
deployers.length < deployersNumber)
|
97
88
|
throw new Error("Deployers are not set");
|
98
89
|
for (let i = 0; i < deployersNumber; i++) {
|
99
|
-
const privateKey =
|
100
|
-
const key =
|
90
|
+
const privateKey = PrivateKey.fromBase58(deployers[i]);
|
91
|
+
const key = Mina.TestPublicKey(privateKey);
|
101
92
|
keys.push(key);
|
102
93
|
}
|
103
94
|
}
|
104
95
|
}
|
105
|
-
|
96
|
+
currentNetwork = {
|
106
97
|
keys,
|
107
98
|
network,
|
108
99
|
networkIdHash,
|
@@ -115,11 +106,11 @@ async function initBlockchain(instance, deployersNumber = 0) {
|
|
115
106
|
* @returns the account balance
|
116
107
|
*/
|
117
108
|
async function accountBalance(address) {
|
118
|
-
await
|
119
|
-
if (
|
120
|
-
return
|
109
|
+
await fetchAccount({ publicKey: address });
|
110
|
+
if (Mina.hasAccount(address))
|
111
|
+
return Mina.getBalance(address);
|
121
112
|
else
|
122
|
-
return
|
113
|
+
return UInt64.from(0);
|
123
114
|
}
|
124
115
|
/**
|
125
116
|
* Fetches the account balance for a given public key and returns it in Mina
|
@@ -129,3 +120,4 @@ async function accountBalance(address) {
|
|
129
120
|
async function accountBalanceMina(address) {
|
130
121
|
return Number((await accountBalance(address)).toBigInt()) / 1e9;
|
131
122
|
}
|
123
|
+
//# sourceMappingURL=mina.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mina.js","sourceRoot":"","sources":["../../../../../src/mina/utils/mina.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACd,kBAAkB,EAElB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,GACZ,CAAC;AAEF,OAAO,EACL,IAAI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,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,GAAG,CAAC;AAClE,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./verification.js";
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mina/verification/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { blockchain } from "../../cloud/networks";
|
1
|
+
import { blockchain } from "../../cloud/networks.js";
|
2
2
|
import { SmartContract } from "o1js";
|
3
3
|
/**
|
4
4
|
* VerificationData is a data structure that contains all the information needed to verify a smart contract on a blockchain.
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"verification.js","sourceRoot":"","sources":["../../../../../src/mina/verification/verification.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
@@ -1,20 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./utils"), exports);
|
18
|
-
__exportStar(require("./worker"), exports);
|
19
|
-
__exportStar(require("./config"), exports);
|
20
|
-
__exportStar(require("./networks"), exports);
|
@@ -1,19 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./graphql"), exports);
|
18
|
-
__exportStar(require("./utils"), exports);
|
19
|
-
__exportStar(require("./base64"), exports);
|
@@ -1,21 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./cloud"), exports);
|
18
|
-
__exportStar(require("./job"), exports);
|
19
|
-
__exportStar(require("./task"), exports);
|
20
|
-
__exportStar(require("./transaction"), exports);
|
21
|
-
__exportStar(require("./worker"), exports);
|
package/lib/ts/src/index.d.ts
DELETED
package/lib/ts/src/index.js
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./cloud"), exports);
|
18
|
-
__exportStar(require("./mina"), exports);
|
package/lib/ts/src/mina/index.js
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./api/api"), exports);
|
18
|
-
//export * from "./encryption";
|
19
|
-
__exportStar(require("./utils"), exports);
|
20
|
-
__exportStar(require("./local/local"), exports);
|
21
|
-
__exportStar(require("./verification"), exports);
|
22
|
-
__exportStar(require("./token"), exports);
|
23
|
-
__exportStar(require("./transactions"), exports);
|
24
|
-
__exportStar(require("./storage"), exports);
|
@@ -1,19 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./ipfs"), exports);
|
18
|
-
__exportStar(require("./pinata"), exports);
|
19
|
-
__exportStar(require("./storage"), exports);
|
@@ -1,10 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.createIpfsURL = createIpfsURL;
|
4
|
-
function createIpfsURL(params) {
|
5
|
-
let { hash, gateway, apiToken } = params;
|
6
|
-
if (!gateway) {
|
7
|
-
gateway = "https://gateway.pinata.cloud/ipfs/";
|
8
|
-
}
|
9
|
-
return gateway + hash + (apiToken ? "?pinataGatewayToken=" + apiToken : "");
|
10
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./FungibleToken"), exports);
|
18
|
-
__exportStar(require("./FungibleTokenAdmin"), exports);
|
19
|
-
__exportStar(require("./api"), exports);
|
20
|
-
__exportStar(require("./vk"), exports);
|
@@ -1,48 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.accountExists = accountExists;
|
4
|
-
exports.tokenBalance = tokenBalance;
|
5
|
-
exports.checkAddress = checkAddress;
|
6
|
-
const __1 = require("..");
|
7
|
-
const o1js_1 = require("o1js");
|
8
|
-
async function accountExists(address, tokenId) {
|
9
|
-
try {
|
10
|
-
const publicKey = typeof address === "string" ? o1js_1.PublicKey.fromBase58(address) : address;
|
11
|
-
await (0, __1.fetchMinaAccount)({ publicKey, tokenId, force: false });
|
12
|
-
return o1js_1.Mina.hasAccount(publicKey, tokenId);
|
13
|
-
}
|
14
|
-
catch (error) {
|
15
|
-
return false;
|
16
|
-
}
|
17
|
-
}
|
18
|
-
async function tokenBalance(address, tokenId) {
|
19
|
-
try {
|
20
|
-
const publicKey = typeof address === "string" ? o1js_1.PublicKey.fromBase58(address) : address;
|
21
|
-
await (0, __1.fetchMinaAccount)({ publicKey, tokenId, force: false });
|
22
|
-
return o1js_1.Mina.hasAccount(publicKey, tokenId)
|
23
|
-
? Number(o1js_1.Mina.getAccount(publicKey, tokenId).balance.toBigInt())
|
24
|
-
: undefined;
|
25
|
-
}
|
26
|
-
catch (error) {
|
27
|
-
console.error("Cannot fetch account balance", error);
|
28
|
-
return undefined;
|
29
|
-
}
|
30
|
-
}
|
31
|
-
async function checkAddress(address) {
|
32
|
-
if (!address || typeof address !== "string") {
|
33
|
-
console.error("checkAddress params are invalid:", address);
|
34
|
-
return false;
|
35
|
-
}
|
36
|
-
try {
|
37
|
-
const publicKey = o1js_1.PublicKey.fromBase58(address);
|
38
|
-
if (address !== publicKey.toBase58()) {
|
39
|
-
console.log("checkAddress: address is not valid", address, publicKey.toBase58());
|
40
|
-
return false;
|
41
|
-
}
|
42
|
-
return true;
|
43
|
-
}
|
44
|
-
catch (error) {
|
45
|
-
console.error("checkAddress catch", { address, error });
|
46
|
-
return false;
|
47
|
-
}
|
48
|
-
}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./nonce"), exports);
|
18
|
-
__exportStar(require("./transaction"), exports);
|
19
|
-
__exportStar(require("./txstatus"), exports);
|
20
|
-
__exportStar(require("./chain"), exports);
|
21
|
-
__exportStar(require("./blockberry"), exports);
|
22
|
-
__exportStar(require("./tiny-contract"), exports);
|
23
|
-
__exportStar(require("./send"), exports);
|
24
|
-
__exportStar(require("./account"), exports);
|
@@ -1,33 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.TinyContract = void 0;
|
13
|
-
const o1js_1 = require("o1js");
|
14
|
-
class TinyContract extends o1js_1.SmartContract {
|
15
|
-
constructor() {
|
16
|
-
super(...arguments);
|
17
|
-
this.value = (0, o1js_1.State)();
|
18
|
-
}
|
19
|
-
async setValue(value) {
|
20
|
-
this.value.set(value);
|
21
|
-
}
|
22
|
-
}
|
23
|
-
exports.TinyContract = TinyContract;
|
24
|
-
__decorate([
|
25
|
-
(0, o1js_1.state)(o1js_1.Field),
|
26
|
-
__metadata("design:type", Object)
|
27
|
-
], TinyContract.prototype, "value", void 0);
|
28
|
-
__decorate([
|
29
|
-
o1js_1.method,
|
30
|
-
__metadata("design:type", Function),
|
31
|
-
__metadata("design:paramtypes", [o1js_1.Field]),
|
32
|
-
__metadata("design:returntype", Promise)
|
33
|
-
], TinyContract.prototype, "setValue", null);
|