@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.
@@ -1,5 +1,6 @@
1
- /* ⋈ 🏃🏻💨 FastNEAR Borsh Schema - CJS (@fastnear/borsh-schema version 0.6.1) */
2
- /* https://www.npmjs.com/package/@fastnear/borsh-schema/v/0.6.1 */
1
+ /* ⋈ 🏃🏻💨 FastNEAR Borsh Schema - CJS (@fastnear/borsh-schema version 0.6.3) */
2
+ /* https://www.npmjs.com/package/@fastnear/borsh-schema/v/0.6.3 */
3
+ "use strict";
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -20,173 +21,173 @@ var __copyProps = (to, from, except, desc) => {
20
21
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
22
  var src_exports = {};
22
23
  __export(src_exports, {
23
- getBorshSchema: () => getBorshSchema
24
+ getBorshSchema: () => getBorshSchema,
25
+ nearChainSchema: () => nearChainSchema
24
26
  });
25
27
  module.exports = __toCommonJS(src_exports);
26
- const getBorshSchema = (() => {
27
- class BorshSchema {
28
- static {
29
- __name(this, "BorshSchema");
30
- }
31
- Ed25519Signature = {
32
- struct: {
33
- data: { array: { type: "u8", len: 64 } }
34
- }
35
- };
36
- Secp256k1Signature = {
37
- struct: {
38
- data: { array: { type: "u8", len: 65 } }
39
- }
40
- };
41
- Signature = {
42
- enum: [
43
- { struct: { ed25519Signature: this.Ed25519Signature } },
44
- { struct: { secp256k1Signature: this.Secp256k1Signature } }
45
- ]
46
- };
47
- Ed25519Data = {
48
- struct: {
49
- data: { array: { type: "u8", len: 32 } }
50
- }
51
- };
52
- Secp256k1Data = {
53
- struct: {
54
- data: { array: { type: "u8", len: 64 } }
55
- }
56
- };
57
- PublicKey = {
58
- enum: [
59
- { struct: { ed25519Key: this.Ed25519Data } },
60
- { struct: { secp256k1Key: this.Secp256k1Data } }
61
- ]
62
- };
63
- FunctionCallPermission = {
64
- struct: {
65
- allowance: { option: "u128" },
66
- receiverId: "string",
67
- methodNames: { array: { type: "string" } }
68
- }
69
- };
70
- FullAccessPermission = {
71
- struct: {}
72
- };
73
- AccessKeyPermission = {
74
- enum: [
75
- { struct: { functionCall: this.FunctionCallPermission } },
76
- { struct: { fullAccess: this.FullAccessPermission } }
77
- ]
78
- };
79
- AccessKey = {
80
- struct: {
81
- nonce: "u64",
82
- permission: this.AccessKeyPermission
83
- }
84
- };
85
- CreateAccount = {
86
- struct: {}
87
- };
88
- DeployContract = {
89
- struct: {
90
- code: { array: { type: "u8" } }
91
- }
92
- };
93
- FunctionCall = {
94
- struct: {
95
- methodName: "string",
96
- args: { array: { type: "u8" } },
97
- gas: "u64",
98
- deposit: "u128"
99
- }
100
- };
101
- Transfer = {
102
- struct: {
103
- deposit: "u128"
104
- }
105
- };
106
- Stake = {
107
- struct: {
108
- stake: "u128",
109
- publicKey: this.PublicKey
110
- }
111
- };
112
- AddKey = {
113
- struct: {
114
- publicKey: this.PublicKey,
115
- accessKey: this.AccessKey
116
- }
117
- };
118
- DeleteKey = {
119
- struct: {
120
- publicKey: this.PublicKey
121
- }
122
- };
123
- DeleteAccount = {
124
- struct: {
125
- beneficiaryId: "string"
126
- }
127
- };
128
- ClassicAction = {
129
- enum: [
130
- { struct: { createAccount: this.CreateAccount } },
131
- { struct: { deployContract: this.DeployContract } },
132
- { struct: { functionCall: this.FunctionCall } },
133
- { struct: { transfer: this.Transfer } },
134
- { struct: { stake: this.Stake } },
135
- { struct: { addKey: this.AddKey } },
136
- { struct: { deleteKey: this.DeleteKey } },
137
- { struct: { deleteAccount: this.DeleteAccount } }
138
- ]
139
- };
140
- DelegateAction = {
141
- struct: {
142
- senderId: "string",
143
- receiverId: "string",
144
- actions: { array: { type: this.ClassicAction } },
145
- nonce: "u64",
146
- maxBlockHeight: "u64",
147
- publicKey: this.PublicKey
148
- }
149
- };
150
- SignedDelegate = {
151
- struct: {
152
- delegateAction: this.DelegateAction,
153
- signature: this.Signature
154
- }
155
- };
156
- Action = {
157
- enum: [
158
- { struct: { createAccount: this.CreateAccount } },
159
- { struct: { deployContract: this.DeployContract } },
160
- { struct: { functionCall: this.FunctionCall } },
161
- { struct: { transfer: this.Transfer } },
162
- { struct: { stake: this.Stake } },
163
- { struct: { addKey: this.AddKey } },
164
- { struct: { deleteKey: this.DeleteKey } },
165
- { struct: { deleteAccount: this.DeleteAccount } },
166
- { struct: { signedDelegate: this.SignedDelegate } }
167
- ]
168
- };
169
- Transaction = {
170
- struct: {
171
- signerId: "string",
172
- publicKey: this.PublicKey,
173
- nonce: "u64",
174
- receiverId: "string",
175
- blockHash: { array: { type: "u8", len: 32 } },
176
- actions: { array: { type: this.Action } }
177
- }
178
- };
179
- SignedTransaction = {
180
- struct: {
181
- transaction: this.Transaction,
182
- signature: this.Signature
183
- }
184
- };
28
+ const nearChainSchema = new class BorshSchema {
29
+ static {
30
+ __name(this, "BorshSchema");
185
31
  }
186
- return new BorshSchema();
187
- })();
32
+ Ed25519Signature = {
33
+ struct: {
34
+ data: { array: { type: "u8", len: 64 } }
35
+ }
36
+ };
37
+ Secp256k1Signature = {
38
+ struct: {
39
+ data: { array: { type: "u8", len: 65 } }
40
+ }
41
+ };
42
+ Signature = {
43
+ enum: [
44
+ { struct: { ed25519Signature: this.Ed25519Signature } },
45
+ { struct: { secp256k1Signature: this.Secp256k1Signature } }
46
+ ]
47
+ };
48
+ Ed25519Data = {
49
+ struct: {
50
+ data: { array: { type: "u8", len: 32 } }
51
+ }
52
+ };
53
+ Secp256k1Data = {
54
+ struct: {
55
+ data: { array: { type: "u8", len: 64 } }
56
+ }
57
+ };
58
+ PublicKey = {
59
+ enum: [
60
+ { struct: { ed25519Key: this.Ed25519Data } },
61
+ { struct: { secp256k1Key: this.Secp256k1Data } }
62
+ ]
63
+ };
64
+ FunctionCallPermission = {
65
+ struct: {
66
+ allowance: { option: "u128" },
67
+ receiverId: "string",
68
+ methodNames: { array: { type: "string" } }
69
+ }
70
+ };
71
+ FullAccessPermission = {
72
+ struct: {}
73
+ };
74
+ AccessKeyPermission = {
75
+ enum: [
76
+ { struct: { functionCall: this.FunctionCallPermission } },
77
+ { struct: { fullAccess: this.FullAccessPermission } }
78
+ ]
79
+ };
80
+ AccessKey = {
81
+ struct: {
82
+ nonce: "u64",
83
+ permission: this.AccessKeyPermission
84
+ }
85
+ };
86
+ CreateAccount = {
87
+ struct: {}
88
+ };
89
+ DeployContract = {
90
+ struct: {
91
+ code: { array: { type: "u8" } }
92
+ }
93
+ };
94
+ FunctionCall = {
95
+ struct: {
96
+ methodName: "string",
97
+ args: { array: { type: "u8" } },
98
+ gas: "u64",
99
+ deposit: "u128"
100
+ }
101
+ };
102
+ Transfer = {
103
+ struct: {
104
+ deposit: "u128"
105
+ }
106
+ };
107
+ Stake = {
108
+ struct: {
109
+ stake: "u128",
110
+ publicKey: this.PublicKey
111
+ }
112
+ };
113
+ AddKey = {
114
+ struct: {
115
+ publicKey: this.PublicKey,
116
+ accessKey: this.AccessKey
117
+ }
118
+ };
119
+ DeleteKey = {
120
+ struct: {
121
+ publicKey: this.PublicKey
122
+ }
123
+ };
124
+ DeleteAccount = {
125
+ struct: {
126
+ beneficiaryId: "string"
127
+ }
128
+ };
129
+ ClassicAction = {
130
+ enum: [
131
+ { struct: { createAccount: this.CreateAccount } },
132
+ { struct: { deployContract: this.DeployContract } },
133
+ { struct: { functionCall: this.FunctionCall } },
134
+ { struct: { transfer: this.Transfer } },
135
+ { struct: { stake: this.Stake } },
136
+ { struct: { addKey: this.AddKey } },
137
+ { struct: { deleteKey: this.DeleteKey } },
138
+ { struct: { deleteAccount: this.DeleteAccount } }
139
+ ]
140
+ };
141
+ DelegateAction = {
142
+ struct: {
143
+ senderId: "string",
144
+ receiverId: "string",
145
+ actions: { array: { type: this.ClassicAction } },
146
+ nonce: "u64",
147
+ maxBlockHeight: "u64",
148
+ publicKey: this.PublicKey
149
+ }
150
+ };
151
+ SignedDelegate = {
152
+ struct: {
153
+ delegateAction: this.DelegateAction,
154
+ signature: this.Signature
155
+ }
156
+ };
157
+ Action = {
158
+ enum: [
159
+ { struct: { createAccount: this.CreateAccount } },
160
+ { struct: { deployContract: this.DeployContract } },
161
+ { struct: { functionCall: this.FunctionCall } },
162
+ { struct: { transfer: this.Transfer } },
163
+ { struct: { stake: this.Stake } },
164
+ { struct: { addKey: this.AddKey } },
165
+ { struct: { deleteKey: this.DeleteKey } },
166
+ { struct: { deleteAccount: this.DeleteAccount } },
167
+ { struct: { signedDelegate: this.SignedDelegate } }
168
+ ]
169
+ };
170
+ Transaction = {
171
+ struct: {
172
+ signerId: "string",
173
+ publicKey: this.PublicKey,
174
+ nonce: "u64",
175
+ receiverId: "string",
176
+ blockHash: { array: { type: "u8", len: 32 } },
177
+ actions: { array: { type: this.Action } }
178
+ }
179
+ };
180
+ SignedTransaction = {
181
+ struct: {
182
+ transaction: this.Transaction,
183
+ signature: this.Signature
184
+ }
185
+ };
186
+ }();
187
+ const getBorshSchema = /* @__PURE__ */ __name(() => nearChainSchema, "getBorshSchema");
188
188
  // Annotate the CommonJS export names for ESM import in node:
189
189
  0 && (module.exports = {
190
- getBorshSchema
190
+ getBorshSchema,
191
+ nearChainSchema
191
192
  });
192
193
  //# sourceMappingURL=index.cjs.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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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,M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,QAClD,EAAE,QAAQ,EAAE,cAAc,KAAK,aAAa,EAAE;AAAA,QAC9C,EAAE,QAAQ,EAAE,UAAU,KAAK,SAAS,EAAE;AAAA,QACtC,EAAE,QAAQ,EAAE,OAAO,KAAK,MAAM,EAAE;AAAA,QAChC,EAAE,QAAQ,EAAE,QAAQ,KAAK,OAAO,EAAE;AAAA,QAClC,EAAE,QAAQ,EAAE,WAAW,KAAK,UAAU,EAAE;AAAA,QACxC,EAAE,QAAQ,EAAE,eAAe,KAAK,cAAc,EAAE;AAAA,QAChD,EAAE,QAAQ,EAAE,gBAAgB,KAAK,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":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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,E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