zkcloudworker 0.16.2 → 0.16.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,102 +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.FungibleTokenAdmin = void 0;
13
- const o1js_v1_1 = require("o1js_v1");
14
- /** A contract that grants permissions for administrative actions on a token.
15
- *
16
- * We separate this out into a dedicated contract. That way, when issuing a token, a user can
17
- * specify their own rules for administrative actions, without changing the token contract itself.
18
- *
19
- * The advantage is that third party applications that only use the token in a non-privileged way
20
- * can integrate against the unchanged token contract.
21
- */
22
- class FungibleTokenAdmin extends o1js_v1_1.SmartContract {
23
- constructor() {
24
- super(...arguments);
25
- this.adminPublicKey = (0, o1js_v1_1.State)();
26
- }
27
- async deploy(props) {
28
- await super.deploy(props);
29
- this.adminPublicKey.set(props.adminPublicKey);
30
- this.account.permissions.set({
31
- ...o1js_v1_1.Permissions.default(),
32
- setVerificationKey: o1js_v1_1.Permissions.VerificationKey.impossibleDuringCurrentVersion(),
33
- setPermissions: o1js_v1_1.Permissions.impossible(),
34
- });
35
- }
36
- /** Update the verification key.
37
- * Note that because we have set the permissions for setting the verification key to `impossibleDuringCurrentVersion()`, this will only be possible in case of a protocol update that requires an update.
38
- */
39
- async updateVerificationKey(vk) {
40
- this.account.verificationKey.set(vk);
41
- }
42
- async ensureAdminSignature() {
43
- const admin = await o1js_v1_1.Provable.witnessAsync(o1js_v1_1.PublicKey, async () => {
44
- let pk = await this.adminPublicKey.fetch();
45
- (0, o1js_v1_1.assert)(pk !== undefined, "could not fetch admin public key");
46
- return pk;
47
- });
48
- this.adminPublicKey.requireEquals(admin);
49
- return o1js_v1_1.AccountUpdate.createSigned(admin);
50
- }
51
- async canMint(_accountUpdate) {
52
- await this.ensureAdminSignature();
53
- return (0, o1js_v1_1.Bool)(true);
54
- }
55
- async canChangeAdmin(_admin) {
56
- await this.ensureAdminSignature();
57
- return (0, o1js_v1_1.Bool)(true);
58
- }
59
- async canPause() {
60
- await this.ensureAdminSignature();
61
- return (0, o1js_v1_1.Bool)(true);
62
- }
63
- async canResume() {
64
- await this.ensureAdminSignature();
65
- return (0, o1js_v1_1.Bool)(true);
66
- }
67
- }
68
- exports.FungibleTokenAdmin = FungibleTokenAdmin;
69
- __decorate([
70
- (0, o1js_v1_1.state)(o1js_v1_1.PublicKey),
71
- __metadata("design:type", Object)
72
- ], FungibleTokenAdmin.prototype, "adminPublicKey", void 0);
73
- __decorate([
74
- o1js_v1_1.method,
75
- __metadata("design:type", Function),
76
- __metadata("design:paramtypes", [o1js_v1_1.VerificationKey]),
77
- __metadata("design:returntype", Promise)
78
- ], FungibleTokenAdmin.prototype, "updateVerificationKey", null);
79
- __decorate([
80
- o1js_v1_1.method.returns(o1js_v1_1.Bool),
81
- __metadata("design:type", Function),
82
- __metadata("design:paramtypes", [o1js_v1_1.AccountUpdate]),
83
- __metadata("design:returntype", Promise)
84
- ], FungibleTokenAdmin.prototype, "canMint", null);
85
- __decorate([
86
- o1js_v1_1.method.returns(o1js_v1_1.Bool),
87
- __metadata("design:type", Function),
88
- __metadata("design:paramtypes", [o1js_v1_1.PublicKey]),
89
- __metadata("design:returntype", Promise)
90
- ], FungibleTokenAdmin.prototype, "canChangeAdmin", null);
91
- __decorate([
92
- o1js_v1_1.method.returns(o1js_v1_1.Bool),
93
- __metadata("design:type", Function),
94
- __metadata("design:paramtypes", []),
95
- __metadata("design:returntype", Promise)
96
- ], FungibleTokenAdmin.prototype, "canPause", null);
97
- __decorate([
98
- o1js_v1_1.method.returns(o1js_v1_1.Bool),
99
- __metadata("design:type", Function),
100
- __metadata("design:paramtypes", []),
101
- __metadata("design:returntype", Promise)
102
- ], FungibleTokenAdmin.prototype, "canResume", null);
@@ -1,29 +0,0 @@
1
- import { FungibleToken } from "./FungibleToken.js";
2
- import { FungibleTokenAdmin } from "./FungibleTokenAdmin.js";
3
- declare const O1JS_V1_CODE: {
4
- FungibleToken: typeof FungibleToken;
5
- FungibleTokenAdmin: typeof FungibleTokenAdmin;
6
- fungibleTokenVerificationKeys: {
7
- testnet: {
8
- admin: {
9
- hash: string;
10
- data: string;
11
- };
12
- token: {
13
- hash: string;
14
- data: string;
15
- };
16
- };
17
- mainnet: {
18
- admin: {
19
- hash: string;
20
- data: string;
21
- };
22
- token: {
23
- hash: string;
24
- data: string;
25
- };
26
- };
27
- };
28
- };
29
- export default O1JS_V1_CODE;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const FungibleToken_js_1 = require("./FungibleToken.js");
4
- const FungibleTokenAdmin_js_1 = require("./FungibleTokenAdmin.js");
5
- const vk_js_1 = require("./vk.js");
6
- const O1JS_V1_CODE = {
7
- FungibleToken: FungibleToken_js_1.FungibleToken,
8
- FungibleTokenAdmin: FungibleTokenAdmin_js_1.FungibleTokenAdmin,
9
- fungibleTokenVerificationKeys: vk_js_1.fungibleTokenVerificationKeys,
10
- };
11
- exports.default = O1JS_V1_CODE;
@@ -1,22 +0,0 @@
1
- export declare const fungibleTokenVerificationKeys: {
2
- testnet: {
3
- admin: {
4
- hash: string;
5
- data: string;
6
- };
7
- token: {
8
- hash: string;
9
- data: string;
10
- };
11
- };
12
- mainnet: {
13
- admin: {
14
- hash: string;
15
- data: string;
16
- };
17
- token: {
18
- hash: string;
19
- data: string;
20
- };
21
- };
22
- };
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fungibleTokenVerificationKeys = void 0;
4
- exports.fungibleTokenVerificationKeys = {
5
- testnet: {
6
- admin: {
7
- hash: "1200635497217107248831982322269320244173535715339356861513501242012238077174",
8
- data: "AABvj1TjS95sAoY8puZRG2h4hxjs9c5enwfo4vZAQC/COWHgEjNupRIxb3LVxaRU2mkaG94By4OqrJ3M7YXNs4oiAhMdOuU5+NrHN3RCJtswX+WPvwaHJnihtSy2FcJPyghvBVTi2i7dtWIPQLVDIzC5ARu8f8H9JWjzjVVYE/rQLruuq2qUsCrqdVsdRaw+6OjIFeAXS6mzvrVv5iYGslg5CV5mgLBg3xC408jZJ0pe8ua2mcIEDMGEdSR/+VuhPQaqxZTJPBVhazVc1P9gRyS26SdOohL85UmEc4duqlJOOlXOFuwOT6dvoiUcdQtzuPp1pzA/LHueqm9yQG9mlT0Df8uY/A+rwM4l/ypTP/o0+5GCM9jJf9bl/z0DpGWheCJY+LZbIGeBUOpg0Gx1+KZsD9ivWJ0vxNz8zKcAS1i3FqFhahkJHiiKgikn6Qig5+Yf3MJs0WKSNkCkgW2B48srVTR9ykLyO+68NiWLEnLXvJd+rmUHR4K92whqctZZ8zvd2+5u+b62pkvFqqZZ9r24SMQOe9Bl2ZfMew2DyFLMPzwTowHw8onMEXcVKabFs9zQVp66AMf/wlipirNztdguADEkbXGpkNkEzQ5OXcZwC+gqZLkSNdBq2px2PU/Q/LAQLbVFIDDBCYiHxnEZnXqLpY5CKCY567GG6gdDPwZPjzySiQ4YBcpnqpfVYnYG5iziTEdl5+3SENlC7E6MhR2PDoc/TmMvbEHnhNlo6tskqcmEUBQj+At5EO2NmogFDJIN6sRfrXOdH5l+QV7vR2v385RKRtfnmcJeUQcpq5/JTgVwagDJ/FarTN5jFsrBBRTeW3yZ5/CfVNA7NNWxoKhjBaHVIhn/fLT5sFLYzYdCx/uTsusyZmE2d6iqnLS+j1I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bBQlUrmEX46UnKXzYntkZDee7Lx1u1BBkJAj/5BH1YZOPmMCh498rBUiHmc+4uQqebqNSHdOSgC39ESss4u7GNhWj3fi9XXta6UT9wapEMGq0WTg2Kry6xNP2YZ5X8eaapRQc/KzYgz9XjQL6TKpqNuGEbRlmfYvIuoFbnOkZI7RYoGp3YheMs1pQErwOxLzZa9W3Okwx16TSDwPLR0xMdAyogMrOdKN4JSMyNnmOaoVf6PkN+K9fz7RuHtvgjKpuz4vsK5Z2wRneqPrnfu6PkgHcRQrd0SxqCbN23Z/yp8qOcN6XU49iCNEBjztT00tolQ9hCPMSE/eTZ+ioez7m3pJFVks3T5Rk/e+6MeowJWIOv20x6CPS9mhpr1JPwdNFrWdgs19VsobntCpF/rWxksdrYyk=",
9
- },
10
- token: {
11
- hash: "25084457276132306637089336910977939820654927814172888515895248592725736067489",
12
- data: "AABoR9W/JCk+QV7xmR0EmMunepTBYRNFuyTe3jy0YL4FPMZvsY3S7Erek8aQc6iEbg0gx8yQZuX7/I9abchc2AM3/JhaHwmIVJYlvR+hIhruFPB3wgxMNv0w0gKKcrMUjwumIsjP5rBKR/iI66NePvgPuC29OEcvCy1WA7VGa4jkJdudep82RUdWGRWK2+TESBdYTcmhDVuKl71sFjmOdRsHPuHz9tgXl+pkmjmsRFUu0NL0uf7+4UZZ3qwo5JDu+CK6Ec77HZQNWTxobryIa5NH8CwGRTykkaJMUmjbfWiFPCUHzvcqpOIDa/P0WVqqmkAksmXroqqmKGk7zQBN+Ak0GHEPqQDSJIQv98Wm/EluR3MtPMixUI0OSCdbCe++KR4gIKwvRX+AyBCIcMUEuQ7CN4TcDQmD4dsnU3Ywu2cTLCmf1z6el9AHdoTNg5kHvhrxJtV5O5sUnQEW+LPdxSMkxmO3ao9cj4Pdjpf//o1wVN9GR9uyGgj7JxOzi0e1HC2DWmTr5hsWR+J7Pz5rAY5jv5xAcpzUgdqRLr+0Z5wQBovJXign+HwE1cLbTGjZjc2WzRyDEAUfk+VvpE9GcgUd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C3FtfenG9e8haWYXUyk1783IQJ4W1jkscQTU1RZrL0cWoaCxIXnXsdDJStgz8B9EQ0uUEkfXSXYEbQtIA4DVKzTO4uqxOzafqAOLnvOxi5Vn95JCOu3CEAFr0WQEOnA2X3nw31spFvLj0jykGpn1ECHhW4Ft9EOkHDr4qDA8Mi5gH9EB+g0AhObwxj7RZB2Wq5PSmZw131mkHzgYOgD3JC9tlaGMSxesjF1O3+U3wUOLrrU89s128Y0PpiEzO6Jsm1aDzbF1pkz3asy0z+Enb4BMg/Jv5j/EZkKM6Okv746/ETIs69fv3e5Iucae7lyyYVNCYBtucWrOQK2Pfi4QzRZjkC29hj8OenHSn+75qcX/v5ejhSBAb24Bp1INNVgaF3VHGz1+ULEcs73b/b0K1AQJYfdkfD4fqrj1nUIlVYv3yw1SyEKClpoiBaLiRxg/04rgb3enmxe6msVApSIlAYs+qeRAIRDCU+ZensV1x4sS4VCjQgoPlo9sV7wJDUOTsUkgux38w39sqiSfONzmyhfXqZocojTv1m3vHh8gnCFUbZ/d3WvywDE67VPRlTYX5ZR80Yyjz3byDH2/+DWOsjv2q8KUv2mtgkiOTZ1D3tAF6Vl6tSWlixMYc1tfC8KDWDOq2eg7M72MqjfiMTuBPXr2ZB/nTdtCi9lDQQESzBmgJaV/KCZOAaIKQR9hibvy4vt3wlSZ9XTK+FFZPQc=",
13
- },
14
- },
15
- mainnet: {
16
- admin: {
17
- hash: "16115269877914581564299853766147447229664556890591132763176560855029019233817",
18
- data: "AABvj1TjS95sAoY8puZRG2h4hxjs9c5enwfo4vZAQC/COWHgEjNupRIxb3LVxaRU2mkaG94By4OqrJ3M7YXNs4oiAhMdOuU5+NrHN3RCJtswX+WPvwaHJnihtSy2FcJPyghvBVTi2i7dtWIPQLVDIzC5ARu8f8H9JWjzjVVYE/rQLruuq2qUsCrqdVsdRaw+6OjIFeAXS6mzvrVv5iYGslg5CV5mgLBg3xC408jZJ0pe8ua2mcIEDMGEdSR/+VuhPQaqxZTJPBVhazVc1P9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Uu+NsPDGvdPSCGdLuC25izxb21up2HORmlM5R7yuIW3rCiq8DeLD0OHjqOBZ+IEv9zEkb5fHTJvxoxnZlArtZSBpD6iIDPVDymuK+BsOggZav3K+TytjeD2Gcld5NfyRISFWUIMkZNFQRL8AQpET6RJnG1HSW0CaRfNeomtjCBWIr85wFCrp06j/D1J8B3EyhloZLJJ6ywxt41smXVugxA8LRTO+6lVBOBF14jHQCCUl6u7uiWCe1z4/bC5wQXPwWSljp8NVU8Erp1U9ModNK7W63Pkh0efvgSD5d0nLzbfa0jTdxZ1JkfKsnvYk43Ed+vmXooHZhUeZAIX8ZCizhb1Gfvm02JFwxYXmiYAOp5wkGzweU2I5zo8r5yZFI1r4XibNQs7eAfKGRv3gh8/EuLkX/bdettgPvNsI8ndpQ3kL/V8W2PQN4/hjC9AKCYBeXQG42bRncYZdLe++R2KA1ZdPDxQPF3sxUIKhzmRWqbozrtv310Maorwv6eZJjldlCJwICR9QgcDwDuNj+UFJnX3RWsdIWsUbI1T4wO0sE2sBiMX/OqmiGJEAnBegioistlFyfRvm54h+duNOl/ol1Fva7NoXvsL/wThAWUly7bnc7/Al2bBQlUrmEX46UnKXzYntkZDee7Lx1u1BBkJAj/5BH1YZOPmMCh498rBUiHmc+4uQqebqNSHdOSgC39ESss4u7GNhWj3fi9XXta6UT9wapEMGq0WTg2Kry6xNP2YZ5X8eaapRQc/KzYgz9XjQL6TKpqNuGEbRlmfYvIuoFbnOkZI7RYoGp3YheMs1pQErwOxLzZa9W3Okwx16TSDwPLR0xMdAyogMrOdKN4JSMyNnmOaoVf6PkN+K9fz7RuHtvgjKpuz4vsK5Z2wRneqPrnfu6PkgHcRQrd0SxqCbN23Z/yp8qOcN6XU49iCNEBjztT00tolQ9hCPMSE/eTZ+ioez7m3pJFVks3T5Rk/e+6MeowJWIOv20x6CPS9mhpr1JPwdNFrWdgs19VsobntCpF/rWxksdrYyk=",
19
- },
20
- token: {
21
- hash: "12320223354843720065815824451082596238990220882343256724550451075683722289248",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3enmxe6msVApSIlAYs+qeRAIRDCU+ZensV1x4sS4VCjQgoPlo9sV7wJDUOTsUkgux38w39sqiSfONzmyhfXqZocojTv1m3vHh8gnCFUbZ/d3WvywDE67VPRlTYX5ZR80Yyjz3byDH2/+DWOsjv2q8KUv2mtgkiOTZ1D3tAF6Vl6tSWlixMYc1tfC8KDWDOq2eg7M72MqjfiMTuBPXr2ZB/nTdtCi9lDQQESzBmgJaV/KCZOAaIKQR9hibvy4vt3wlSZ9XTK+FFZPQc=",
23
- },
24
- },
25
- };
@@ -1,338 +0,0 @@
1
- import { AccountUpdate, AccountUpdateForest, DeployArgs, Bool, Field, Int64, PublicKey, State, TokenContractV2, Types, UInt64, UInt8, VerificationKey } from "o1js_v1";
2
- import { FungibleTokenAdminBase } from "./FungibleTokenAdmin.js";
3
- interface FungibleTokenDeployProps extends Exclude<DeployArgs, undefined> {
4
- /** The token symbol. */
5
- symbol: string;
6
- /** A source code reference, which is placed within the `zkappUri` of the contract account.
7
- * Typically a link to a file on github. */
8
- src: string;
9
- }
10
- export declare const FungibleTokenErrors: {
11
- noAdminKey: string;
12
- noPermissionToChangeAdmin: string;
13
- tokenPaused: string;
14
- noPermissionToMint: string;
15
- noPermissionToPause: string;
16
- noPermissionToResume: string;
17
- noTransferFromCirculation: string;
18
- noPermissionChangeAllowed: string;
19
- flashMinting: string;
20
- unbalancedTransaction: string;
21
- };
22
- export declare class FungibleToken extends TokenContractV2 {
23
- decimals: State<UInt8>;
24
- admin: State<PublicKey>;
25
- paused: State<import("o1js_v1/dist/node/lib/provable/bool.js").Bool>;
26
- static AdminContract: new (...args: any) => FungibleTokenAdminBase;
27
- readonly events: {
28
- SetAdmin: typeof SetAdminEvent;
29
- Pause: typeof PauseEvent;
30
- Mint: typeof MintEvent;
31
- Burn: typeof BurnEvent;
32
- BalanceChange: typeof BalanceChangeEvent;
33
- };
34
- deploy(props: FungibleTokenDeployProps): Promise<void>;
35
- /** Update the verification key.
36
- * Note that because we have set the permissions for setting the verification key to `impossibleDuringCurrentVersion()`, this will only be possible in case of a protocol update that requires an update.
37
- */
38
- updateVerificationKey(vk: VerificationKey): Promise<void>;
39
- /** Initializes the account for tracking total circulation.
40
- * @argument {PublicKey} admin - public key where the admin contract is deployed
41
- * @argument {UInt8} decimals - number of decimals for the token
42
- * @argument {Bool} startPaused - if set to `Bool(true), the contract will start in a mode where token minting and transfers are paused. This should be used for non-atomic deployments
43
- */
44
- initialize(admin: PublicKey, decimals: UInt8, startPaused: Bool): Promise<void>;
45
- getAdminContract(): Promise<FungibleTokenAdminBase>;
46
- setAdmin(admin: PublicKey): Promise<void>;
47
- mint(recipient: PublicKey, amount: UInt64): Promise<AccountUpdate>;
48
- burn(from: PublicKey, amount: UInt64): Promise<AccountUpdate>;
49
- pause(): Promise<void>;
50
- resume(): Promise<void>;
51
- transfer(from: PublicKey, to: PublicKey, amount: UInt64): Promise<void>;
52
- private checkPermissionsUpdate;
53
- /** Approve `AccountUpdate`s that have been created outside of the token contract.
54
- *
55
- * @argument {AccountUpdateForest} updates - The `AccountUpdate`s to approve. Note that the forest size is limited by the base token contract, @see TokenContractV2.MAX_ACCOUNT_UPDATES The current limit is 9.
56
- */
57
- approveBase(updates: AccountUpdateForest): Promise<void>;
58
- getBalanceOf(address: PublicKey): Promise<UInt64>;
59
- /** Reports the current circulating supply
60
- * This does take into account currently unreduced actions.
61
- */
62
- getCirculating(): Promise<UInt64>;
63
- getDecimals(): Promise<UInt8>;
64
- }
65
- declare const SetAdminEvent_base: (new (value: {
66
- adminKey: PublicKey;
67
- }) => {
68
- adminKey: PublicKey;
69
- }) & {
70
- _isStruct: true;
71
- } & Omit<import("o1js_v1/dist/node/lib/provable/types/provable-intf.js").Provable<{
72
- adminKey: PublicKey;
73
- }, {
74
- adminKey: {
75
- x: bigint;
76
- isOdd: boolean;
77
- };
78
- }>, "fromFields"> & {
79
- fromFields: (fields: import("o1js_v1/dist/node/lib/provable/field.js").Field[]) => {
80
- adminKey: PublicKey;
81
- };
82
- } & {
83
- fromValue: (value: {
84
- adminKey: PublicKey | {
85
- x: Field | bigint;
86
- isOdd: Bool | boolean;
87
- };
88
- }) => {
89
- adminKey: PublicKey;
90
- };
91
- toInput: (x: {
92
- adminKey: PublicKey;
93
- }) => {
94
- fields?: Field[] | undefined;
95
- packed?: [Field, number][] | undefined;
96
- };
97
- toJSON: (x: {
98
- adminKey: PublicKey;
99
- }) => {
100
- adminKey: string;
101
- };
102
- fromJSON: (x: {
103
- adminKey: string;
104
- }) => {
105
- adminKey: PublicKey;
106
- };
107
- empty: () => {
108
- adminKey: PublicKey;
109
- };
110
- };
111
- export declare class SetAdminEvent extends SetAdminEvent_base {
112
- }
113
- declare const PauseEvent_base: (new (value: {
114
- isPaused: import("o1js_v1/dist/node/lib/provable/bool.js").Bool;
115
- }) => {
116
- isPaused: import("o1js_v1/dist/node/lib/provable/bool.js").Bool;
117
- }) & {
118
- _isStruct: true;
119
- } & Omit<import("o1js_v1/dist/node/lib/provable/types/provable-intf.js").Provable<{
120
- isPaused: import("o1js_v1/dist/node/lib/provable/bool.js").Bool;
121
- }, {
122
- isPaused: boolean;
123
- }>, "fromFields"> & {
124
- fromFields: (fields: import("o1js_v1/dist/node/lib/provable/field.js").Field[]) => {
125
- isPaused: import("o1js_v1/dist/node/lib/provable/bool.js").Bool;
126
- };
127
- } & {
128
- fromValue: (value: {
129
- isPaused: boolean | import("o1js_v1/dist/node/lib/provable/bool.js").Bool;
130
- }) => {
131
- isPaused: import("o1js_v1/dist/node/lib/provable/bool.js").Bool;
132
- };
133
- toInput: (x: {
134
- isPaused: import("o1js_v1/dist/node/lib/provable/bool.js").Bool;
135
- }) => {
136
- fields?: Field[] | undefined;
137
- packed?: [Field, number][] | undefined;
138
- };
139
- toJSON: (x: {
140
- isPaused: import("o1js_v1/dist/node/lib/provable/bool.js").Bool;
141
- }) => {
142
- isPaused: boolean;
143
- };
144
- fromJSON: (x: {
145
- isPaused: boolean;
146
- }) => {
147
- isPaused: import("o1js_v1/dist/node/lib/provable/bool.js").Bool;
148
- };
149
- empty: () => {
150
- isPaused: import("o1js_v1/dist/node/lib/provable/bool.js").Bool;
151
- };
152
- };
153
- export declare class PauseEvent extends PauseEvent_base {
154
- }
155
- declare const MintEvent_base: (new (value: {
156
- recipient: PublicKey;
157
- amount: Types.UInt64;
158
- }) => {
159
- recipient: PublicKey;
160
- amount: Types.UInt64;
161
- }) & {
162
- _isStruct: true;
163
- } & Omit<import("o1js_v1/dist/node/lib/provable/types/provable-intf.js").Provable<{
164
- recipient: PublicKey;
165
- amount: Types.UInt64;
166
- }, {
167
- recipient: {
168
- x: bigint;
169
- isOdd: boolean;
170
- };
171
- amount: bigint;
172
- }>, "fromFields"> & {
173
- fromFields: (fields: import("o1js_v1/dist/node/lib/provable/field.js").Field[]) => {
174
- recipient: PublicKey;
175
- amount: Types.UInt64;
176
- };
177
- } & {
178
- fromValue: (value: {
179
- recipient: PublicKey | {
180
- x: Field | bigint;
181
- isOdd: Bool | boolean;
182
- };
183
- amount: bigint | Types.UInt64;
184
- }) => {
185
- recipient: PublicKey;
186
- amount: Types.UInt64;
187
- };
188
- toInput: (x: {
189
- recipient: PublicKey;
190
- amount: Types.UInt64;
191
- }) => {
192
- fields?: Field[] | undefined;
193
- packed?: [Field, number][] | undefined;
194
- };
195
- toJSON: (x: {
196
- recipient: PublicKey;
197
- amount: Types.UInt64;
198
- }) => {
199
- recipient: string;
200
- amount: string;
201
- };
202
- fromJSON: (x: {
203
- recipient: string;
204
- amount: string;
205
- }) => {
206
- recipient: PublicKey;
207
- amount: Types.UInt64;
208
- };
209
- empty: () => {
210
- recipient: PublicKey;
211
- amount: Types.UInt64;
212
- };
213
- };
214
- export declare class MintEvent extends MintEvent_base {
215
- }
216
- declare const BurnEvent_base: (new (value: {
217
- from: PublicKey;
218
- amount: Types.UInt64;
219
- }) => {
220
- from: PublicKey;
221
- amount: Types.UInt64;
222
- }) & {
223
- _isStruct: true;
224
- } & Omit<import("o1js_v1/dist/node/lib/provable/types/provable-intf.js").Provable<{
225
- from: PublicKey;
226
- amount: Types.UInt64;
227
- }, {
228
- from: {
229
- x: bigint;
230
- isOdd: boolean;
231
- };
232
- amount: bigint;
233
- }>, "fromFields"> & {
234
- fromFields: (fields: import("o1js_v1/dist/node/lib/provable/field.js").Field[]) => {
235
- from: PublicKey;
236
- amount: Types.UInt64;
237
- };
238
- } & {
239
- fromValue: (value: {
240
- from: PublicKey | {
241
- x: Field | bigint;
242
- isOdd: Bool | boolean;
243
- };
244
- amount: bigint | Types.UInt64;
245
- }) => {
246
- from: PublicKey;
247
- amount: Types.UInt64;
248
- };
249
- toInput: (x: {
250
- from: PublicKey;
251
- amount: Types.UInt64;
252
- }) => {
253
- fields?: Field[] | undefined;
254
- packed?: [Field, number][] | undefined;
255
- };
256
- toJSON: (x: {
257
- from: PublicKey;
258
- amount: Types.UInt64;
259
- }) => {
260
- from: string;
261
- amount: string;
262
- };
263
- fromJSON: (x: {
264
- from: string;
265
- amount: string;
266
- }) => {
267
- from: PublicKey;
268
- amount: Types.UInt64;
269
- };
270
- empty: () => {
271
- from: PublicKey;
272
- amount: Types.UInt64;
273
- };
274
- };
275
- export declare class BurnEvent extends BurnEvent_base {
276
- }
277
- declare const BalanceChangeEvent_base: (new (value: {
278
- address: PublicKey;
279
- amount: Int64;
280
- }) => {
281
- address: PublicKey;
282
- amount: Int64;
283
- }) & {
284
- _isStruct: true;
285
- } & Omit<import("o1js_v1/dist/node/lib/provable/types/provable-intf.js").Provable<{
286
- address: PublicKey;
287
- amount: Int64;
288
- }, {
289
- address: {
290
- x: bigint;
291
- isOdd: boolean;
292
- };
293
- amount: any;
294
- }>, "fromFields"> & {
295
- fromFields: (fields: import("o1js_v1/dist/node/lib/provable/field.js").Field[]) => {
296
- address: PublicKey;
297
- amount: Int64;
298
- };
299
- } & {
300
- fromValue: (value: {
301
- address: PublicKey | {
302
- x: Field | bigint;
303
- isOdd: Bool | boolean;
304
- };
305
- amount: any;
306
- }) => {
307
- address: PublicKey;
308
- amount: Int64;
309
- };
310
- toInput: (x: {
311
- address: PublicKey;
312
- amount: Int64;
313
- }) => {
314
- fields?: Field[] | undefined;
315
- packed?: [Field, number][] | undefined;
316
- };
317
- toJSON: (x: {
318
- address: PublicKey;
319
- amount: Int64;
320
- }) => {
321
- address: string;
322
- amount: any;
323
- };
324
- fromJSON: (x: {
325
- address: string;
326
- amount: any;
327
- }) => {
328
- address: PublicKey;
329
- amount: Int64;
330
- };
331
- empty: () => {
332
- address: PublicKey;
333
- amount: Int64;
334
- };
335
- };
336
- export declare class BalanceChangeEvent extends BalanceChangeEvent_base {
337
- }
338
- export {};