@manahippo/aptos-wallet-adapter 0.1.14 → 0.1.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"AptosWallet.d.ts","sourceRoot":"","sources":["../../src/WalletAdapters/AptosWallet.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EACL,WAAW,EAGX,iBAAiB,EAGjB,UAAU,EACV,gBAAgB,EACjB,MAAM,eAAe,CAAC;AAEvB,UAAU,YAAY;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5C,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/B,WAAW,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACpC,wBAAwB,CAAC,WAAW,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,eAAe,CAAC,WAAW,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAQD,eAAO,MAAM,eAAe,4BAA+C,CAAC;AAE5E,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,kBAAmB,SAAQ,iBAAiB;IACvD,IAAI,6BAAmB;IAEvB,GAAG,SAAwD;IAE3D,IAAI,SAAwE;IAE5E,SAAS,CAAC,SAAS,EAAE,YAAY,GAAG,SAAS,CAAC;IAG9C,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE3B,SAAS,CAAC,WAAW,EAAE,gBAAgB,CAGJ;IAEnC,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC;IAE/B,SAAS,C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WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,kBAAmB,SAAQ,iBAAiB;IACvD,IAAI,6BAAmB;IAEvB,GAAG,SAAwD;IAE3D,IAAI,SAAwE;IAE5E,SAAS,CAAC,SAAS,EAAE,YAAY,GAAG,SAAS,CAAC;IAG9C,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE3B,SAAS,CAAC,WAAW,EAAE,gBAAgB,CAGJ;IAEnC,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC;IAE/B,SAAS,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;gBAElB,EAGV,OAAe,EAChB,GAAE,wBAA6B;IAqBhC,IAAI,aAAa,IAAI,WAAW,CAM/B;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,UAAU,IAAI,gBAAgB,CAEjC;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA6BxB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAgB3B,eAAe,CAAC,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAsBnF,wBAAwB,CAAC,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAsB7F"}
@@ -46,7 +46,7 @@ class AptosWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
46
46
  return {
47
47
  publicKey: ((_a = this._wallet) === null || _a === void 0 ? void 0 : _a.publicKey) || null,
48
48
  address: ((_b = this._wallet) === null || _b === void 0 ? void 0 : _b.address) || null,
49
- authKey: ((_c = this._wallet) === null || _c === void 0 ? void 0 : _c.authcKey) || null
49
+ authKey: ((_c = this._wallet) === null || _c === void 0 ? void 0 : _c.authKey) || null
50
50
  };
51
51
  }
52
52
  get connecting() {
@@ -1 +1 @@
1
- {"version":3,"file":"Aptos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,mBAAmB;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,mBAAoB,SAAQ,iBAAiB;IACxD,IAAI,8BAAoB;IAExB,GAAG,SAAyB;IAE5B,IAAI,SAAwE;IAE5E,SAAS,CAAC,SAAS,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAGlD,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE3B,SAAS,CAAC,WAAW,EAAE,gBAAgB,CAA8B;IAErE,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC;IAE/B,SAAS,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;gBAElB,EAGV,OAAe,EAChB,GAAE,mBAAwB;IA4C3B,IAAI,aAAa,IAAI,WAAW,CAM/B;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,UAAU,IAAI,gBAAgB,CAEjC;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA0BxB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAc3B,eAAe,CAAC,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IA0BnF,wBAAwB,CAAC,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA0B7F"}
@@ -38,8 +38,7 @@ const errors_1 = require("../WalletProviders/errors");
38
38
  const web3_1 = __importStar(require("@fewcha/web3"));
39
39
  const BaseAdapter_1 = require("./BaseAdapter");
40
40
  exports.FewchaWalletName = 'Fewcha Wallet';
41
- const defaultNodeURL = 'https://fullnode.devnet.aptoslabs.com';
42
- const defaultWeb3 = new web3_1.default(new web3_1.Web3Provider(defaultNodeURL));
41
+ const defaultWeb3 = new web3_1.default(new web3_1.Web3Provider(window.fewcha));
43
42
  class FewchaWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
44
43
  constructor({
45
44
  // provider = WEBWALLET_URL,
@@ -58,11 +57,7 @@ class FewchaWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
58
57
  // this._readyState = WalletReadyState.Installed;
59
58
  if (this._readyState !== BaseAdapter_1.WalletReadyState.Unsupported) {
60
59
  (0, BaseAdapter_1.scopePollingDetectionStrategy)(() => {
61
- const wallet = window.fewcha;
62
- if (wallet) {
63
- const provider = new web3_1.Web3Provider(wallet);
64
- const web3 = new web3_1.default(provider);
65
- this._provider = web3.action;
60
+ if (window.fewcha) {
66
61
  this._readyState = BaseAdapter_1.WalletReadyState.Installed;
67
62
  this.emit('readyStateChange', this._readyState);
68
63
  return true;
@@ -74,14 +69,16 @@ class FewchaWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
74
69
  var _a, _b;
75
70
  const publicAccount = yield ((_a = this._provider) === null || _a === void 0 ? void 0 : _a.account());
76
71
  const isConnected = yield ((_b = this._provider) === null || _b === void 0 ? void 0 : _b.isConnected());
77
- console.log('loginnnn>>', publicAccount, publicAccount === null || publicAccount === void 0 ? void 0 : publicAccount.publicKey);
78
- if ((publicAccount === null || publicAccount === void 0 ? void 0 : publicAccount.publicKey) && isConnected) {
79
- this._wallet = Object.assign({ connected: isConnected }, publicAccount);
72
+ if ((publicAccount === null || publicAccount === void 0 ? void 0 : publicAccount.data.publicKey) && isConnected) {
73
+ this._wallet = Object.assign({ connected: isConnected }, publicAccount.data);
80
74
  this.emit('connect', this._wallet.publicKey);
81
75
  }
82
76
  }));
83
77
  window.addEventListener('aptos#transaction', (e) => {
84
- this.emit('success', 'Transaction Success');
78
+ var _a, _b;
79
+ if ((_a = e === null || e === void 0 ? void 0 : e.detail) === null || _a === void 0 ? void 0 : _a.tx) {
80
+ this.emit('success', (_b = e === null || e === void 0 ? void 0 : e.detail) === null || _b === void 0 ? void 0 : _b.tx);
81
+ }
85
82
  });
86
83
  window.addEventListener('aptos#disconnected', () => {
87
84
  this.emit('disconnect');
@@ -92,7 +89,7 @@ class FewchaWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
92
89
  return {
93
90
  publicKey: ((_a = this._wallet) === null || _a === void 0 ? void 0 : _a.publicKey) || null,
94
91
  address: ((_b = this._wallet) === null || _b === void 0 ? void 0 : _b.address) || null,
95
- authKey: ((_c = this._wallet) === null || _c === void 0 ? void 0 : _c.authcKey) || null
92
+ authKey: ((_c = this._wallet) === null || _c === void 0 ? void 0 : _c.authKey) || null
96
93
  };
97
94
  }
98
95
  get connecting() {
@@ -106,6 +103,7 @@ class FewchaWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
106
103
  return this._readyState;
107
104
  }
108
105
  connect() {
106
+ var _a;
109
107
  return __awaiter(this, void 0, void 0, function* () {
110
108
  try {
111
109
  if (this.connected || this.connecting)
@@ -115,6 +113,10 @@ class FewchaWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
115
113
  throw new errors_1.WalletNotReadyError();
116
114
  this._connecting = true;
117
115
  const provider = this._provider;
116
+ const isConnected = yield ((_a = this._provider) === null || _a === void 0 ? void 0 : _a.isConnected());
117
+ if (isConnected) {
118
+ yield (provider === null || provider === void 0 ? void 0 : provider.disconnect());
119
+ }
118
120
  yield (provider === null || provider === void 0 ? void 0 : provider.connect());
119
121
  }
120
122
  catch (error) {
@@ -180,7 +182,9 @@ class FewchaWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
180
182
  this.once('success', resolve);
181
183
  this.once('error', reject);
182
184
  });
183
- return promise;
185
+ return {
186
+ hash: promise
187
+ };
184
188
  }
185
189
  catch (error) {
186
190
  const errMsg = error instanceof Error ? error.message : error.response.data.message;
@@ -1 +1 @@
1
- {"version":3,"file":"FewchaWallet.js","sourceRoot":"","sources":["../../src/WalletAdapters/FewchaWallet.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,6DAAsE;AACtE,sDAKmC;AACnC,qDAAoE;AACpE,+CAOuB;AAEV,QAAA,gBAAgB,GAAG,eAA8C,CAAC;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AAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;wBAC9B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;oBAC7B,CAAC,CAAC,CAAC;oBACH,OAAO;wBACL,IAAI,EAAE,OAAO;qBACQ,CAAC;iBACzB;gBAAC,OAAO,KAAU,EAAE;oBACnB,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;oBACpF,MAAM,IAAI,mCAA0B,CAAC,MAAM,CAAC,CAAC;iBAC9C;aACF;YAAC,OAAO,KAAU,EAAE;gBACnB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;gBAC1B,MAAM,KAAK,CAAC;aACb;QACH,CAAC;KAAA;CACF;AAlLD,kDAkLC"}
@@ -1,12 +1,15 @@
1
+ import { MaybeHexString } from 'aptos';
1
2
  import { PendingTransaction, SubmitTransactionRequest, TransactionPayload } from 'aptos/dist/api/data-contracts';
2
3
  import { AccountKeys, BaseWalletAdapter, WalletName, WalletReadyState } from './BaseAdapter';
3
4
  interface IHippoWallet {
4
5
  connect: () => Promise<{
5
- address: string;
6
+ address: MaybeHexString;
7
+ publicKey: MaybeHexString;
8
+ authKey: MaybeHexString;
6
9
  }>;
7
10
  account: () => Promise<string>;
8
11
  isConnected: () => Promise<boolean>;
9
- signAndSubmitTransaction(transaction: any): Promise<void>;
12
+ signAndSubmitTransaction(transaction: any): Promise<any>;
10
13
  signTransaction(transaction: any): Promise<void>;
11
14
  disconnect(): Promise<void>;
12
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"HippoExtensionWallet.d.ts","sourceRoot":"","sources":["../../src/WalletAdapters/HippoExtensionWallet.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EACnB,M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EnD,IAAI,SAAqF;IAEzF,SAAS,CAAC,SAAS,EAAE,YAAY,GAAG,SAAS,CAAC;IAG9C,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE3B,SAAS,CAAC,WAAW,EAAE,gBAAgB,CAGJ;IAEnC,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC;IAE/B,SAAS,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;gBAElB,EAGV,OAAe,EAChB,GAAE,iCAAsC;IAqBzC,IAAI,aAAa,IAAI,WAAW,CAM/B;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,UAAU,IAAI,gBAAgB,CAEjC;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA6BxB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAgB3B,eAAe,CAAC,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAsBnF,wBAAwB,CAAC,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAsB7F"}
@@ -20,7 +20,7 @@ class HippoExtensionWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
20
20
  timeout = 10000 } = {}) {
21
21
  super();
22
22
  this.name = exports.HippoExtensionWalletName;
23
- this.url = 'https://hippo-wallet-test.web.app';
23
+ this.url = 'https://github.com/hippospace/hippo-wallet';
24
24
  this.icon = 'https://ui-test1-22e7c.web.app/static/media/hippo_logo.ecded6bf411652de9b7f.png';
25
25
  this._readyState = typeof window === 'undefined' || typeof document === 'undefined'
26
26
  ? BaseAdapter_1.WalletReadyState.Unsupported
@@ -46,7 +46,7 @@ class HippoExtensionWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
46
46
  return {
47
47
  publicKey: ((_a = this._wallet) === null || _a === void 0 ? void 0 : _a.publicKey) || null,
48
48
  address: ((_b = this._wallet) === null || _b === void 0 ? void 0 : _b.address) || null,
49
- authKey: ((_c = this._wallet) === null || _c === void 0 ? void 0 : _c.authcKey) || null
49
+ authKey: ((_c = this._wallet) === null || _c === void 0 ? void 0 : _c.authKey) || null
50
50
  };
51
51
  }
52
52
  get connecting() {
@@ -70,10 +70,7 @@ class HippoExtensionWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
70
70
  this._connecting = true;
71
71
  const provider = this._provider || window.hippoWallet;
72
72
  const response = yield (provider === null || provider === void 0 ? void 0 : provider.connect());
73
- this._wallet = {
74
- publicKey: response === null || response === void 0 ? void 0 : response.address,
75
- isConnected: true
76
- };
73
+ this._wallet = Object.assign(Object.assign({}, response), { isConnected: true });
77
74
  this.emit('connect', this._wallet.publicKey);
78
75
  }
79
76
  catch (error) {
@@ -137,14 +134,15 @@ class HippoExtensionWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
137
134
  const provider = this._provider || window.hippoWallet;
138
135
  const response = yield (provider === null || provider === void 0 ? void 0 : provider.signAndSubmitTransaction(transaction));
139
136
  if (response) {
140
- return response;
137
+ return response.detail;
141
138
  }
142
139
  else {
143
140
  throw new Error('Transaction failed');
144
141
  }
145
142
  }
146
143
  catch (error) {
147
- throw new errors_1.WalletSignTransactionError(error.message);
144
+ // console.log('transact err', error, error.message);
145
+ throw new errors_1.WalletSignTransactionError(error.message || error);
148
146
  }
149
147
  }
150
148
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"HippoExtensionWallet.js","sourceRoot":"","sources":["../../src/WalletAdapters/HippoExtensionWallet.ts"],"names":[],"mappings":";;;;;;;;;;;;AAKA,sDAKmC;AACnC,+CAOuB;AAiBV,QAAA,wBAAwB,GACnC,cAA4C,CAAC;AAQ/C,MAAa,2BAA4B,SAAQ,+BAAiB;IAqBhE,YAAY;IACV,YAAY;IACZ,0CAA0C;IAC1C,OAAO,GAAG,KAAK,KACsB,EAAE;QACvC,KAAK,EAAE,CAAC;QAzBV,SAAI,GAAG,gCAAwB,CAAC;QAEhC,QAAG,GAAG,m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AA0B,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,CAAC;iBAC9D;aACF;YAAC,OAAO,KAAU,EAAE;gBACnB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;gBAC1B,MAAM,KAAK,CAAC;aACb;QACH,CAAC;KAAA;CACF;AA3JD,kEA2JC"}
@@ -32,6 +32,9 @@ export declare class HippoWalletAdapter extends BaseWalletAdapter {
32
32
  authKey?: {
33
33
  hexString: MaybeHexString;
34
34
  };
35
+ detail?: {
36
+ hash: MaybeHexString;
37
+ };
35
38
  error?: string;
36
39
  }>) => void;
37
40
  connect(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"HippoWallet.d.ts","sourceRoot":"","sources":["../../src/WalletAdapters/HippoWallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EACL,WAAW,EACX,iBAAiB,EAEjB,UAAU,EACV,gBAAgB,EACjB,MAAM,eAAe,CAAC;AAEvB,eAAO,MAAM,eAAe,gCAAuD,CAAC;AAEpF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,kBAAmB,SAAQ,iBAAiB;IACvD,IAAI,iCAAmB;IAEvB,GAAG,SAAuC;IAE1C,IAAI,SAAqF;IAEzF,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAGxC,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE3B,SAAS,CAAC,WAAW,EAAE,gBAAgB,CAA8B;IAErE,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC;IAE/B,SAAS,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;gBAElB,EAGV,OAAe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 class HippoWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
36
36
  this.emit('connect', this._wallet);
37
37
  }
38
38
  else if (e.data.method === 'success') {
39
- this.emit('success', 'Transaction Success');
39
+ this.emit('success', e.data.detail);
40
40
  }
41
41
  else if (e.data.method === 'fail') {
42
42
  this.emit('error', new errors_1.WalletSignAndSubmitMessageError(e.data.error));
@@ -61,7 +61,7 @@ class HippoWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
61
61
  return {
62
62
  publicKey: ((_a = this._wallet) === null || _a === void 0 ? void 0 : _a.publicKey) || null,
63
63
  address: ((_b = this._wallet) === null || _b === void 0 ? void 0 : _b.address) || null,
64
- authKey: ((_c = this._wallet) === null || _c === void 0 ? void 0 : _c.authcKey) || null
64
+ authKey: ((_c = this._wallet) === null || _c === void 0 ? void 0 : _c.authKey) || null
65
65
  };
66
66
  }
67
67
  get connecting() {
@@ -111,7 +111,8 @@ class HippoWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
111
111
  method: 'signTransaction',
112
112
  payload: transaction
113
113
  }),
114
- origin: window.location.origin
114
+ origin: window.location.origin,
115
+ isPopUp: 'true'
115
116
  }).toString();
116
117
  const popup = window.open(`${aptosConstants_1.WEBWALLET_URL}?${request}`, 'Transaction Confirmation', 'scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=440,height=700');
117
118
  if (!popup)
@@ -1 +1 @@
1
- {"version":3,"file":"HippoWallet.js","sourceRoot":"","sources":["../../src/WalletAdapters/HippoWallet.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,6DAAyD;AACzD,sDAImC;AACnC,+CAMuB;AAEV,QAAA,eAAe,GAAG,kBAAoD,CAAC;AAQpF,MAAa,kBAAmB,SAAQ,+BAAiB;IAkBvD,YAAY;IACV,4BAA4B;IAC5B,0CAA0C;IAC1C,OAAO,GAAG,KAAK,KACa,EAAE;QAC9B,KAAK,EAAE,CAAC;QAtBV,SAAI,GAAG,uBAAe,CAAC;QAEvB,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U,EAAE;gBACnB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;gBAC1B,MAAM,KAAK,CAAC;aACb;QACH,CAAC;KAAA;IAEK,wBAAwB,CAAC,WAA+B;;YAC5D,IAAI;gBACF,MAAM,OAAO,GAAG,IAAI,eAAe,CAAC;oBAClC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;wBACtB,MAAM,EAAE,eAAe;wBACvB,OAAO,EAAE,WAAW;qBACrB,CAAC;oBACF,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM;iBAC/B,CAAC,CAAC,QAAQ,EAAE,CAAC;gBACd,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CACvB,GAAG,8BAAa,IAAI,OAAO,EAAE,EAC7B,0BAA0B,EAC1B,6FAA6F,CAC9F,CAAC;gBACF,IAAI,CAAC,KAAK;oBAAE,MAAM,IAAI,gCAAuB,EAAE,CAAC;gBAChD,MAAM,OAAO,GAAG,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;oBACpD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;oBAC9B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC7B,CAAC,CAAC,CAAC;gBACH,OAAO,OAA6B,CAAC;aACtC;YAAC,OAAO,KAAU,EAAE;gBACnB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;gBAC1B,MAAM,KAAK,CAAC;aACb;QACH,CAAC;KAAA;CAKF;AAjLD,gDAiLC"}
@@ -1,10 +1,24 @@
1
+ import { MaybeHexString } from 'aptos';
1
2
  import { PendingTransaction, SubmitTransactionRequest, TransactionPayload } from 'aptos/dist/api/data-contracts';
2
3
  import { AccountKeys, BaseWalletAdapter, WalletName, WalletReadyState } from './BaseAdapter';
4
+ interface ConnectMartianAccount {
5
+ address: MaybeHexString;
6
+ method: string;
7
+ publicKey: MaybeHexString;
8
+ status: number;
9
+ }
10
+ interface MartianAccount {
11
+ address: MaybeHexString;
12
+ publicKey: MaybeHexString;
13
+ authKey: MaybeHexString;
14
+ isConnected: boolean;
15
+ }
3
16
  interface IMartianWallet {
4
- connect: (params?: any) => Promise<any>;
5
- address?: string;
6
- isConnected?: boolean;
7
- signGenericTransaction(transaction: any): Promise<void>;
17
+ connect: (params?: any) => Promise<ConnectMartianAccount>;
18
+ account(): Promise<MartianAccount>;
19
+ isConnected(): Promise<boolean>;
20
+ generateTransaction(sender: MaybeHexString, payload: any): Promise<any>;
21
+ signAndSubmitTransaction(transaction: any): Promise<string>;
8
22
  disconnect(): Promise<void>;
9
23
  }
10
24
  export declare const MartianWalletName: WalletName<"MartianWallet">;
@@ -20,7 +34,7 @@ export declare class MartianWalletAdapter extends BaseWalletAdapter {
20
34
  protected _timeout: number;
21
35
  protected _readyState: WalletReadyState;
22
36
  protected _connecting: boolean;
23
- protected _wallet: any | null;
37
+ protected _wallet: MartianAccount | null;
24
38
  constructor({ timeout }?: MartianWalletAdapterConfig);
25
39
  get publicAccount(): AccountKeys;
26
40
  get connecting(): boolean;
@@ -28,8 +42,8 @@ export declare class MartianWalletAdapter extends BaseWalletAdapter {
28
42
  get readyState(): WalletReadyState;
29
43
  connect(): Promise<void>;
30
44
  disconnect(): Promise<void>;
31
- signTransaction(transaction: TransactionPayload): Promise<SubmitTransactionRequest>;
32
- signAndSubmitTransaction(tempTransaction: TransactionPayload): Promise<PendingTransaction>;
45
+ signTransaction(transactionPyld: TransactionPayload): Promise<SubmitTransactionRequest>;
46
+ signAndSubmitTransaction(transactionPyld: TransactionPayload): Promise<PendingTransaction>;
33
47
  }
34
48
  export {};
35
49
  //# sourceMappingURL=MartianWallet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MartianWallet.d.ts","sourceRoot":"","sources":["../../src/WalletAdapters/MartianWallet.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAElB,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B;IACzC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAE1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,oBAAqB,SAAQ,iBAAiB;IACzD,IAAI,8BAAqB;IAEzB,GAAG,SAA+F;IAElG,IAAI,SAC4U;IAEhV,SAAS,CAAC,SAAS,EAAE,cAAc,GAAG,SAAS,CAAC;IAGhD,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE3B,SAAS,CAAC,WAAW,EAAE,gBAAgB,CAGJ;IAEnC,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC;IAE/B,SAAS,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;gBAE7B,EAGV,OAAe,EAChB,GAAE,0BAA+B;IAqBlC,IAAI,aAAa,IAAI,WAAW,CAM/B;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,UAAU,IAAI,gBAAgB,CAEjC;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA6CxB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAgB3B,eAAe,CAAC,eAAe,EAAE,kBAAkB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAoBvF,wBAAwB,CAAC,eAAe,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAmBjG"}
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.MartianWalletAdapter = exports.MartianWalletName = void 0;
13
+ const aptosConstants_1 = require("../config/aptosConstants");
13
14
  const errors_1 = require("../WalletProviders/errors");
14
15
  const BaseAdapter_1 = require("./BaseAdapter");
15
16
  exports.MartianWalletName = 'MartianWallet';
@@ -46,7 +47,7 @@ class MartianWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
46
47
  return {
47
48
  publicKey: ((_a = this._wallet) === null || _a === void 0 ? void 0 : _a.publicKey) || null,
48
49
  address: ((_b = this._wallet) === null || _b === void 0 ? void 0 : _b.address) || null,
49
- authKey: ((_c = this._wallet) === null || _c === void 0 ? void 0 : _c.authcKey) || null
50
+ authKey: ((_c = this._wallet) === null || _c === void 0 ? void 0 : _c.authKey) || null
50
51
  };
51
52
  }
52
53
  get connecting() {
@@ -73,28 +74,20 @@ class MartianWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
73
74
  // console.log(3);
74
75
  this._connecting = true;
75
76
  const provider = window.martian;
77
+ yield (provider === null || provider === void 0 ? void 0 : provider.disconnect());
76
78
  // console.log(4);
77
- const loggedInAddress = yield new Promise((resolve, reject) => {
78
- provider === null || provider === void 0 ? void 0 : provider.disconnect();
79
- // console.log(5);
80
- provider === null || provider === void 0 ? void 0 : provider.connect((respAddress) => {
81
- // console.log(6);
82
- try {
83
- resolve(respAddress.address);
84
- }
85
- catch (err) {
86
- reject(err);
87
- }
88
- // 0xc4265dc8a5d90715f8a60bebf16688819427bca928a537ad35f798d4d1267716
89
- });
90
- });
91
- // console.log(7, loggedInAddress, window.martian?.address);
92
- if (loggedInAddress === ((_a = window.martian) === null || _a === void 0 ? void 0 : _a.address)) {
93
- // console.log(8);
94
- this._wallet = window.martian;
79
+ const response = yield (provider === null || provider === void 0 ? void 0 : provider.connect());
80
+ // console.log(5, response);
81
+ if (!response) {
82
+ throw new errors_1.WalletNotConnectedError('No connect response');
95
83
  }
96
- // console.log(9);
97
- this.emit('connect', this._wallet.address);
84
+ const walletAccount = yield (provider === null || provider === void 0 ? void 0 : provider.account());
85
+ if (walletAccount) {
86
+ this._wallet = Object.assign(Object.assign({}, walletAccount), { isConnected: true });
87
+ // console.log(6, this._wallet);
88
+ }
89
+ // console.log(9, this._wallet?.address);
90
+ this.emit('connect', ((_a = this._wallet) === null || _a === void 0 ? void 0 : _a.address) || '');
98
91
  }
99
92
  catch (error) {
100
93
  // console.log(10, error);
@@ -110,21 +103,11 @@ class MartianWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
110
103
  disconnect() {
111
104
  return __awaiter(this, void 0, void 0, function* () {
112
105
  const wallet = this._wallet;
106
+ const provider = this._provider;
113
107
  if (wallet) {
114
108
  this._wallet = null;
115
109
  try {
116
- yield new Promise((resolve, reject) => {
117
- const timeout = setTimeout(() => resolve(), 250);
118
- try {
119
- wallet.disconnect(() => {
120
- clearTimeout(timeout);
121
- resolve();
122
- });
123
- }
124
- catch (err) {
125
- reject(err);
126
- }
127
- });
110
+ yield (provider === null || provider === void 0 ? void 0 : provider.disconnect());
128
111
  }
129
112
  catch (error) {
130
113
  this.emit('error', new errors_1.WalletDisconnectionError(error === null || error === void 0 ? void 0 : error.message, error));
@@ -133,30 +116,21 @@ class MartianWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
133
116
  this.emit('disconnect');
134
117
  });
135
118
  }
136
- signTransaction(transaction) {
119
+ signTransaction(transactionPyld) {
137
120
  return __awaiter(this, void 0, void 0, function* () {
138
121
  try {
139
122
  const wallet = this._wallet;
123
+ const provider = this._provider;
140
124
  if (!wallet)
141
125
  throw new errors_1.WalletNotConnectedError();
142
- try {
143
- const response = yield new Promise((resolve, reject) => {
144
- wallet.signGenericTransaction(transaction, (resp) => {
145
- // console.log('signTransaction', resp);
146
- if (resp.status === 200) {
147
- // console.log('Transaction is Signed successfully.');
148
- resolve(resp);
149
- }
150
- else {
151
- reject(resp.message);
152
- }
153
- });
154
- });
155
- return response;
156
- }
157
- catch (error) {
158
- throw new errors_1.WalletSignTransactionError(error === null || error === void 0 ? void 0 : error.message, error);
126
+ const tx = yield aptosConstants_1.aptosClient.generateTransaction(wallet.address || '', transactionPyld);
127
+ const response = yield (provider === null || provider === void 0 ? void 0 : provider.signAndSubmitTransaction(tx));
128
+ if (!response) {
129
+ throw new errors_1.WalletSignTransactionError('No response');
159
130
  }
131
+ return {
132
+ hash: response
133
+ };
160
134
  }
161
135
  catch (error) {
162
136
  this.emit('error', error);
@@ -164,34 +138,21 @@ class MartianWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
164
138
  }
165
139
  });
166
140
  }
167
- signAndSubmitTransaction(tempTransaction) {
141
+ signAndSubmitTransaction(transactionPyld) {
168
142
  return __awaiter(this, void 0, void 0, function* () {
169
143
  try {
170
144
  const wallet = this._wallet;
145
+ const provider = this._provider;
171
146
  if (!wallet)
172
147
  throw new errors_1.WalletNotConnectedError();
173
- const transaction = tempTransaction;
174
- try {
175
- // console.log('trans', 1);
176
- const response = yield new Promise((resolve, reject) => {
177
- // const args = [...transaction.type_arguments, transaction.arguments[0] / 1000];
178
- // console.log('trans 2', wallet, transaction);
179
- wallet.signGenericTransaction(transaction.function, transaction.arguments, transaction.type_arguments, (resp) => {
180
- console.log('signTransaction', resp);
181
- if (resp.status === 200) {
182
- // console.log('Transaction is Signed successfully.');
183
- resolve(resp);
184
- }
185
- else {
186
- reject(resp.message);
187
- }
188
- });
189
- });
190
- return response;
191
- }
192
- catch (error) {
193
- throw new errors_1.WalletSignTransactionError(error);
148
+ const tx = yield (provider === null || provider === void 0 ? void 0 : provider.generateTransaction(wallet.address || '', transactionPyld));
149
+ const response = yield (provider === null || provider === void 0 ? void 0 : provider.signAndSubmitTransaction(tx));
150
+ if (!response) {
151
+ throw new errors_1.WalletSignTransactionError('No response');
194
152
  }
153
+ return {
154
+ hash: response
155
+ };
195
156
  }
196
157
  catch (error) {
197
158
  this.emit('error', error);
@@ -1 +1 @@
1
- {"version":3,"file":"MartianWallet.js","sourceRoot":"","sources":["../../src/WalletAdapters/MartianWallet.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,sDAKmC;AACnC,+CAOuB;AAiBV,QAAA,iBAAiB,GAAG,eAA8C,CAAC;AAQhF,MAAa,oBAAqB,SAAQ,+BAAiB;IAsBzD,YAAY;IACV,YAAY;IACZ,0CAA0C;IAC1C,OAAO,GAAG,KAAK,KACe,EAAE;QAChC,KAAK,EAAE,CAAC;QA1BV,SAAI,GAAG,yBA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BAAmB,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,EAAE,eAAe,CAAC,CAAA,CAAC;gBACtF,MAAM,QAAQ,GAAG,MAAM,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,wBAAwB,CAAC,EAAE,CAAC,CAAA,CAAC;gBAE9D,IAAI,CAAC,QAAQ,EAAE;oBACb,MAAM,IAAI,mCAA0B,CAAC,aAAa,CAAC,CAAC;iBACrD;gBACD,OAAO;oBACL,IAAI,EAAE,QAAQ;iBACO,CAAC;aACzB;YAAC,OAAO,KAAU,EAAE;gBACnB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;gBAC1B,MAAM,KAAK,CAAC;aACb;QACH,CAAC;KAAA;CACF;AAvKD,oDAuKC"}
@@ -46,7 +46,7 @@ class MultiMaskWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
46
46
  return {
47
47
  publicKey: ((_a = this._wallet) === null || _a === void 0 ? void 0 : _a.publicKey) || null,
48
48
  address: ((_b = this._wallet) === null || _b === void 0 ? void 0 : _b.address) || null,
49
- authKey: ((_c = this._wallet) === null || _c === void 0 ? void 0 : _c.authcKey) || null
49
+ authKey: ((_c = this._wallet) === null || _c === void 0 ? void 0 : _c.authKey) || null
50
50
  };
51
51
  }
52
52
  get connecting() {
@@ -1 +1 @@
1
- {"version":3,"file":"MultiMaskWallet.js","sourceRoot":"","sources":["../../src/WalletAdapters/MultiMaskWallet.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,sDAKmC;AACnC,+CAOuB;AAqBV,QAAA,mBAAmB,GAAG,iBAAkD,CAAC;AAQtF,MAAa,sBAAuB,SAAQ,+BAAiB;IAqB3D,YAAY;IACV,YAAY;IACZ,0CAA0C;IAC1C,OAAO,GAAG,KAAK,KACiB,EAAE;QAClC,KAAK,EAAE,CAAC;QAzBV,SAAI,GAAG,2BAAmB,CAAC;QAE3B,QAAG,GAAG,mEAAmE,CAAC;QAE1E,SAAI,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AM,EAAE,qBAAqB;4BAC7B,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;yBACvD,EACD,CAAC,KAAK,EAAE,IAAS,EAAE,EAAE;4BACnB,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;4BAC5C,IAAI,KAAK,EAAE;gCACT,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;6BACvB;iCAAM;gCACL,OAAO,CAAC,IAAI,CAAC,CAAC;6BACf;4BACD,6BAA6B;4BAC7B,2DAA2D;4BAC3D,WAAW;4BACX,0BAA0B;4BAC1B,IAAI;wBACN,CAAC,CACF,CAAC;oBACJ,CAAC,CAAC,CAAC;oBACH,OAAO,QAAQ,CAAC;iBACjB;gBAAC,OAAO,KAAU,EAAE;oBACnB,MAAM,IAAI,mCAA0B,CAAC,KAAK,CAAC,CAAC;iBAC7C;aACF;YAAC,OAAO,KAAU,EAAE;gBACnB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;gBAC1B,MAAM,KAAK,CAAC;aACb;QACH,CAAC;KAAA;CACF;AApMD,wDAoMC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manahippo/aptos-wallet-adapter",
3
- "version": "0.1.14",
3
+ "version": "0.1.17",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -15,20 +15,20 @@
15
15
  "react-dom": "^18.1.0"
16
16
  },
17
17
  "devDependencies": {
18
- "@types/jest": "^27.0.1",
19
- "@types/node": "^16.7.13",
20
- "@types/react": "^18.0.0",
21
- "aptos": "^1.2.0",
22
18
  "eslint-config-airbnb-typescript": "^17.0.0",
23
19
  "eslint-config-prettier": "^8.5.0",
24
20
  "eslint-plugin-prettier": "^4.2.1",
25
21
  "eslint-plugin-react": "^7.30.1",
26
22
  "eslint-plugin-react-hooks": "^4.6.0",
27
- "eventemitter3": "^4.0.7",
28
- "prettier": "^2.7.1",
29
- "typescript": "^4.7.4"
23
+ "prettier": "^2.7.1"
30
24
  },
31
25
  "dependencies": {
32
- "@fewcha/web3": "^0.1.4"
26
+ "@fewcha/web3": "^0.1.6",
27
+ "@types/jest": "^27.0.1",
28
+ "@types/node": "^16.7.13",
29
+ "@types/react": "^18.0.0",
30
+ "aptos": "1.2.0",
31
+ "eventemitter3": "^4.0.7",
32
+ "typescript": "^4.4.2"
33
33
  }
34
34
  }
@@ -11,10 +11,7 @@ import {
11
11
  } from '../WalletProviders/errors';
12
12
  import {
13
13
  AccountKeys,
14
- Address,
15
- AuthKey,
16
14
  BaseWalletAdapter,
17
- PublicKey,
18
15
  scopePollingDetectionStrategy,
19
16
  WalletName,
20
17
  WalletReadyState
@@ -94,7 +91,7 @@ export class AptosWalletAdapter extends BaseWalletAdapter {
94
91
  return {
95
92
  publicKey: this._wallet?.publicKey || null,
96
93
  address: this._wallet?.address || null,
97
- authKey: this._wallet?.authcKey || null
94
+ authKey: this._wallet?.authKey || null
98
95
  };
99
96
  }
100
97
 
@@ -14,7 +14,6 @@ import Web3, { Web3Provider, Web3ProviderType } from '@fewcha/web3';
14
14
  import {
15
15
  AccountKeys,
16
16
  BaseWalletAdapter,
17
- PublicKey,
18
17
  scopePollingDetectionStrategy,
19
18
  WalletName,
20
19
  WalletReadyState
@@ -22,8 +21,13 @@ import {
22
21
 
23
22
  export const FewchaWalletName = 'Fewcha Wallet' as WalletName<'Fewcha Wallet'>;
24
23
 
25
- const defaultNodeURL = 'https://fullnode.devnet.aptoslabs.com';
26
- const defaultWeb3 = new Web3(new Web3Provider(defaultNodeURL));
24
+ interface FewchaWindow extends Window {
25
+ fewcha: Web3ProviderType;
26
+ }
27
+
28
+ declare const window: FewchaWindow;
29
+
30
+ const defaultWeb3 = new Web3(new Web3Provider(window.fewcha));
27
31
 
28
32
  export interface FewchaAdapterConfig {
29
33
  provider?: string;
@@ -65,12 +69,7 @@ export class FewchaWalletAdapter extends BaseWalletAdapter {
65
69
 
66
70
  if (this._readyState !== WalletReadyState.Unsupported) {
67
71
  scopePollingDetectionStrategy(() => {
68
- const wallet = (window as any).fewcha;
69
-
70
- if (wallet) {
71
- const provider = new Web3Provider(wallet);
72
- const web3 = new Web3(provider);
73
- this._provider = web3.action;
72
+ if (window.fewcha) {
74
73
  this._readyState = WalletReadyState.Installed;
75
74
  this.emit('readyStateChange', this._readyState);
76
75
  return true;
@@ -82,18 +81,19 @@ export class FewchaWalletAdapter extends BaseWalletAdapter {
82
81
  window.addEventListener('aptos#connected', async () => {
83
82
  const publicAccount = await this._provider?.account();
84
83
  const isConnected = await this._provider?.isConnected();
85
- console.log('loginnnn>>', publicAccount, publicAccount?.publicKey);
86
- if (publicAccount?.publicKey && isConnected) {
84
+ if (publicAccount?.data.publicKey && isConnected) {
87
85
  this._wallet = {
88
86
  connected: isConnected,
89
- ...publicAccount
87
+ ...publicAccount.data
90
88
  };
91
89
  this.emit('connect', this._wallet.publicKey);
92
90
  }
93
91
  });
94
92
 
95
- window.addEventListener('aptos#transaction', (e) => {
96
- this.emit('success', 'Transaction Success');
93
+ window.addEventListener('aptos#transaction', (e: any) => {
94
+ if (e?.detail?.tx) {
95
+ this.emit('success', e?.detail?.tx);
96
+ }
97
97
  });
98
98
 
99
99
  window.addEventListener('aptos#disconnected', () => {
@@ -105,7 +105,7 @@ export class FewchaWalletAdapter extends BaseWalletAdapter {
105
105
  return {
106
106
  publicKey: this._wallet?.publicKey || null,
107
107
  address: this._wallet?.address || null,
108
- authKey: this._wallet?.authcKey || null
108
+ authKey: this._wallet?.authKey || null
109
109
  };
110
110
  }
111
111
 
@@ -134,6 +134,10 @@ export class FewchaWalletAdapter extends BaseWalletAdapter {
134
134
 
135
135
  this._connecting = true;
136
136
  const provider = this._provider;
137
+ const isConnected = await this._provider?.isConnected();
138
+ if (isConnected) {
139
+ await provider?.disconnect();
140
+ }
137
141
  await provider?.connect();
138
142
  } catch (error: any) {
139
143
  this.emit('error', error);
@@ -197,7 +201,9 @@ export class FewchaWalletAdapter extends BaseWalletAdapter {
197
201
  this.once('success', resolve);
198
202
  this.once('error', reject);
199
203
  });
200
- return promise as PendingTransaction;
204
+ return {
205
+ hash: promise
206
+ } as PendingTransaction;
201
207
  } catch (error: any) {
202
208
  const errMsg = error instanceof Error ? error.message : error.response.data.message;
203
209
  throw new WalletSignTransactionError(errMsg);
@@ -1,3 +1,4 @@
1
+ import { MaybeHexString } from 'aptos';
1
2
  import {
2
3
  PendingTransaction,
3
4
  SubmitTransactionRequest,
@@ -12,17 +13,20 @@ import {
12
13
  import {
13
14
  AccountKeys,
14
15
  BaseWalletAdapter,
15
- PublicKey,
16
16
  scopePollingDetectionStrategy,
17
17
  WalletName,
18
18
  WalletReadyState
19
19
  } from './BaseAdapter';
20
20
 
21
21
  interface IHippoWallet {
22
- connect: () => Promise<{ address: string }>;
22
+ connect: () => Promise<{
23
+ address: MaybeHexString;
24
+ publicKey: MaybeHexString;
25
+ authKey: MaybeHexString;
26
+ }>;
23
27
  account: () => Promise<string>;
24
28
  isConnected: () => Promise<boolean>;
25
- signAndSubmitTransaction(transaction: any): Promise<void>;
29
+ signAndSubmitTransaction(transaction: any): Promise<any>;
26
30
  signTransaction(transaction: any): Promise<void>;
27
31
  disconnect(): Promise<void>;
28
32
  }
@@ -33,8 +37,7 @@ interface HippoWindow extends Window {
33
37
 
34
38
  declare const window: HippoWindow;
35
39
 
36
- export const HippoExtensionWalletName =
37
- 'Hippo Wallet' as WalletName<'Hippo Wallet'>;
40
+ export const HippoExtensionWalletName = 'Hippo Wallet' as WalletName<'Hippo Wallet'>;
38
41
 
39
42
  export interface HippoExtensionWalletAdapterConfig {
40
43
  provider?: IHippoWallet;
@@ -45,7 +48,7 @@ export interface HippoExtensionWalletAdapterConfig {
45
48
  export class HippoExtensionWalletAdapter extends BaseWalletAdapter {
46
49
  name = HippoExtensionWalletName;
47
50
 
48
- url = 'https://hippo-wallet-test.web.app';
51
+ url = 'https://github.com/hippospace/hippo-wallet';
49
52
 
50
53
  icon = 'https://ui-test1-22e7c.web.app/static/media/hippo_logo.ecded6bf411652de9b7f.png';
51
54
 
@@ -92,7 +95,7 @@ export class HippoExtensionWalletAdapter extends BaseWalletAdapter {
92
95
  return {
93
96
  publicKey: this._wallet?.publicKey || null,
94
97
  address: this._wallet?.address || null,
95
- authKey: this._wallet?.authcKey || null
98
+ authKey: this._wallet?.authKey || null
96
99
  };
97
100
  }
98
101
 
@@ -124,7 +127,7 @@ export class HippoExtensionWalletAdapter extends BaseWalletAdapter {
124
127
  const response = await provider?.connect();
125
128
 
126
129
  this._wallet = {
127
- publicKey: response?.address,
130
+ ...response,
128
131
  isConnected: true
129
132
  };
130
133
 
@@ -184,12 +187,13 @@ export class HippoExtensionWalletAdapter extends BaseWalletAdapter {
184
187
  const provider = this._provider || window.hippoWallet;
185
188
  const response = await provider?.signAndSubmitTransaction(transaction);
186
189
  if (response) {
187
- return response;
190
+ return response.detail;
188
191
  } else {
189
192
  throw new Error('Transaction failed');
190
193
  }
191
194
  } catch (error: any) {
192
- throw new WalletSignTransactionError(error.message);
195
+ // console.log('transact err', error, error.message);
196
+ throw new WalletSignTransactionError(error.message || error);
193
197
  }
194
198
  } catch (error: any) {
195
199
  this.emit('error', error);
@@ -10,13 +10,7 @@ import {
10
10
  WalletNotReadyError,
11
11
  WalletSignAndSubmitMessageError
12
12
  } from '../WalletProviders/errors';
13
- import {
14
- AccountKeys,
15
- BaseWalletAdapter,
16
- PublicKey,
17
- WalletName,
18
- WalletReadyState
19
- } from './BaseAdapter';
13
+ import { AccountKeys, BaseWalletAdapter, WalletName, WalletReadyState } from './BaseAdapter';
20
14
 
21
15
  export const HippoWalletName = 'Hippo Web Wallet' as WalletName<'Hippo Web Wallet'>;
22
16
 
@@ -63,7 +57,7 @@ export class HippoWalletAdapter extends BaseWalletAdapter {
63
57
  return {
64
58
  publicKey: this._wallet?.publicKey || null,
65
59
  address: this._wallet?.address || null,
66
- authKey: this._wallet?.authcKey || null
60
+ authKey: this._wallet?.authKey || null
67
61
  };
68
62
  }
69
63
 
@@ -92,6 +86,9 @@ export class HippoWalletAdapter extends BaseWalletAdapter {
92
86
  authKey?: {
93
87
  hexString: MaybeHexString;
94
88
  };
89
+ detail?: {
90
+ hash: MaybeHexString;
91
+ };
95
92
  error?: string;
96
93
  }>
97
94
  ): void => {
@@ -105,7 +102,7 @@ export class HippoWalletAdapter extends BaseWalletAdapter {
105
102
  };
106
103
  this.emit('connect', this._wallet);
107
104
  } else if (e.data.method === 'success') {
108
- this.emit('success', 'Transaction Success');
105
+ this.emit('success', e.data.detail);
109
106
  } else if (e.data.method === 'fail') {
110
107
  this.emit('error', new WalletSignAndSubmitMessageError(e.data.error));
111
108
  } else if (e.data.method === 'disconnected') {
@@ -151,7 +148,8 @@ export class HippoWalletAdapter extends BaseWalletAdapter {
151
148
  method: 'signTransaction',
152
149
  payload: transaction
153
150
  }),
154
- origin: window.location.origin
151
+ origin: window.location.origin,
152
+ isPopUp: 'true'
155
153
  }).toString();
156
154
  const popup = window.open(
157
155
  `${WEBWALLET_URL}?${request}`,
@@ -1,9 +1,10 @@
1
+ import { MaybeHexString } from 'aptos';
1
2
  import {
2
3
  PendingTransaction,
3
- ScriptFunctionPayload,
4
4
  SubmitTransactionRequest,
5
5
  TransactionPayload
6
6
  } from 'aptos/dist/api/data-contracts';
7
+ import { aptosClient } from '../config/aptosConstants';
7
8
  import {
8
9
  WalletDisconnectionError,
9
10
  WalletNotConnectedError,
@@ -13,17 +14,30 @@ import {
13
14
  import {
14
15
  AccountKeys,
15
16
  BaseWalletAdapter,
16
- PublicKey,
17
17
  scopePollingDetectionStrategy,
18
18
  WalletName,
19
19
  WalletReadyState
20
20
  } from './BaseAdapter';
21
21
 
22
+ interface ConnectMartianAccount {
23
+ address: MaybeHexString;
24
+ method: string;
25
+ publicKey: MaybeHexString;
26
+ status: number;
27
+ }
28
+
29
+ interface MartianAccount {
30
+ address: MaybeHexString;
31
+ publicKey: MaybeHexString;
32
+ authKey: MaybeHexString;
33
+ isConnected: boolean;
34
+ }
22
35
  interface IMartianWallet {
23
- connect: (params?: any) => Promise<any>;
24
- address?: string;
25
- isConnected?: boolean;
26
- signGenericTransaction(transaction: any): Promise<void>;
36
+ connect: (params?: any) => Promise<ConnectMartianAccount>;
37
+ account(): Promise<MartianAccount>;
38
+ isConnected(): Promise<boolean>;
39
+ generateTransaction(sender: MaybeHexString, payload: any): Promise<any>;
40
+ signAndSubmitTransaction(transaction: any): Promise<string>;
27
41
  // signTransaction(transaction: any): Promise<void>;
28
42
  disconnect(): Promise<void>;
29
43
  }
@@ -62,7 +76,7 @@ export class MartianWalletAdapter extends BaseWalletAdapter {
62
76
 
63
77
  protected _connecting: boolean;
64
78
 
65
- protected _wallet: any | null;
79
+ protected _wallet: MartianAccount | null;
66
80
 
67
81
  constructor({
68
82
  // provider,
@@ -93,7 +107,7 @@ export class MartianWalletAdapter extends BaseWalletAdapter {
93
107
  return {
94
108
  publicKey: this._wallet?.publicKey || null,
95
109
  address: this._wallet?.address || null,
96
- authKey: this._wallet?.authcKey || null
110
+ authKey: this._wallet?.authKey || null
97
111
  };
98
112
  }
99
113
 
@@ -125,27 +139,25 @@ export class MartianWalletAdapter extends BaseWalletAdapter {
125
139
  this._connecting = true;
126
140
 
127
141
  const provider = window.martian;
142
+ await provider?.disconnect();
128
143
  // console.log(4);
129
- const loggedInAddress = await new Promise<string>((resolve, reject) => {
130
- provider?.disconnect();
131
- // console.log(5);
132
- provider?.connect((respAddress: { status: number; message: string; address: string }) => {
133
- // console.log(6);
134
- try {
135
- resolve(respAddress.address);
136
- } catch (err) {
137
- reject(err);
138
- }
139
- // 0xc4265dc8a5d90715f8a60bebf16688819427bca928a537ad35f798d4d1267716
140
- });
141
- });
142
- // console.log(7, loggedInAddress, window.martian?.address);
143
- if (loggedInAddress === window.martian?.address) {
144
- // console.log(8);
145
- this._wallet = window.martian;
144
+ const response = await provider?.connect();
145
+ // console.log(5, response);
146
+
147
+ if (!response) {
148
+ throw new WalletNotConnectedError('No connect response');
146
149
  }
147
- // console.log(9);
148
- this.emit('connect', this._wallet.address);
150
+
151
+ const walletAccount = await provider?.account();
152
+ if (walletAccount) {
153
+ this._wallet = {
154
+ ...walletAccount,
155
+ isConnected: true
156
+ };
157
+ // console.log(6, this._wallet);
158
+ }
159
+ // console.log(9, this._wallet?.address);
160
+ this.emit('connect', this._wallet?.address || '');
149
161
  } catch (error: any) {
150
162
  // console.log(10, error);
151
163
  this.emit('error', error);
@@ -158,22 +170,12 @@ export class MartianWalletAdapter extends BaseWalletAdapter {
158
170
 
159
171
  async disconnect(): Promise<void> {
160
172
  const wallet = this._wallet;
173
+ const provider = this._provider;
161
174
  if (wallet) {
162
175
  this._wallet = null;
163
176
 
164
177
  try {
165
- await new Promise<void>((resolve, reject) => {
166
- const timeout = setTimeout(() => resolve(), 250);
167
-
168
- try {
169
- wallet.disconnect(() => {
170
- clearTimeout(timeout);
171
- resolve();
172
- });
173
- } catch (err) {
174
- reject(err);
175
- }
176
- });
178
+ await provider?.disconnect();
177
179
  } catch (error: any) {
178
180
  this.emit('error', new WalletDisconnectionError(error?.message, error));
179
181
  }
@@ -182,63 +184,40 @@ export class MartianWalletAdapter extends BaseWalletAdapter {
182
184
  this.emit('disconnect');
183
185
  }
184
186
 
185
- async signTransaction(transaction: TransactionPayload): Promise<SubmitTransactionRequest> {
187
+ async signTransaction(transactionPyld: TransactionPayload): Promise<SubmitTransactionRequest> {
186
188
  try {
187
189
  const wallet = this._wallet;
190
+ const provider = this._provider;
188
191
  if (!wallet) throw new WalletNotConnectedError();
192
+ const tx = await aptosClient.generateTransaction(wallet.address || '', transactionPyld);
193
+ const response = await provider?.signAndSubmitTransaction(tx);
189
194
 
190
- try {
191
- const response = await new Promise<SubmitTransactionRequest>((resolve, reject) => {
192
- wallet.signGenericTransaction(transaction, (resp: any) => {
193
- // console.log('signTransaction', resp);
194
- if (resp.status === 200) {
195
- // console.log('Transaction is Signed successfully.');
196
- resolve(resp);
197
- } else {
198
- reject(resp.message);
199
- }
200
- });
201
- });
202
- return response;
203
- } catch (error: any) {
204
- throw new WalletSignTransactionError(error?.message, error);
195
+ if (!response) {
196
+ throw new WalletSignTransactionError('No response');
205
197
  }
198
+ return {
199
+ hash: response
200
+ } as PendingTransaction;
206
201
  } catch (error: any) {
207
202
  this.emit('error', error);
208
203
  throw error;
209
204
  }
210
205
  }
211
206
 
212
- async signAndSubmitTransaction(tempTransaction: TransactionPayload): Promise<PendingTransaction> {
207
+ async signAndSubmitTransaction(transactionPyld: TransactionPayload): Promise<PendingTransaction> {
213
208
  try {
214
209
  const wallet = this._wallet;
210
+ const provider = this._provider;
215
211
  if (!wallet) throw new WalletNotConnectedError();
216
- const transaction = tempTransaction as ScriptFunctionPayload;
212
+ const tx = await provider?.generateTransaction(wallet.address || '', transactionPyld);
213
+ const response = await provider?.signAndSubmitTransaction(tx);
217
214
 
218
- try {
219
- // console.log('trans', 1);
220
- const response = await new Promise<PendingTransaction>((resolve, reject) => {
221
- // const args = [...transaction.type_arguments, transaction.arguments[0] / 1000];
222
- // console.log('trans 2', wallet, transaction);
223
- wallet.signGenericTransaction(
224
- transaction.function,
225
- transaction.arguments,
226
- transaction.type_arguments,
227
- (resp: any) => {
228
- console.log('signTransaction', resp);
229
- if (resp.status === 200) {
230
- // console.log('Transaction is Signed successfully.');
231
- resolve(resp);
232
- } else {
233
- reject(resp.message);
234
- }
235
- }
236
- );
237
- });
238
- return response;
239
- } catch (error: any) {
240
- throw new WalletSignTransactionError(error);
215
+ if (!response) {
216
+ throw new WalletSignTransactionError('No response');
241
217
  }
218
+ return {
219
+ hash: response
220
+ } as PendingTransaction;
242
221
  } catch (error: any) {
243
222
  this.emit('error', error);
244
223
  throw error;
@@ -96,7 +96,7 @@ export class MultiMaskWalletAdapter extends BaseWalletAdapter {
96
96
  return {
97
97
  publicKey: this._wallet?.publicKey || null,
98
98
  address: this._wallet?.address || null,
99
- authKey: this._wallet?.authcKey || null
99
+ authKey: this._wallet?.authKey || null
100
100
  };
101
101
  }
102
102