This repository was archived by the owner on May 7, 2022. It is now read-only.
File tree 6 files changed +23
-87
lines changed
6 files changed +23
-87
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " rss3-next " ,
2
+ "name" : " rss3" ,
3
3
"version" : " 0.7.0" ,
4
4
"description" : " " ,
5
5
"main" : " dist/index.js" ,
6
- "types" : " types/index.d.ts" ,
7
6
"files" : [
8
7
" src" ,
9
8
" dist" ,
Original file line number Diff line number Diff line change 1
1
import type { AnyObject } from '../types/extend' ;
2
2
import Main from './index' ;
3
- import { IOptionsMnemonic , IOptionsPrivateKey , IOptionsSign } from '../types ' ;
3
+ import { IOptionsMnemonic , IOptionsPrivateKey , IOptionsSign } from './index ' ;
4
4
import { ethers } from 'ethers' ;
5
5
import utils from './utils' ;
6
6
import nacl from 'tweetnacl' ;
Original file line number Diff line number Diff line change @@ -5,7 +5,25 @@ import Items from './items';
5
5
import Links from './links' ;
6
6
import Backlinks from './backlinks' ;
7
7
import Assets from './assets' ;
8
- import { IOptionsMnemonic , IOptionsPrivateKey , IOptionsSign } from '../types' ;
8
+
9
+ interface IOptions {
10
+ endpoint : string ;
11
+ agentSign ?: boolean ;
12
+ }
13
+
14
+ export interface IOptionsMnemonic extends IOptions {
15
+ mnemonic ?: string ;
16
+ mnemonicPath ?: string ;
17
+ }
18
+
19
+ export interface IOptionsPrivateKey extends IOptions {
20
+ privateKey : string ;
21
+ }
22
+
23
+ export interface IOptionsSign extends IOptions {
24
+ address : string ;
25
+ sign : ( data : string ) => Promise < string > ;
26
+ }
9
27
10
28
class RSS3 {
11
29
options : IOptionsMnemonic | IOptionsPrivateKey | IOptionsSign ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import Cookies from 'js-cookie';
2
2
import md5 from 'crypto-js/md5' ;
3
3
import config from '../config' ;
4
4
5
- interface IStorageData {
5
+ export interface IStorageData {
6
6
privateKey : string ;
7
7
publicKey : string ;
8
8
}
Original file line number Diff line number Diff line change 6
6
"allowSyntheticDefaultImports" : true ,
7
7
"strictPropertyInitialization" : false ,
8
8
"target" : " esnext" ,
9
+ "declaration" : true ,
9
10
"noImplicitAny" : true ,
10
11
"moduleResolution" : " node" ,
11
12
"sourceMap" : false ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments