@imfact/account-abstraction 1.0.0 → 1.0.1

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.
@@ -128,10 +128,10 @@ const PCODE = {
128
128
  description: "Ambiguous error",
129
129
  subject: "",
130
130
  },
131
- MITUM_CORE: {
132
- code: "P0M",
133
- keyword: [""],
134
- description: "Error from Mitum core",
131
+ MITUM_NETWORK: {
132
+ code: "P0N",
133
+ keyword: ["Too Many Requests"],
134
+ description: "Error from network",
135
135
  subject: "",
136
136
  },
137
137
  UNDEFINED: {
@@ -345,6 +345,12 @@ const DCODE = {
345
345
  description: "The state already exists on the blockchain.",
346
346
  subject: ""
347
347
  },
348
+ EXIST_FACT_HASH: {
349
+ code: "D509",
350
+ keyword: ["already in state"],
351
+ description: "The operation exists on the blockchain. Check it using fact hash",
352
+ subject: ""
353
+ }
348
354
  };
349
355
  const assignCodeFromErrorMessage = (errorMessage) => {
350
356
  const findCode = (codeSet, errorMessage) => {
@@ -4210,7 +4216,7 @@ class Document {
4210
4216
  obj.service = this.service.map(s => s.toHintedObject());
4211
4217
  }
4212
4218
  else {
4213
- obj.service = null;
4219
+ obj.service = [];
4214
4220
  }
4215
4221
  return obj;
4216
4222
  }
@@ -113,10 +113,10 @@ const PCODE = {
113
113
  description: "Ambiguous error",
114
114
  subject: "",
115
115
  },
116
- MITUM_CORE: {
117
- code: "P0M",
118
- keyword: [""],
119
- description: "Error from Mitum core",
116
+ MITUM_NETWORK: {
117
+ code: "P0N",
118
+ keyword: ["Too Many Requests"],
119
+ description: "Error from network",
120
120
  subject: "",
121
121
  },
122
122
  UNDEFINED: {
@@ -330,6 +330,12 @@ const DCODE = {
330
330
  description: "The state already exists on the blockchain.",
331
331
  subject: ""
332
332
  },
333
+ EXIST_FACT_HASH: {
334
+ code: "D509",
335
+ keyword: ["already in state"],
336
+ description: "The operation exists on the blockchain. Check it using fact hash",
337
+ subject: ""
338
+ }
333
339
  };
334
340
  const assignCodeFromErrorMessage = (errorMessage) => {
335
341
  const findCode = (codeSet, errorMessage) => {
@@ -4195,7 +4201,7 @@ class Document {
4195
4201
  obj.service = this.service.map(s => s.toHintedObject());
4196
4202
  }
4197
4203
  else {
4198
- obj.service = null;
4204
+ obj.service = [];
4199
4205
  }
4200
4206
  return obj;
4201
4207
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imfact/account-abstraction",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "framework for mitum network",
5
5
  "main": "dist/bundle.cjs.cjs",
6
6
  "module": "dist/bundle.esm.mjs",