@fastnear/borsh-schema 0.6.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -1,170 +1,169 @@
1
- /* ⋈ 🏃🏻💨 FastNEAR Borsh Schema - ESM (@fastnear/borsh-schema version 0.6.1) */
2
- /* https://www.npmjs.com/package/@fastnear/borsh-schema/v/0.6.1 */
1
+ /* ⋈ 🏃🏻💨 FastNEAR Borsh Schema - ESM (@fastnear/borsh-schema version 0.6.3) */
2
+ /* https://www.npmjs.com/package/@fastnear/borsh-schema/v/0.6.3 */
3
3
  var __defProp = Object.defineProperty;
4
4
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- const getBorshSchema = (() => {
6
- class BorshSchema {
7
- static {
8
- __name(this, "BorshSchema");
9
- }
10
- Ed25519Signature = {
11
- struct: {
12
- data: { array: { type: "u8", len: 64 } }
13
- }
14
- };
15
- Secp256k1Signature = {
16
- struct: {
17
- data: { array: { type: "u8", len: 65 } }
18
- }
19
- };
20
- Signature = {
21
- enum: [
22
- { struct: { ed25519Signature: this.Ed25519Signature } },
23
- { struct: { secp256k1Signature: this.Secp256k1Signature } }
24
- ]
25
- };
26
- Ed25519Data = {
27
- struct: {
28
- data: { array: { type: "u8", len: 32 } }
29
- }
30
- };
31
- Secp256k1Data = {
32
- struct: {
33
- data: { array: { type: "u8", len: 64 } }
34
- }
35
- };
36
- PublicKey = {
37
- enum: [
38
- { struct: { ed25519Key: this.Ed25519Data } },
39
- { struct: { secp256k1Key: this.Secp256k1Data } }
40
- ]
41
- };
42
- FunctionCallPermission = {
43
- struct: {
44
- allowance: { option: "u128" },
45
- receiverId: "string",
46
- methodNames: { array: { type: "string" } }
47
- }
48
- };
49
- FullAccessPermission = {
50
- struct: {}
51
- };
52
- AccessKeyPermission = {
53
- enum: [
54
- { struct: { functionCall: this.FunctionCallPermission } },
55
- { struct: { fullAccess: this.FullAccessPermission } }
56
- ]
57
- };
58
- AccessKey = {
59
- struct: {
60
- nonce: "u64",
61
- permission: this.AccessKeyPermission
62
- }
63
- };
64
- CreateAccount = {
65
- struct: {}
66
- };
67
- DeployContract = {
68
- struct: {
69
- code: { array: { type: "u8" } }
70
- }
71
- };
72
- FunctionCall = {
73
- struct: {
74
- methodName: "string",
75
- args: { array: { type: "u8" } },
76
- gas: "u64",
77
- deposit: "u128"
78
- }
79
- };
80
- Transfer = {
81
- struct: {
82
- deposit: "u128"
83
- }
84
- };
85
- Stake = {
86
- struct: {
87
- stake: "u128",
88
- publicKey: this.PublicKey
89
- }
90
- };
91
- AddKey = {
92
- struct: {
93
- publicKey: this.PublicKey,
94
- accessKey: this.AccessKey
95
- }
96
- };
97
- DeleteKey = {
98
- struct: {
99
- publicKey: this.PublicKey
100
- }
101
- };
102
- DeleteAccount = {
103
- struct: {
104
- beneficiaryId: "string"
105
- }
106
- };
107
- ClassicAction = {
108
- enum: [
109
- { struct: { createAccount: this.CreateAccount } },
110
- { struct: { deployContract: this.DeployContract } },
111
- { struct: { functionCall: this.FunctionCall } },
112
- { struct: { transfer: this.Transfer } },
113
- { struct: { stake: this.Stake } },
114
- { struct: { addKey: this.AddKey } },
115
- { struct: { deleteKey: this.DeleteKey } },
116
- { struct: { deleteAccount: this.DeleteAccount } }
117
- ]
118
- };
119
- DelegateAction = {
120
- struct: {
121
- senderId: "string",
122
- receiverId: "string",
123
- actions: { array: { type: this.ClassicAction } },
124
- nonce: "u64",
125
- maxBlockHeight: "u64",
126
- publicKey: this.PublicKey
127
- }
128
- };
129
- SignedDelegate = {
130
- struct: {
131
- delegateAction: this.DelegateAction,
132
- signature: this.Signature
133
- }
134
- };
135
- Action = {
136
- enum: [
137
- { struct: { createAccount: this.CreateAccount } },
138
- { struct: { deployContract: this.DeployContract } },
139
- { struct: { functionCall: this.FunctionCall } },
140
- { struct: { transfer: this.Transfer } },
141
- { struct: { stake: this.Stake } },
142
- { struct: { addKey: this.AddKey } },
143
- { struct: { deleteKey: this.DeleteKey } },
144
- { struct: { deleteAccount: this.DeleteAccount } },
145
- { struct: { signedDelegate: this.SignedDelegate } }
146
- ]
147
- };
148
- Transaction = {
149
- struct: {
150
- signerId: "string",
151
- publicKey: this.PublicKey,
152
- nonce: "u64",
153
- receiverId: "string",
154
- blockHash: { array: { type: "u8", len: 32 } },
155
- actions: { array: { type: this.Action } }
156
- }
157
- };
158
- SignedTransaction = {
159
- struct: {
160
- transaction: this.Transaction,
161
- signature: this.Signature
162
- }
163
- };
5
+ const nearChainSchema = new class BorshSchema {
6
+ static {
7
+ __name(this, "BorshSchema");
164
8
  }
165
- return new BorshSchema();
166
- })();
9
+ Ed25519Signature = {
10
+ struct: {
11
+ data: { array: { type: "u8", len: 64 } }
12
+ }
13
+ };
14
+ Secp256k1Signature = {
15
+ struct: {
16
+ data: { array: { type: "u8", len: 65 } }
17
+ }
18
+ };
19
+ Signature = {
20
+ enum: [
21
+ { struct: { ed25519Signature: this.Ed25519Signature } },
22
+ { struct: { secp256k1Signature: this.Secp256k1Signature } }
23
+ ]
24
+ };
25
+ Ed25519Data = {
26
+ struct: {
27
+ data: { array: { type: "u8", len: 32 } }
28
+ }
29
+ };
30
+ Secp256k1Data = {
31
+ struct: {
32
+ data: { array: { type: "u8", len: 64 } }
33
+ }
34
+ };
35
+ PublicKey = {
36
+ enum: [
37
+ { struct: { ed25519Key: this.Ed25519Data } },
38
+ { struct: { secp256k1Key: this.Secp256k1Data } }
39
+ ]
40
+ };
41
+ FunctionCallPermission = {
42
+ struct: {
43
+ allowance: { option: "u128" },
44
+ receiverId: "string",
45
+ methodNames: { array: { type: "string" } }
46
+ }
47
+ };
48
+ FullAccessPermission = {
49
+ struct: {}
50
+ };
51
+ AccessKeyPermission = {
52
+ enum: [
53
+ { struct: { functionCall: this.FunctionCallPermission } },
54
+ { struct: { fullAccess: this.FullAccessPermission } }
55
+ ]
56
+ };
57
+ AccessKey = {
58
+ struct: {
59
+ nonce: "u64",
60
+ permission: this.AccessKeyPermission
61
+ }
62
+ };
63
+ CreateAccount = {
64
+ struct: {}
65
+ };
66
+ DeployContract = {
67
+ struct: {
68
+ code: { array: { type: "u8" } }
69
+ }
70
+ };
71
+ FunctionCall = {
72
+ struct: {
73
+ methodName: "string",
74
+ args: { array: { type: "u8" } },
75
+ gas: "u64",
76
+ deposit: "u128"
77
+ }
78
+ };
79
+ Transfer = {
80
+ struct: {
81
+ deposit: "u128"
82
+ }
83
+ };
84
+ Stake = {
85
+ struct: {
86
+ stake: "u128",
87
+ publicKey: this.PublicKey
88
+ }
89
+ };
90
+ AddKey = {
91
+ struct: {
92
+ publicKey: this.PublicKey,
93
+ accessKey: this.AccessKey
94
+ }
95
+ };
96
+ DeleteKey = {
97
+ struct: {
98
+ publicKey: this.PublicKey
99
+ }
100
+ };
101
+ DeleteAccount = {
102
+ struct: {
103
+ beneficiaryId: "string"
104
+ }
105
+ };
106
+ ClassicAction = {
107
+ enum: [
108
+ { struct: { createAccount: this.CreateAccount } },
109
+ { struct: { deployContract: this.DeployContract } },
110
+ { struct: { functionCall: this.FunctionCall } },
111
+ { struct: { transfer: this.Transfer } },
112
+ { struct: { stake: this.Stake } },
113
+ { struct: { addKey: this.AddKey } },
114
+ { struct: { deleteKey: this.DeleteKey } },
115
+ { struct: { deleteAccount: this.DeleteAccount } }
116
+ ]
117
+ };
118
+ DelegateAction = {
119
+ struct: {
120
+ senderId: "string",
121
+ receiverId: "string",
122
+ actions: { array: { type: this.ClassicAction } },
123
+ nonce: "u64",
124
+ maxBlockHeight: "u64",
125
+ publicKey: this.PublicKey
126
+ }
127
+ };
128
+ SignedDelegate = {
129
+ struct: {
130
+ delegateAction: this.DelegateAction,
131
+ signature: this.Signature
132
+ }
133
+ };
134
+ Action = {
135
+ enum: [
136
+ { struct: { createAccount: this.CreateAccount } },
137
+ { struct: { deployContract: this.DeployContract } },
138
+ { struct: { functionCall: this.FunctionCall } },
139
+ { struct: { transfer: this.Transfer } },
140
+ { struct: { stake: this.Stake } },
141
+ { struct: { addKey: this.AddKey } },
142
+ { struct: { deleteKey: this.DeleteKey } },
143
+ { struct: { deleteAccount: this.DeleteAccount } },
144
+ { struct: { signedDelegate: this.SignedDelegate } }
145
+ ]
146
+ };
147
+ Transaction = {
148
+ struct: {
149
+ signerId: "string",
150
+ publicKey: this.PublicKey,
151
+ nonce: "u64",
152
+ receiverId: "string",
153
+ blockHash: { array: { type: "u8", len: 32 } },
154
+ actions: { array: { type: this.Action } }
155
+ }
156
+ };
157
+ SignedTransaction = {
158
+ struct: {
159
+ transaction: this.Transaction,
160
+ signature: this.Signature
161
+ }
162
+ };
163
+ }();
164
+ const getBorshSchema = /* @__PURE__ */ __name(() => nearChainSchema, "getBorshSchema");
167
165
  export {
168
- getBorshSchema
166
+ getBorshSchema,
167
+ nearChainSchema
169
168
  };
170
169
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export const getBorshSchema = (() => {\n class BorshSchema {\n Ed25519Signature = {\n struct: {\n data: { array: { type: \"u8\", len: 64 } },\n },\n };\n Secp256k1Signature = {\n struct: {\n data: { array: { type: \"u8\", len: 65 } },\n },\n };\n Signature = {\n enum: [\n { struct: { ed25519Signature: this.Ed25519Signature } },\n { struct: { secp256k1Signature: this.Secp256k1Signature } },\n ],\n };\n Ed25519Data = {\n struct: {\n data: { array: { type: \"u8\", len: 32 } },\n },\n };\n Secp256k1Data = {\n struct: {\n data: { array: { type: \"u8\", len: 64 } },\n },\n };\n PublicKey = {\n enum: [\n { struct: { ed25519Key: this.Ed25519Data } },\n { struct: { secp256k1Key: this.Secp256k1Data } },\n ],\n };\n FunctionCallPermission = {\n struct: {\n allowance: { option: \"u128\" },\n receiverId: \"string\",\n methodNames: { array: { type: \"string\" } },\n },\n };\n FullAccessPermission = {\n struct: {},\n };\n AccessKeyPermission = {\n enum: [\n { struct: { functionCall: this.FunctionCallPermission } },\n { struct: { fullAccess: this.FullAccessPermission } },\n ],\n };\n AccessKey = {\n struct: {\n nonce: \"u64\",\n permission: this.AccessKeyPermission,\n },\n };\n CreateAccount = {\n struct: {},\n };\n DeployContract = {\n struct: {\n code: { array: { type: \"u8\" } },\n },\n };\n FunctionCall = {\n struct: {\n methodName: \"string\",\n args: { array: { type: \"u8\" } },\n gas: \"u64\",\n deposit: \"u128\",\n },\n };\n Transfer = {\n struct: {\n deposit: \"u128\",\n },\n };\n Stake = {\n struct: {\n stake: \"u128\",\n publicKey: this.PublicKey,\n },\n };\n AddKey = {\n struct: {\n publicKey: this.PublicKey,\n accessKey: this.AccessKey,\n },\n };\n DeleteKey = {\n struct: {\n publicKey: this.PublicKey,\n },\n };\n DeleteAccount = {\n struct: {\n beneficiaryId: \"string\",\n },\n };\n ClassicAction = {\n enum: [\n { struct: { createAccount: this.CreateAccount } },\n { struct: { deployContract: this.DeployContract } },\n { struct: { functionCall: this.FunctionCall } },\n { struct: { transfer: this.Transfer } },\n { struct: { stake: this.Stake } },\n { struct: { addKey: this.AddKey } },\n { struct: { deleteKey: this.DeleteKey } },\n { struct: { deleteAccount: this.DeleteAccount } },\n ],\n };\n DelegateAction = {\n struct: {\n senderId: \"string\",\n receiverId: \"string\",\n actions: { array: { type: this.ClassicAction } },\n nonce: \"u64\",\n maxBlockHeight: \"u64\",\n publicKey: this.PublicKey,\n },\n };\n SignedDelegate = {\n struct: {\n delegateAction: this.DelegateAction,\n signature: this.Signature,\n },\n };\n Action = {\n enum: [\n { struct: { createAccount: this.CreateAccount } },\n { struct: { deployContract: this.DeployContract } },\n { struct: { functionCall: this.FunctionCall } },\n { struct: { transfer: this.Transfer } },\n { struct: { stake: this.Stake } },\n { struct: { addKey: this.AddKey } },\n { struct: { deleteKey: this.DeleteKey } },\n { struct: { deleteAccount: this.DeleteAccount } },\n { struct: { signedDelegate: this.SignedDelegate } },\n ],\n };\n Transaction = {\n struct: {\n signerId: \"string\",\n publicKey: this.PublicKey,\n nonce: \"u64\",\n receiverId: \"string\",\n blockHash: { array: { type: \"u8\", len: 32 } },\n actions: { array: { type: this.Action } },\n },\n };\n SignedTransaction = {\n struct: {\n transaction: this.Transaction,\n signature: this.Signature,\n },\n };\n }\n return new BorshSchema();\n})();\n"],"mappings":";;;;AAAO,MAAM,kBAAkB,MAAM;AAAA,EACnC,MAAM,YAAY;AAAA,IADpB,OACoB;AAAA;AAAA;AAAA,IAChB,mBAAmB;AAAA,MACjB,QAAQ;AAAA,QACN,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,KAAK,GAAG,EAAE;AAAA,MACzC;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB,QAAQ;AAAA,QACN,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,KAAK,GAAG,EAAE;AAAA,MACzC;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,EAAE,QAAQ,EAAE,kBAAkB,KAAK,iBAAiB,EAAE;AAAA,QACtD,EAAE,QAAQ,EAAE,oBAAoB,KAAK,mBAAmB,EAAE;AAAA,MAC5D;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ,QAAQ;AAAA,QACN,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,KAAK,GAAG,EAAE;AAAA,MACzC;AAAA,IACF;AAAA,IACA,gBAAgB;AAAA,MACd,QAAQ;AAAA,QACN,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,KAAK,GAAG,EAAE;AAAA,MACzC;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,EAAE,QAAQ,EAAE,YAAY,KAAK,YAAY,EAAE;AAAA,QAC3C,EAAE,QAAQ,EAAE,cAAc,KAAK,cAAc,EAAE;AAAA,MACjD;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB,QAAQ;AAAA,QACN,WAAW,EAAE,QAAQ,OAAO;AAAA,QAC5B,YAAY;AAAA,QACZ,aAAa,EAAE,OAAO,EAAE,MAAM,SAAS,EAAE;AAAA,MAC3C;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eAAe,EAAE;AAAA,MACpD;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ,QAAQ;AAAA,QACN,UAAU;AAAA,QACV,WAAW,KAAK;AAAA,QAChB,OAAO;AAAA,QACP,YAAY;AAAA,QACZ,WAAW,EAAE,OAAO,EAAE,MAAM,MAAM,KAAK,GAAG,EAAE;AAAA,QAC5C,SAAS,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,EAAE;AAAA,MAC1C;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB,QAAQ;AAAA,QACN,aAAa,KAAK;AAAA,QAClB,WAAW,KAAK;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AACA,SAAO,IAAI,YAAY;AACzB,GAAG;","names":[]}
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import { Schema } from \"borsh\"\n\nexport const nearChainSchema = new (class BorshSchema {\n Ed25519Signature: Schema = {\n struct: {\n data: { array: { type: \"u8\", len: 64 } },\n },\n };\n Secp256k1Signature: Schema = {\n struct: {\n data: { array: { type: \"u8\", len: 65 } },\n },\n };\n Signature: Schema = {\n enum: [\n { struct: { ed25519Signature: this.Ed25519Signature } },\n { struct: { secp256k1Signature: this.Secp256k1Signature } },\n ],\n };\n Ed25519Data: Schema = {\n struct: {\n data: { array: { type: \"u8\", len: 32 } },\n },\n };\n Secp256k1Data: Schema = {\n struct: {\n data: { array: { type: \"u8\", len: 64 } },\n },\n };\n PublicKey: Schema = {\n enum: [\n { struct: { ed25519Key: this.Ed25519Data } },\n { struct: { secp256k1Key: this.Secp256k1Data } },\n ],\n };\n FunctionCallPermission: Schema = {\n struct: {\n allowance: { option: \"u128\" },\n receiverId: \"string\",\n methodNames: { array: { type: \"string\" } },\n },\n };\n FullAccessPermission: Schema = {\n struct: {},\n };\n AccessKeyPermission: Schema = {\n enum: [\n { struct: { functionCall: this.FunctionCallPermission } },\n { struct: { fullAccess: this.FullAccessPermission } },\n ],\n };\n AccessKey: Schema = {\n struct: {\n nonce: \"u64\",\n permission: this.AccessKeyPermission,\n },\n };\n CreateAccount: Schema = {\n struct: {},\n };\n DeployContract: Schema = {\n struct: {\n code: { array: { type: \"u8\" } },\n },\n };\n FunctionCall: Schema = {\n struct: {\n methodName: \"string\",\n args: { array: { type: \"u8\" } },\n gas: \"u64\",\n deposit: \"u128\",\n },\n };\n Transfer: Schema = {\n struct: {\n deposit: \"u128\",\n },\n };\n Stake: Schema = {\n struct: {\n stake: \"u128\",\n publicKey: this.PublicKey,\n },\n };\n AddKey: Schema = {\n struct: {\n publicKey: this.PublicKey,\n accessKey: this.AccessKey,\n },\n };\n DeleteKey: Schema = {\n struct: {\n publicKey: this.PublicKey,\n },\n };\n DeleteAccount: Schema = {\n struct: {\n beneficiaryId: \"string\",\n },\n };\n ClassicAction: Schema = {\n enum: [\n { struct: { createAccount: this.CreateAccount } },\n { struct: { deployContract: this.DeployContract } },\n { struct: { functionCall: this.FunctionCall } },\n { struct: { transfer: this.Transfer } },\n { struct: { stake: this.Stake } },\n { struct: { addKey: this.AddKey } },\n { struct: { deleteKey: this.DeleteKey } },\n { struct: { deleteAccount: this.DeleteAccount } },\n ],\n };\n DelegateAction: Schema = {\n struct: {\n senderId: \"string\",\n receiverId: \"string\",\n actions: { array: { type: this.ClassicAction } },\n nonce: \"u64\",\n maxBlockHeight: \"u64\",\n publicKey: this.PublicKey,\n },\n };\n SignedDelegate: Schema = {\n struct: {\n delegateAction: this.DelegateAction,\n signature: this.Signature,\n },\n };\n Action: Schema = {\n enum: [\n { struct: { createAccount: this.CreateAccount } },\n { struct: { deployContract: this.DeployContract } },\n { struct: { functionCall: this.FunctionCall } },\n { struct: { transfer: this.Transfer } },\n { struct: { stake: this.Stake } },\n { struct: { addKey: this.AddKey } },\n { struct: { deleteKey: this.DeleteKey } },\n { struct: { deleteAccount: this.DeleteAccount } },\n { struct: { signedDelegate: this.SignedDelegate } },\n ],\n };\n Transaction: Schema = {\n struct: {\n signerId: \"string\",\n publicKey: this.PublicKey,\n nonce: \"u64\",\n receiverId: \"string\",\n blockHash: { array: { type: \"u8\", len: 32 } },\n actions: { array: { type: this.Action } },\n },\n };\n SignedTransaction: Schema = {\n struct: {\n transaction: this.Transaction,\n signature: this.Signature,\n },\n };\n})();\n\nexport const getBorshSchema = () => nearChainSchema;\n"],"mappings":";;;;AAEO,MAAM,kBAAkB,IAAK,MAAM,YAAY;AAAA,EAFtD,OAEsD;AAAA;AAAA;AAAA,EACpD,mBAA2B;AAAA,IACzB,QAAQ;AAAA,MACN,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,KAAK,GAAG,EAAE;AAAA,IACzC;AAAA,EACF;AAAA,EACA,qBAA6B;AAAA,IAC3B,QAAQ;AAAA,MACN,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,KAAK,GAAG,EAAE;AAAA,IACzC;AAAA,EACF;AAAA,EACA,YAAoB;AAAA,IAClB,MAAM;AAAA,MACJ,EAAE,QAAQ,EAAE,kBAAkB,KAAK,iBAAiB,EAAE;AAAA,MACtD,EAAE,QAAQ,EAAE,oBAAoB,KAAK,mBAAmB,EAAE;AAAA,IAC5D;AAAA,EACF;AAAA,EACA,cAAsB;AAAA,IACpB,QAAQ;AAAA,MACN,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,KAAK,GAAG,EAAE;AAAA,IACzC;AAAA,EACF;AAAA,EACA,gBAAwB;AAAA,IACtB,QAAQ;AAAA,MACN,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,KAAK,GAAG,EAAE;AAAA,IACzC;AAAA,EACF;AAAA,EACA,YAAoB;AAAA,IAClB,MAAM;AAAA,MACJ,EAAE,QAAQ,EAAE,YAAY,KAAK,YAAY,EAAE;AAAA,MAC3C,EAAE,QAAQ,EAAE,cAAc,KAAK,cAAc,EAAE;AAAA,IACjD;AAAA,EACF;AAAA,EACA,yBAAiC;AAAA,IAC/B,QAAQ;AAAA,MACN,WAAW,EAAE,QAAQ,OAAO;AAAA,MAC5B,YAAY;AAAA,MACZ,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