zkcloudworker 0.17.3 → 0.17.5
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/ts/src/mina/storage/index.d.ts +3 -0
- package/lib/ts/src/mina/storage/index.js +19 -0
- package/lib/ts/src/mina/storage/pinata.d.ts +6 -0
- package/lib/ts/src/mina/storage/pinata.js +36 -0
- package/lib/ts/src/mina/storage/storage.d.ts +75 -0
- package/lib/ts/src/mina/storage/storage.js +55 -0
- package/lib/ts/src/mina/transactions/accont.d.ts +4 -0
- package/lib/ts/src/mina/transactions/accont.js +48 -0
- package/lib/ts/src/mina/transactions/index.d.ts +1 -0
- package/lib/ts/src/mina/transactions/index.js +1 -0
- package/lib/ts/src/mina/transactions/nonce.d.ts +7 -0
- package/lib/ts/src/mina/transactions/nonce.js +33 -0
- package/lib/ts/src/mina/transactions/send.d.ts +17 -0
- package/lib/ts/src/mina/transactions/send.js +119 -0
- package/lib/ts/src/mina/transactions/txstatus.d.ts +1 -1
- package/lib/ts/src/mina/transactions/txstatus.js +2 -2
- package/lib/ts/src/mina/utils/index.d.ts +0 -1
- package/lib/ts/src/mina/utils/index.js +0 -1
- package/lib/ts/src/mina/utils/indexed-map.d.ts +9 -0
- package/lib/ts/src/mina/utils/indexed-map.js +13 -0
- package/lib/ts/tsconfig.tsbuildinfo +1 -1
- package/lib/web/src/mina/storage/index.d.ts +3 -0
- package/lib/web/src/mina/storage/index.js +4 -0
- package/lib/web/src/mina/storage/index.js.map +1 -0
- package/lib/web/src/mina/storage/ipfs.js.map +1 -0
- package/lib/web/src/mina/storage/pinata.d.ts +6 -0
- package/lib/web/src/mina/storage/pinata.js +34 -0
- package/lib/web/src/mina/storage/pinata.js.map +1 -0
- package/lib/web/src/mina/storage/storage.d.ts +75 -0
- package/lib/web/src/mina/storage/storage.js +52 -0
- package/lib/web/src/mina/storage/storage.js.map +1 -0
- package/lib/web/src/mina/transactions/accont.d.ts +4 -0
- package/lib/web/src/mina/transactions/accont.js +44 -0
- package/lib/web/src/mina/transactions/accont.js.map +1 -0
- package/lib/web/src/mina/transactions/index.d.ts +1 -0
- package/lib/web/src/mina/transactions/index.js +1 -0
- package/lib/web/src/mina/transactions/index.js.map +1 -1
- package/lib/web/src/mina/transactions/nonce.d.ts +7 -0
- package/lib/web/src/mina/transactions/nonce.js +32 -0
- package/lib/web/src/mina/transactions/nonce.js.map +1 -1
- package/lib/web/src/mina/transactions/send.d.ts +17 -0
- package/lib/web/src/mina/transactions/send.js +116 -0
- package/lib/web/src/mina/transactions/send.js.map +1 -0
- package/lib/web/src/mina/transactions/txstatus.d.ts +1 -1
- package/lib/web/src/mina/transactions/txstatus.js +1 -1
- package/lib/web/src/mina/transactions/txstatus.js.map +1 -1
- package/lib/web/src/mina/utils/index.d.ts +0 -1
- package/lib/web/src/mina/utils/index.js +0 -1
- package/lib/web/src/mina/utils/index.js.map +1 -1
- package/lib/web/src/mina/utils/indexed-map.d.ts +9 -0
- package/lib/web/src/mina/utils/indexed-map.js +12 -0
- package/lib/web/src/mina/utils/indexed-map.js.map +1 -1
- package/lib/web/tsconfig.web.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/lib/web/src/mina/utils/ipfs.js.map +0 -1
- /package/lib/ts/src/mina/{utils → storage}/ipfs.d.ts +0 -0
- /package/lib/ts/src/mina/{utils → storage}/ipfs.js +0 -0
- /package/lib/web/src/mina/{utils → storage}/ipfs.d.ts +0 -0
- /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,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,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ACpC,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"}
|
@@ -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":"AACA,OAAO,EACL,yBAAyB,EACzB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"nonce.js","sourceRoot":"","sources":["../../../../../../src/mina/transactions/nonce.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAGvC,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,MAI9B;IAKC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAC;IACpD,IAAI,CAAC;QACH,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC;YAChE,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,CAAC,CAAC;gBACT,OAAO,EAAE,qBAAqB;aAC/B,CAAC;QACJ,CAAC;QAED,IACE,gBAAgB,KAAK,SAAS;YAC9B,gBAAgB,KAAK,IAAI;YACzB,gBAAgB,KAAK,EAAE,EACvB,CAAC;YACD,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,CAAC,CAAC;gBACT,OAAO,EAAE,8BAA8B;aACxC,CAAC;QACJ,CAAC;QACD,MAAM,eAAe,GAAG,yBAAyB,CAAC;YAChD,OAAO;YACP,KAAK;YACL,gBAAgB;SACjB,CAAC,CAAC;QACH,MAAM,UAAU,GAAG,2BAA2B,CAAC;YAC7C,OAAO;YACP,KAAK;YACL,gBAAgB;SACjB,CAAC,CAAC;QAEH,MAAM,YAAY,GAAG,CAAC,MAAM,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;QAC9D,IAAI,OAAO,GAAG,C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ChD,MAAM,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QACtC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QAClE,OAAO,KAAK,CAAC;IACf,CAAC;SAAM,CAAC;QACN,MAAM,sBAAsB,GAAG,gBAAgB;YAC7C,CAAC,CAAC,QAAQ,CAAC;gBACP,OAAO;gBACP,gBAAgB;gBAChB,KAAK;aACN,CAAC;YACJ,CAAC,CAAC,SAAS,CAAC;QACd,MAAM,SAAS,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAChD,MAAM,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QACtC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QACxE,MAAM,eAAe,GAAG,sBAAsB;YAC5C,CAAC,CAAC,CAAC,MAAM,sBAAsB,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;YAC5C,CAAC,CAAC,CAAC,CAAC,CAAC;QACP,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,eAAe,GAAG,CAAC,CAAC,CAAC;QACzD,IAAI,OAAO,IAAI,KAAK,GAAG,WAAW;YAChC,OAAO,CAAC,GAAG,CACT,sBAAsB,WAAW,OAAO,KAAK,QAAQ,OAAO,EAAE,CAC/D,CAAC;QACJ,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
@@ -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,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AM,qBAAqB,CAAC,IAAI,CAAC,CAAC;QACnD,OAAO;YACL,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,QAAQ,EAAE,OAAO,IAAI,KAAK;SACnC,CAAC;IACJ,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CACX,uDAAuD,EACvD,IAAI,EACJ,KAAK,CACN,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,IAAI,sBAAsB,EAAE,CAAC;IAC7E,CAAC;AACH,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { getZkAppTxFromBlockBerry } from "./blockberry";
|
2
2
|
const TIMEOUT = 1000 * 60 * 21;
|
3
|
-
export async function
|
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,
|
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"}
|
@@ -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,
|
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;
|
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;AAC/D,OAAO,EAAE,OAA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