@startbahn/startrail-sdk-js 1.30.2-beta.1 → 1.30.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startbahn/startrail-sdk-js",
3
- "version": "1.30.2-beta.1",
3
+ "version": "1.30.2",
4
4
  "description": "Startrail Api for JS SDK",
5
5
  "main": "dist/startrail-sdk.js",
6
6
  "unpkg": "dist/startrail-sdk.js",
@@ -25,63 +25,71 @@
25
25
  "dist/startrail-sdk.js",
26
26
  "types/startrail-sdk-js.d.ts"
27
27
  ],
28
- "author": "Startbahn, Inc. <https://startbahn.jp/>",
28
+ "author": "Startbahn, Inc.",
29
29
  "license": "UNLICENSED",
30
30
  "devDependencies": {
31
- "@babel/runtime": "^7.8.4",
31
+ "@babel/core": "^7.22.10",
32
+ "@babel/preset-env": "^7.22.10",
33
+ "@babel/runtime": "^7.22.10",
32
34
  "@ethersproject/abstract-signer": "^5.7.0",
33
35
  "@ethersproject/bignumber": "^5.7.0",
34
36
  "@ethersproject/bytes": "^5.7.0",
35
37
  "@ethersproject/strings": "^5.7.0",
36
38
  "@types/ethereumjs-util": "^6.1.0",
37
39
  "@types/flat": "^5.0.2",
38
- "@types/jest": "^24.9.0",
39
- "@types/node": "^12.12.25",
40
+ "@types/jest": "^29.5.3",
41
+ "@types/node": "^20.4.9",
40
42
  "@types/web3": "^1.2.2",
41
- "@typescript-eslint/eslint-plugin": "^2.10.0",
42
- "@typescript-eslint/parser": "^2.10.0",
43
+ "@typescript-eslint/eslint-plugin": "^6.3.0",
44
+ "@typescript-eslint/parser": "^6.3.0",
45
+ "babel-loader": "^9.1.3",
43
46
  "brotli-webpack-plugin": "^1.1.0",
44
47
  "dts-bundle": "^0.7.3",
45
- "eslint": "^6.7.2",
46
- "eslint-config-standard": "^14.1.0",
47
- "eslint-plugin-import": "^2.18.2",
48
- "eslint-plugin-node": "^10.0.0",
49
- "eslint-plugin-promise": "^4.2.1",
50
- "eslint-plugin-standard": "^4.0.1",
51
- "husky": "^7.0.0",
52
- "is-mobile": "^3.1.1",
53
- "jest": "^25.1.0",
54
- "terser-webpack-plugin": "^4.2.3",
55
- "ts-jest": "^25.0.0",
56
- "ts-loader": "^6.2.1",
57
- "typescript": "^3.7.2",
58
- "uglify-js": "^3.16.0",
59
- "webpack": "^4.41.2",
60
- "webpack-bundle-analyzer": "^4.5.0",
61
- "webpack-cli": "^3.3.10",
62
- "webpack-dev-server": "^3.10.3"
48
+ "eslint": "^8.46.0",
49
+ "eslint-config-standard": "^17.1.0",
50
+ "eslint-plugin-import": "^2.28.0",
51
+ "eslint-plugin-node": "^11.1.0",
52
+ "eslint-plugin-promise": "^6.1.1",
53
+ "eslint-plugin-standard": "^5.0.0",
54
+ "husky": "^8.0.3",
55
+ "is-mobile": "^4.0.0",
56
+ "jest": "^29.6.2",
57
+ "terser-webpack-plugin": "^5.3.9",
58
+ "ts-jest": "^29.1.1",
59
+ "ts-loader": "^9.4.4",
60
+ "typescript": "^5.1.6",
61
+ "uglify-js": "^3.17.4",
62
+ "webpack": "^5.88.2",
63
+ "webpack-bundle-analyzer": "^4.9.0",
64
+ "webpack-cli": "^5.1.4",
65
+ "webpack-dev-server": "^4.15.1"
63
66
  },
64
67
  "dependencies": {
65
- "@metamask/detect-provider": "^1.2.0",
66
- "@toruslabs/torus-embed": "1.38.7",
67
- "axios": "^0.21.2",
68
- "ethereumjs-util": "^7.1.4",
68
+ "@metamask/detect-provider": "^2.0.0",
69
+ "@toruslabs/torus-embed": "^2.2.6",
70
+ "assert": "^2.0.0",
71
+ "axios": "^1.4.0",
72
+ "browserify-zlib": "^0.2.0",
73
+ "crypto-browserify": "^3.12.0",
74
+ "ethereumjs-util": "^7.1.5",
69
75
  "flat": "^5.0.2",
70
76
  "globalthis": "^1.0.1",
71
- "web3": "^1.3.0"
77
+ "https-browserify": "^1.0.0",
78
+ "os-browserify": "^0.3.0",
79
+ "stream-browserify": "^3.0.0",
80
+ "stream-http": "^3.2.0",
81
+ "vm-browserify": "^1.1.2",
82
+ "web3": "^4.0.3"
72
83
  },
73
84
  "repository": {
74
85
  "type": "git",
75
86
  "url": "git@github.com:startbahn/startrail-sdk-js.git"
76
87
  },
77
- "contributors": [
78
- "Toshiya Matsumoto <toshibowie86@gmail.com>",
79
- "lion-man44 <lion44man@gmail.com>",
80
- "k12u",
81
- "Akihiro Kato <4kihiro.kato@gmail.com>"
82
- ],
83
88
  "jest": {
84
89
  "testEnvironment": "node",
85
90
  "preset": "ts-jest"
91
+ },
92
+ "engines": {
93
+ "node": ">=16.18.1"
86
94
  }
87
- }
95
+ }
@@ -116,12 +116,6 @@ declare module '@startbahn/startrail-sdk-js/types' {
116
116
  }
117
117
  export interface ApproveSRRByCommitment extends ApproveSRRByCommitmentShared, Pick<HTTPHeadersForStartrail, 'startrailLUWContractAddress'> {
118
118
  }
119
- export interface ApproveSRRByCommitmentShared {
120
- preimage: string;
121
- tokenId: string;
122
- metadata: HistoryMetadata;
123
- isHashPreimageEnabled: boolean;
124
- }
125
119
  export interface ApproveSRRByCommitmentDto {
126
120
  metadata: HistoryMetadata;
127
121
  preimage?: string;
@@ -130,6 +124,12 @@ declare module '@startbahn/startrail-sdk-js/types' {
130
124
  export interface ApproveSRRByCommitmentBulkDto extends ApproveSRRByCommitmentDto {
131
125
  tokenId: string;
132
126
  }
127
+ export interface ApproveSRRByCommitmentShared {
128
+ preimage: string;
129
+ tokenId: string;
130
+ metadata: HistoryMetadata;
131
+ isHashPreimageEnabled: boolean;
132
+ }
133
133
  export enum BulkFunctionType {
134
134
  createSRR = "createSRR",
135
135
  approveSRRByCommitment = "approveSRRByCommitment",
@@ -221,15 +221,6 @@ declare module '@startbahn/startrail-sdk-js/types' {
221
221
  remarks?: MultiLanguage;
222
222
  customHistoryId?: number;
223
223
  }
224
- export interface UpdatedHistoryMetadata extends HistoryMetadata {
225
- $schema: string;
226
- }
227
- export interface ApproveSRRByCommitmentWithMetadataUpdate extends ApproveSRRByCommitment {
228
- metadata: UpdatedHistoryMetadata;
229
- }
230
- export interface TransferFromWithProvenanceWithMetadataUpdate extends TransferFromWithProvenance {
231
- metadata: UpdatedHistoryMetadata;
232
- }
233
224
  export interface HTTPConfig {
234
225
  method: string;
235
226
  url: string;
@@ -369,8 +360,6 @@ declare module '@startbahn/startrail-sdk-js/types' {
369
360
  metadata: HistoryMetadata;
370
361
  isIntermediary?: boolean;
371
362
  }
372
- export interface TTransferFromWithProvenanceDto extends Omit<TransferFromWithProvenanceShared, 'tokenId'> {
373
- }
374
363
  export interface typedDataProps {
375
364
  fromAddress?: string;
376
365
  channelId?: string;
@@ -698,7 +687,7 @@ declare module '@startbahn/startrail-sdk-js/service' {
698
687
  */
699
688
  approveSRRByCommitment(args: Type.ApproveSRRByCommitment): Promise<Type.ResponseOfEthStateChange | false>;
700
689
  /**
701
- * @deprecated client will no longer use generate key feature
690
+ * Todo: should share the logic with approveSRRByCommitment
702
691
  * Generate signature fro second transfer
703
692
  * @throws Will throw an error
704
693
  */
@@ -710,9 +699,6 @@ declare module '@startbahn/startrail-sdk-js/service' {
710
699
  addCustomHistoriesToSRRs(args: Type.AddCustomHistoriesToSRRs): Promise<Type.ResponseOfEthStateChange>;
711
700
  transferFromWithProvenance(args: Type.TransferFromWithProvenance): Promise<Type.ResponseOfEthStateChange | false>;
712
701
  bulk(args: Type.Bulk): Promise<Type.ResponseFromBatch | false>;
713
- /**
714
- * Temporary use fetch function to check with React compatibility
715
- */
716
702
  checkERC2981Royalty(args: Type.IERC2981RoyaltyRequest): Promise<Type.IERC2981RoyaltyResponse>;
717
703
  /**
718
704
  * Change language on your browser wallet
@@ -877,10 +863,6 @@ declare module '@startbahn/startrail-sdk-js/transaction' {
877
863
  baseURL: string;
878
864
  constructor(url: string);
879
865
  sendRequest(method: RequestMethod, path: string, options?: HTTPRequest): Promise<any>;
880
- /**
881
- * Concatenate Request URL
882
- */
883
- concatenateUrl(urlPath: string): string;
884
866
  }
885
867
  export = Transaction;
886
868
  }
@@ -1092,7 +1074,7 @@ declare module '@startbahn/startrail-sdk-js/requestAdapter' {
1092
1074
  * HTTP Request with Axios module
1093
1075
  * @throws Will throw an error
1094
1076
  */
1095
- protected makeRequest(method: Method, url: string, options?: HTTPRequest): Promise<AxiosResponse<any>>;
1077
+ protected makeRequest(method: Method, url: string, options?: HTTPRequest): Promise<AxiosResponse<any, any>>;
1096
1078
  /**
1097
1079
  * Adjust the different error response format by Axios
1098
1080
  * @param error