zkcloudworker 0.17.2 → 0.17.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/lib/ts/src/mina/storage/index.d.ts +3 -0
  2. package/lib/ts/src/mina/storage/index.js +19 -0
  3. package/lib/ts/src/mina/storage/pinata.d.ts +6 -0
  4. package/lib/ts/src/mina/storage/pinata.js +36 -0
  5. package/lib/ts/src/mina/storage/storage.d.ts +75 -0
  6. package/lib/ts/src/mina/storage/storage.js +55 -0
  7. package/lib/ts/src/mina/transactions/accont.d.ts +4 -0
  8. package/lib/ts/src/mina/transactions/accont.js +48 -0
  9. package/lib/ts/src/mina/transactions/index.d.ts +1 -0
  10. package/lib/ts/src/mina/transactions/index.js +1 -0
  11. package/lib/ts/src/mina/transactions/nonce.d.ts +7 -0
  12. package/lib/ts/src/mina/transactions/nonce.js +33 -0
  13. package/lib/ts/src/mina/transactions/send.d.ts +17 -0
  14. package/lib/ts/src/mina/transactions/send.js +119 -0
  15. package/lib/ts/src/mina/transactions/transaction.js +4 -3
  16. package/lib/ts/src/mina/transactions/txstatus.d.ts +1 -1
  17. package/lib/ts/src/mina/transactions/txstatus.js +2 -2
  18. package/lib/ts/src/mina/utils/index.d.ts +0 -1
  19. package/lib/ts/src/mina/utils/index.js +0 -1
  20. package/lib/ts/src/mina/utils/indexed-map.d.ts +9 -0
  21. package/lib/ts/src/mina/utils/indexed-map.js +13 -0
  22. package/lib/ts/tsconfig.tsbuildinfo +1 -1
  23. package/lib/web/src/mina/storage/index.d.ts +3 -0
  24. package/lib/web/src/mina/storage/index.js +4 -0
  25. package/lib/web/src/mina/storage/index.js.map +1 -0
  26. package/lib/web/src/mina/storage/ipfs.js.map +1 -0
  27. package/lib/web/src/mina/storage/pinata.d.ts +6 -0
  28. package/lib/web/src/mina/storage/pinata.js +34 -0
  29. package/lib/web/src/mina/storage/pinata.js.map +1 -0
  30. package/lib/web/src/mina/storage/storage.d.ts +75 -0
  31. package/lib/web/src/mina/storage/storage.js +52 -0
  32. package/lib/web/src/mina/storage/storage.js.map +1 -0
  33. package/lib/web/src/mina/transactions/accont.d.ts +4 -0
  34. package/lib/web/src/mina/transactions/accont.js +44 -0
  35. package/lib/web/src/mina/transactions/accont.js.map +1 -0
  36. package/lib/web/src/mina/transactions/index.d.ts +1 -0
  37. package/lib/web/src/mina/transactions/index.js +1 -0
  38. package/lib/web/src/mina/transactions/index.js.map +1 -1
  39. package/lib/web/src/mina/transactions/nonce.d.ts +7 -0
  40. package/lib/web/src/mina/transactions/nonce.js +32 -0
  41. package/lib/web/src/mina/transactions/nonce.js.map +1 -1
  42. package/lib/web/src/mina/transactions/send.d.ts +17 -0
  43. package/lib/web/src/mina/transactions/send.js +116 -0
  44. package/lib/web/src/mina/transactions/send.js.map +1 -0
  45. package/lib/web/src/mina/transactions/transaction.js +4 -3
  46. package/lib/web/src/mina/transactions/transaction.js.map +1 -1
  47. package/lib/web/src/mina/transactions/txstatus.d.ts +1 -1
  48. package/lib/web/src/mina/transactions/txstatus.js +1 -1
  49. package/lib/web/src/mina/transactions/txstatus.js.map +1 -1
  50. package/lib/web/src/mina/utils/index.d.ts +0 -1
  51. package/lib/web/src/mina/utils/index.js +0 -1
  52. package/lib/web/src/mina/utils/index.js.map +1 -1
  53. package/lib/web/src/mina/utils/indexed-map.d.ts +9 -0
  54. package/lib/web/src/mina/utils/indexed-map.js +12 -0
  55. package/lib/web/src/mina/utils/indexed-map.js.map +1 -1
  56. package/lib/web/tsconfig.web.tsbuildinfo +1 -1
  57. package/package.json +1 -1
  58. package/lib/web/src/mina/utils/ipfs.js.map +0 -1
  59. /package/lib/ts/src/mina/{utils → storage}/ipfs.d.ts +0 -0
  60. /package/lib/ts/src/mina/{utils → storage}/ipfs.js +0 -0
  61. /package/lib/web/src/mina/{utils → storage}/ipfs.d.ts +0 -0
  62. /package/lib/web/src/mina/{utils → storage}/ipfs.js +0 -0
@@ -0,0 +1,44 @@
1
+ import { fetchMinaAccount } from "..";
2
+ import { Mina, PublicKey } from "o1js";
3
+ export async function accountExists(address, tokenId) {
4
+ try {
5
+ const publicKey = typeof address === "string" ? PublicKey.fromBase58(address) : address;
6
+ await fetchMinaAccount({ publicKey, tokenId, force: false });
7
+ return Mina.hasAccount(publicKey, tokenId);
8
+ }
9
+ catch (error) {
10
+ return false;
11
+ }
12
+ }
13
+ export async function accountBalance(address, tokenId) {
14
+ try {
15
+ const publicKey = typeof address === "string" ? PublicKey.fromBase58(address) : address;
16
+ await fetchMinaAccount({ publicKey, tokenId, force: false });
17
+ return Mina.hasAccount(publicKey, tokenId)
18
+ ? Number(Mina.getAccount(publicKey, tokenId).balance.toBigInt())
19
+ : undefined;
20
+ }
21
+ catch (error) {
22
+ console.error("Cannot fetch account balance", error);
23
+ return undefined;
24
+ }
25
+ }
26
+ export async function checkAddress(address) {
27
+ if (!address || typeof address !== "string") {
28
+ console.error("checkAddress params are invalid:", address);
29
+ return false;
30
+ }
31
+ try {
32
+ const publicKey = PublicKey.fromBase58(address);
33
+ if (address !== publicKey.toBase58()) {
34
+ console.log("checkAddress: address is not valid", address, publicKey.toBase58());
35
+ return false;
36
+ }
37
+ return true;
38
+ }
39
+ catch (error) {
40
+ console.error("checkAddress catch", { address, error });
41
+ return false;
42
+ }
43
+ }
44
+ //# sourceMappingURL=accont.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accont.js","sourceRoot":"","sources":["../../../../../../src/mina/transactions/accont.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAS,MAAM,MAAM,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAA2B,EAC3B,OAAe;IAEf,IAAI,CAAC;QACH,MAAM,SAAS,GACb,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QACxE,MAAM,gBAAgB,CAAC,EAA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CAAC;YACrC,OAAO,CAAC,GAAG,CACT,oCAAoC,EACpC,OAAO,EACP,SAAS,CAAC,QAAQ,EAAE,CACrB,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QACxD,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -4,3 +4,4 @@ export * from "./txstatus";
4
4
  export * from "./chain";
5
5
  export * from "./blockberry";
6
6
  export * from "./tiny-contract";
7
+ export * from "./send";
@@ -4,4 +4,5 @@ export * from "./txstatus";
4
4
  export * from "./chain";
5
5
  export * from "./blockberry";
6
6
  export * from "./tiny-contract";
7
+ export * from "./send";
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/mina/transactions/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/mina/transactions/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { BlockBerryChain } from "./chain";
2
+ import { blockchain } from "../../cloud";
2
3
  export declare function getNonce(params: {
3
4
  account: string;
4
5
  chain: BlockBerryChain;
@@ -8,3 +9,9 @@ export declare function getNonce(params: {
8
9
  nonce: number;
9
10
  message?: string;
10
11
  }>;
12
+ export declare function getAccountNonce(params: {
13
+ account: string;
14
+ chain?: blockchain;
15
+ blockBerryApiKey?: string;
16
+ verbose?: boolean;
17
+ }): Promise<number>;
@@ -1,4 +1,6 @@
1
1
  import { getZkAppTxsFromBlockBerry, getPaymentTxsFromBlockBerry, } from "./blockberry";
2
+ import { fetchMinaAccount, getCurrentNetwork } from "..";
3
+ import { Mina, PublicKey } from "o1js";
2
4
  export async function getNonce(params) {
3
5
  const { account, chain, blockBerryApiKey } = params;
4
6
  try {
@@ -55,4 +57,34 @@ export async function getNonce(params) {
55
57
  };
56
58
  }
57
59
  }
60
+ export async function getAccountNonce(params) {
61
+ const { account, chain = getCurrentNetwork().network.chainId, blockBerryApiKey, verbose = true, } = params;
62
+ const canUseBlockBerry = blockBerryApiKey !== undefined &&
63
+ (chain === "devnet" || chain === "mainnet");
64
+ if (chain === "zeko") {
65
+ const publicKey = PublicKey.fromBase58(account);
66
+ await fetchMinaAccount({ publicKey });
67
+ const nonce = Number(Mina.getAccount(publicKey).nonce.toBigint());
68
+ return nonce;
69
+ }
70
+ else {
71
+ const blockberryNoncePromise = canUseBlockBerry
72
+ ? getNonce({
73
+ account,
74
+ blockBerryApiKey,
75
+ chain,
76
+ })
77
+ : undefined;
78
+ const publicKey = PublicKey.fromBase58(account);
79
+ await fetchMinaAccount({ publicKey });
80
+ const senderNonce = Number(Mina.getAccount(publicKey).nonce.toBigint());
81
+ const blockberryNonce = blockberryNoncePromise
82
+ ? (await blockberryNoncePromise).nonce ?? -1
83
+ : -1;
84
+ const nonce = Math.max(senderNonce, blockberryNonce + 1);
85
+ if (verbose && nonce > senderNonce)
86
+ console.log(`Nonce changed from ${senderNonce} to ${nonce} for ${account}`);
87
+ return nonce;
88
+ }
89
+ }
58
90
  //# sourceMappingURL=nonce.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nonce.js","sourceRoot":"","sources":["../../../../../../src/mina/transactions/nonce.ts"],"names":[],"mappings":"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,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"}
@@ -0,0 +1,17 @@
1
+ import { Mina } from "o1js";
2
+ import { blockchain } from "../../cloud";
3
+ export declare function sendTx(params: {
4
+ tx: Mina.Transaction<false, true> | Mina.Transaction<true, true>;
5
+ description?: string;
6
+ verbose?: boolean;
7
+ wait?: boolean;
8
+ chain?: blockchain;
9
+ }): Promise<Mina.PendingTransaction | Mina.RejectedTransaction | Mina.IncludedTransaction | undefined>;
10
+ export declare function getTxStatusFast(params: {
11
+ hash: string;
12
+ chain?: blockchain;
13
+ }): Promise<{
14
+ success: boolean;
15
+ result?: boolean;
16
+ error?: string;
17
+ }>;
@@ -0,0 +1,116 @@
1
+ import { checkZkappTransaction } from "o1js";
2
+ import { sleep } from "../../cloud";
3
+ import { fetchMinaAccount, getCurrentNetwork } from "..";
4
+ export async function sendTx(params) {
5
+ const { tx, description = "", verbose = true, wait = true, chain = getCurrentNetwork().network.chainId, } = params;
6
+ // flatten accountUpdates
7
+ const accountUpdates = JSON.parse(tx.toJSON()).accountUpdates;
8
+ const auCount = [];
9
+ let proofAuthorizationCount = 0;
10
+ // Calculate the number of account updates for each { publicKey, tokenId }
11
+ for (const au of accountUpdates) {
12
+ const { publicKey, tokenId, authorizationKind } = au.body;
13
+ if (au.authorization.proof) {
14
+ proofAuthorizationCount++;
15
+ if (authorizationKind.isProved === false)
16
+ console.error("Proof authorization exists but isProved is false");
17
+ }
18
+ else if (authorizationKind.isProved === true)
19
+ console.error("isProved is true but no proof authorization");
20
+ const index = auCount.findIndex((item) => item.publicKey === publicKey && item.tokenId === tokenId);
21
+ if (index === -1)
22
+ auCount.push({ publicKey, tokenId, count: 1 });
23
+ else
24
+ auCount[index].count++;
25
+ }
26
+ if (verbose)
27
+ console.log(`Account updates for ${description ?? "tx"}: ${auCount.length}, proof authorizations: ${proofAuthorizationCount}`);
28
+ for (const au of auCount) {
29
+ if (au.count > 1)
30
+ if (verbose)
31
+ console.log(`DUPLICATE AU ${description ?? ""}: ${au.publicKey} ${au.tokenId !== "wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"
32
+ ? "tokenId: " + au.tokenId
33
+ : ""} count: ${au.count}`);
34
+ }
35
+ try {
36
+ let txSent;
37
+ let sent = false;
38
+ while (!sent) {
39
+ txSent = await tx.safeSend();
40
+ if (txSent.status == "pending") {
41
+ sent = true;
42
+ if (verbose)
43
+ console.log(`${description ?? ""} tx sent: hash: ${txSent.hash} status: ${txSent.status}`);
44
+ }
45
+ else if (chain === "zeko") {
46
+ if (verbose)
47
+ console.log("Retrying Zeko tx");
48
+ await sleep(10000);
49
+ }
50
+ else {
51
+ console.error(`${description} tx NOT sent: hash: ${txSent?.hash} status: ${txSent?.status}`, txSent.errors);
52
+ return undefined;
53
+ }
54
+ }
55
+ if (txSent === undefined)
56
+ throw new Error("txSent is undefined");
57
+ if (txSent.errors.length > 0) {
58
+ console.error(`${description ?? ""} tx error: hash: ${txSent.hash} status: ${txSent.status} errors: ${txSent.errors}`);
59
+ }
60
+ if (txSent.status === "pending" && wait !== false && chain !== "zeko") {
61
+ if (verbose)
62
+ console.log(`Waiting for tx inclusion...`);
63
+ const txIncluded = await txSent.safeWait();
64
+ if (txIncluded.status === "included")
65
+ if (verbose)
66
+ console.log(`${description ?? ""} tx included into block: hash: ${txIncluded.hash} status: ${txIncluded.status}`);
67
+ else
68
+ console.error(`${description ?? ""} tx NOT included into block: hash: ${txIncluded.hash} status: ${txIncluded.status}`);
69
+ if (chain !== "local") {
70
+ // we still wait for the tx to be included in the block by checking the nonce
71
+ // even in the case of tx NOT included
72
+ // because the tx might still be included in the block in the case of devnet instability
73
+ const { publicKey, nonce } = tx.transaction.feePayer.body;
74
+ const started = Date.now();
75
+ while (Date.now() - started < 1000 * 60 * 10) {
76
+ const newNonce = (await fetchMinaAccount({
77
+ publicKey,
78
+ force: true,
79
+ })).account?.nonce;
80
+ if (newNonce &&
81
+ Number(newNonce.toBigint()) > Number(nonce.toBigint()))
82
+ return txIncluded;
83
+ if (verbose)
84
+ console.log(`Waiting for ${chain} to update state for ${Math.floor((Date.now() - started) / 1000)} sec...`);
85
+ await sleep(10000);
86
+ }
87
+ // finally, if the tx is still not included, show an error
88
+ console.error(`${chain} do not reflect nonce update for tx ${txIncluded.hash} with status ${txIncluded.status}`);
89
+ }
90
+ return txIncluded;
91
+ }
92
+ else
93
+ return txSent;
94
+ }
95
+ catch (error) {
96
+ if (chain !== "zeko")
97
+ console.error("Error sending tx", error);
98
+ }
99
+ }
100
+ export async function getTxStatusFast(params) {
101
+ const { hash, chain = getCurrentNetwork().network.chainId } = params;
102
+ if (chain === "local" || chain === "zeko")
103
+ return { success: true, result: true };
104
+ try {
105
+ const txStatus = await checkZkappTransaction(hash);
106
+ return {
107
+ success: true,
108
+ result: txStatus?.success ?? false,
109
+ };
110
+ }
111
+ catch (error) {
112
+ console.error("getTxStatusFast error while getting tx status - catch", hash, error);
113
+ return { success: false, error: error?.message ?? "Cannot get tx status" };
114
+ }
115
+ }
116
+ //# 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,qBAAqB,EAAE,MAAM,MAAM,CAAC;AAE7C,OAAO,EAAE,KAAK,EAAc,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAC;AAEzD,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,MAM5B;IACC,MAAM,EACJ,EAAE,EACF,WAAW,GAAG,EAAE,EAChB,OA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AK,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"}
@@ -38,11 +38,12 @@ export function deserializeTransaction(serializedTransaction, txNew, signedJson)
38
38
  if (forests[i].length > 0) {
39
39
  if (transaction.transaction.accountUpdates[i].lazyAuthorization ===
40
40
  undefined ||
41
- tx.transaction.accountUpdates[i].lazyAuthorization.args ===
42
- undefined) {
41
+ transaction.transaction.accountUpdates[i].lazyAuthorization
42
+ .args === undefined) {
43
43
  throw new Error(`Lazy authorization args is undefined for item ${i}`);
44
44
  }
45
- deserializeLazyAuthorization(tx.transaction.accountUpdates[i].lazyAuthorization.args, forests[i]);
45
+ deserializeLazyAuthorization(transaction.transaction.accountUpdates[i].lazyAuthorization
46
+ .args, forests[i]);
46
47
  if (forests[i].restoredItems !== forests[i].length) {
47
48
  throw new Error(`Forest ${i} not fully restored`);
48
49
  }
@@ -1 +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,iBAAiB,CAAC;AAajE,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;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AAM,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,5 +1,5 @@
1
1
  import { BlockBerryChain } from "./chain";
2
- export declare function txStatus(params: {
2
+ export declare function txStatusBlockberry(params: {
3
3
  hash: string;
4
4
  time: number;
5
5
  chain: BlockBerryChain;
@@ -1,6 +1,6 @@
1
1
  import { getZkAppTxFromBlockBerry } from "./blockberry";
2
2
  const TIMEOUT = 1000 * 60 * 21;
3
- export async function txStatus(params) {
3
+ export async function txStatusBlockberry(params) {
4
4
  const { hash, chain, time, blockBerryApiKey } = params;
5
5
  const tx = await getZkAppTxFromBlockBerry({ hash, chain, blockBerryApiKey });
6
6
  if (tx?.txStatus)
@@ -1 +1 @@
1
- {"version":3,"file":"txstatus.js","sourceRoot":"","sources":["../../../../../../src/mina/transactions/txstatus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,MAAM,OAAO,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,CAAC;AAE/B,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,MAM9B;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"}
1
+ {"version":3,"file":"txstatus.js","sourceRoot":"","sources":["../../../../../../src/mina/transactions/txstatus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,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"}
@@ -3,5 +3,4 @@ export * from "./fetch";
3
3
  export * from "./fields";
4
4
  export * from "./fee";
5
5
  export * from "./mina";
6
- export * from "./ipfs";
7
6
  export * from "./indexed-map";
@@ -3,6 +3,5 @@ export * from "./fetch";
3
3
  export * from "./fields";
4
4
  export * from "./fee";
5
5
  export * from "./mina";
6
- export * from "./ipfs";
7
6
  export * from "./indexed-map";
8
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/mina/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/mina/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC"}
@@ -12,6 +12,15 @@ export declare function loadIndexedMerkleMap(params: {
12
12
  url: string;
13
13
  type: ReturnType<typeof IndexedMerkleMap>;
14
14
  }): Promise<import("o1js/dist/node/lib/provable/merkle-tree-indexed").IndexedMerkleMapBase>;
15
+ export declare function saveIndexedMerkleMap(params: {
16
+ map: IndexedMerkleMap;
17
+ name?: string;
18
+ keyvalues?: {
19
+ key: string;
20
+ value: string;
21
+ }[];
22
+ auth: string;
23
+ }): Promise<string | undefined>;
15
24
  export declare function serializeIndexedMap(map: IndexedMerkleMap): IndexedMapSerialized;
16
25
  export declare function deserializeIndexedMerkleMap(params: {
17
26
  serializedIndexedMap: IndexedMapSerialized;
@@ -1,5 +1,6 @@
1
1
  import { Experimental, Field } from "o1js";
2
2
  import { bigintToBase64, bigintFromBase64 } from "../../cloud";
3
+ import { pinJSON } from "../storage/pinata";
3
4
  const { IndexedMerkleMap } = Experimental;
4
5
  export async function loadIndexedMerkleMap(params) {
5
6
  const { url, type } = params;
@@ -17,6 +18,17 @@ export async function loadIndexedMerkleMap(params) {
17
18
  }
18
19
  return map;
19
20
  }
21
+ export async function saveIndexedMerkleMap(params) {
22
+ const { map, name = "indexed-map", keyvalues, auth } = params;
23
+ const serialized = serializeIndexedMap(map);
24
+ const ipfsHash = await pinJSON({
25
+ data: serialized,
26
+ name,
27
+ keyvalues,
28
+ auth,
29
+ });
30
+ return ipfsHash;
31
+ }
20
32
  export function serializeIndexedMap(map) {
21
33
  return {
22
34
  height: map.height,
@@ -1 +1 @@
1
- {"version":3,"file":"indexed-map.js","sourceRoot":"","sources":["../../../../../../src/mina/utils/indexed-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,EAAE,gBAAgB,EAAE,GAAG,YAAY,CAAC;AAW1C,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAG1C;IACC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAC7B,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IACD,MAAM,oBAAoB,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAyB,CAAC;IAC7E,MAAM,GAAG,GAAG,mCAAmC,CAAC;QAC9C,oBAAoB;QACpB,IAAI;KACL,CAAC,CAAC;IACH,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,GAAqB;IAErB,OAAO;QACL,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE;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