@massalabs/wallet-provider 1.4.2-dev.20230925081919 → 1.4.2-dev.20230929085309
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/dist/cmd/account/AccountBalance.d.ts +7 -2
- package/dist/cmd/account/AccountBalance.d.ts.map +1 -1
- package/dist/cmd/account/AccountBalance.js.map +1 -1
- package/dist/cmd/bearbyWallet/BearbyConnect.d.ts.map +1 -1
- package/dist/cmd/bearbyWallet/BearbyConnect.js +1 -4
- package/dist/cmd/bearbyWallet/BearbyConnect.js.map +1 -1
- package/dist/cmd/index.d.ts +1 -0
- package/dist/cmd/index.d.ts.map +1 -1
- package/dist/cmd/index.js.map +1 -1
- package/dist/esm/account/AccountBalance.d.ts +7 -2
- package/dist/esm/account/AccountBalance.d.ts.map +1 -1
- package/dist/esm/account/AccountBalance.js.map +1 -1
- package/dist/esm/bearbyWallet/BearbyConnect.d.ts.map +1 -1
- package/dist/esm/bearbyWallet/BearbyConnect.js +1 -4
- package/dist/esm/bearbyWallet/BearbyConnect.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +7 -16
- package/bundle.js +0 -9008
- package/bundle.min.js +0 -3
- package/dist/account/Account.d.ts +0 -104
- package/dist/account/Account.d.ts.map +0 -1
- package/dist/account/Account.js +0 -174
- package/dist/account/AccountBalance.d.ts +0 -14
- package/dist/account/AccountBalance.d.ts.map +0 -1
- package/dist/account/AccountBalance.js +0 -1
- package/dist/account/AccountSign.d.ts +0 -23
- package/dist/account/AccountSign.d.ts.map +0 -1
- package/dist/account/AccountSign.js +0 -1
- package/dist/account/IAccount.d.ts +0 -21
- package/dist/account/IAccount.d.ts.map +0 -1
- package/dist/account/IAccount.js +0 -1
- package/dist/account/IAccountCallSCRequest.d.ts +0 -25
- package/dist/account/IAccountCallSCRequest.d.ts.map +0 -1
- package/dist/account/IAccountCallSCRequest.js +0 -1
- package/dist/account/IAccountDetails.d.ts +0 -8
- package/dist/account/IAccountDetails.d.ts.map +0 -1
- package/dist/account/IAccountDetails.js +0 -1
- package/dist/account/IAccountRolls.d.ts +0 -8
- package/dist/account/IAccountRolls.d.ts.map +0 -1
- package/dist/account/IAccountRolls.js +0 -1
- package/dist/account/IAccountSendTransaction.d.ts +0 -9
- package/dist/account/IAccountSendTransaction.d.ts.map +0 -1
- package/dist/account/IAccountSendTransaction.js +0 -1
- package/dist/account/index.d.ts +0 -9
- package/dist/account/index.d.ts.map +0 -1
- package/dist/account/index.js +0 -1
- package/dist/bearbyWallet/BalanceResponse.d.ts +0 -28
- package/dist/bearbyWallet/BalanceResponse.d.ts.map +0 -1
- package/dist/bearbyWallet/BalanceResponse.js +0 -1
- package/dist/bearbyWallet/BearbyAccount.d.ts +0 -86
- package/dist/bearbyWallet/BearbyAccount.d.ts.map +0 -1
- package/dist/bearbyWallet/BearbyAccount.js +0 -275
- package/dist/bearbyWallet/BearbyConnect.d.ts +0 -4
- package/dist/bearbyWallet/BearbyConnect.d.ts.map +0 -1
- package/dist/bearbyWallet/BearbyConnect.js +0 -19
- package/dist/bearbyWallet/BearbyProvider.d.ts +0 -20
- package/dist/bearbyWallet/BearbyProvider.d.ts.map +0 -1
- package/dist/bearbyWallet/BearbyProvider.js +0 -43
- package/dist/bearbyWallet/ICallData.d.ts +0 -26
- package/dist/bearbyWallet/ICallData.d.ts.map +0 -1
- package/dist/bearbyWallet/ICallData.js +0 -1
- package/dist/bearbyWallet/NodeStatus.d.ts +0 -84
- package/dist/bearbyWallet/NodeStatus.d.ts.map +0 -1
- package/dist/bearbyWallet/NodeStatus.js +0 -1
- package/dist/bearbyWallet/jsonRpcMethods.d.ts +0 -31
- package/dist/bearbyWallet/jsonRpcMethods.d.ts.map +0 -1
- package/dist/bearbyWallet/jsonRpcMethods.js +0 -33
- package/dist/bearbyWallet/jsonRpcResponseData.d.ts +0 -13
- package/dist/bearbyWallet/jsonRpcResponseData.d.ts.map +0 -1
- package/dist/bearbyWallet/jsonRpcResponseData.js +0 -1
- package/dist/connector/Connector.d.ts +0 -92
- package/dist/connector/Connector.d.ts.map +0 -1
- package/dist/connector/Connector.js +0 -183
- package/dist/connector/ICustomEventMessageRequest.d.ts +0 -10
- package/dist/connector/ICustomEventMessageRequest.d.ts.map +0 -1
- package/dist/connector/ICustomEventMessageRequest.js +0 -1
- package/dist/connector/ICustomEventMessageResponse.d.ts +0 -11
- package/dist/connector/ICustomEventMessageResponse.d.ts.map +0 -1
- package/dist/connector/ICustomEventMessageResponse.js +0 -1
- package/dist/connector/IRegisterEvent.d.ts +0 -8
- package/dist/connector/IRegisterEvent.d.ts.map +0 -1
- package/dist/connector/IRegisterEvent.js +0 -1
- package/dist/connector/index.d.ts +0 -5
- package/dist/connector/index.d.ts.map +0 -1
- package/dist/connector/index.js +0 -1
- package/dist/index.d.ts +0 -50
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -87
- package/dist/massaStation/MassaStationAccount.d.ts +0 -105
- package/dist/massaStation/MassaStationAccount.d.ts.map +0 -1
- package/dist/massaStation/MassaStationAccount.js +0 -313
- package/dist/massaStation/MassaStationDiscovery.d.ts +0 -57
- package/dist/massaStation/MassaStationDiscovery.d.ts.map +0 -1
- package/dist/massaStation/MassaStationDiscovery.js +0 -75
- package/dist/massaStation/MassaStationProvider.d.ts +0 -103
- package/dist/massaStation/MassaStationProvider.d.ts.map +0 -1
- package/dist/massaStation/MassaStationProvider.js +0 -213
- package/dist/massaStation/RequestHandler.d.ts +0 -47
- package/dist/massaStation/RequestHandler.d.ts.map +0 -1
- package/dist/massaStation/RequestHandler.js +0 -130
- package/dist/massaStation/types.d.ts +0 -20
- package/dist/massaStation/types.d.ts.map +0 -1
- package/dist/massaStation/types.js +0 -1
- package/dist/provider/AccountDeletion.d.ts +0 -24
- package/dist/provider/AccountDeletion.d.ts.map +0 -1
- package/dist/provider/AccountDeletion.js +0 -10
- package/dist/provider/AccountImport.d.ts +0 -26
- package/dist/provider/AccountImport.d.ts.map +0 -1
- package/dist/provider/AccountImport.js +0 -10
- package/dist/provider/AccoutGeneration.d.ts +0 -8
- package/dist/provider/AccoutGeneration.d.ts.map +0 -1
- package/dist/provider/AccoutGeneration.js +0 -1
- package/dist/provider/IProvider.d.ts +0 -17
- package/dist/provider/IProvider.d.ts.map +0 -1
- package/dist/provider/IProvider.js +0 -1
- package/dist/provider/Provider.d.ts +0 -74
- package/dist/provider/Provider.d.ts.map +0 -1
- package/dist/provider/Provider.js +0 -138
- package/dist/provider/index.d.ts +0 -5
- package/dist/provider/index.d.ts.map +0 -1
- package/dist/provider/index.js +0 -3
- package/dist/utils/argsToBase64.d.ts +0 -16
- package/dist/utils/argsToBase64.d.ts.map +0 -1
- package/dist/utils/argsToBase64.js +0 -19
- package/dist/utils/time.d.ts +0 -77
- package/dist/utils/time.d.ts.map +0 -1
- package/dist/utils/time.js +0 -112
- package/dist/utils/typeCheck.d.ts +0 -2
- package/dist/utils/typeCheck.d.ts.map +0 -1
- package/dist/utils/typeCheck.js +0 -4
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Represents the request for an AccountBalance command.
|
|
3
|
+
*
|
|
4
|
+
* address - The account address.
|
|
3
5
|
*/
|
|
4
6
|
export interface IAccountBalanceRequest {
|
|
5
7
|
address: string;
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
10
|
+
* Represents the response from an AccountBalance command.
|
|
11
|
+
*
|
|
12
|
+
* finalBalance - The account's final confirmed balance.
|
|
13
|
+
* candidateBalance - The account's pending balance.
|
|
9
14
|
*/
|
|
10
15
|
export interface IAccountBalanceResponse {
|
|
11
16
|
finalBalance: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountBalance.d.ts","sourceRoot":"","sources":["../../../src/account/AccountBalance.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"AccountBalance.d.ts","sourceRoot":"","sources":["../../../src/account/AccountBalance.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountBalance.js","sourceRoot":"","sources":["../../../src/account/AccountBalance.ts"],"names":[],"mappings":"","sourcesContent":["/**\n *
|
|
1
|
+
{"version":3,"file":"AccountBalance.js","sourceRoot":"","sources":["../../../src/account/AccountBalance.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents the request for an AccountBalance command.\n *\n * address - The account address.\n */\nexport interface IAccountBalanceRequest {\n address: string;\n}\n\n/**\n * Represents the response from an AccountBalance command.\n *\n * finalBalance - The account's final confirmed balance.\n * candidateBalance - The account's pending balance.\n */\nexport interface IAccountBalanceResponse {\n finalBalance: string;\n candidateBalance: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BearbyConnect.d.ts","sourceRoot":"","sources":["../../../src/bearbyWallet/BearbyConnect.ts"],"names":[],"mappings":"AAEA,wBAAsB,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"BearbyConnect.d.ts","sourceRoot":"","sources":["../../../src/bearbyWallet/BearbyConnect.ts"],"names":[],"mappings":"AAEA,wBAAsB,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,CAErD;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAMnD;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAGtD"}
|
|
@@ -3,10 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.disconnectBearby = exports.connectBearby = exports.detectBearby = void 0;
|
|
4
4
|
const bearby_js_1 = require("@hicaru/bearby.js");
|
|
5
5
|
async function detectBearby() {
|
|
6
|
-
|
|
7
|
-
return true;
|
|
8
|
-
}
|
|
9
|
-
return false;
|
|
6
|
+
return !!globalThis?.window?.bearby;
|
|
10
7
|
}
|
|
11
8
|
exports.detectBearby = detectBearby;
|
|
12
9
|
async function connectBearby() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BearbyConnect.js","sourceRoot":"","sources":["../../../src/bearbyWallet/BearbyConnect.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AAElC,KAAK,UAAU,YAAY;IAChC,
|
|
1
|
+
{"version":3,"file":"BearbyConnect.js","sourceRoot":"","sources":["../../../src/bearbyWallet/BearbyConnect.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AAElC,KAAK,UAAU,YAAY;IAChC,OAAO,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC;AACtC,CAAC;AAFD,oCAEC;AAEM,KAAK,UAAU,aAAa;IACjC,IAAI;QACF,MAAM,gBAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;KAC7B;IAAC,OAAO,EAAE,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;KACjB;AACH,CAAC;AAND,sCAMC;AAEM,KAAK,UAAU,gBAAgB;IACpC,MAAM,gBAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAC/B,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;AACrC,CAAC;AAHD,4CAGC","sourcesContent":["import { web3 } from '@hicaru/bearby.js';\n\nexport async function detectBearby(): Promise<boolean> {\n return !!globalThis?.window?.bearby;\n}\n\nexport async function connectBearby(): Promise<void> {\n try {\n await web3.wallet.connect();\n } catch (ex) {\n console.log(ex);\n }\n}\n\nexport async function disconnectBearby(): Promise<void> {\n await web3.wallet.disconnect();\n console.log('Bearby disconnected');\n}\n"]}
|
package/dist/cmd/index.d.ts
CHANGED
package/dist/cmd/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,gBAAgB;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,OAAO,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,gBAAgB;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,OAAO,MAAM,CAAC;QACtB,MAAM,CAAC,EAAE,OAAO,CAAC;KAClB;CACF;AAQD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAUjD,oBAAY,iBAAiB;IAC3B,oBAAoB,kBAAkB;IACtC,qBAAqB,mBAAmB;IACxC,qBAAqB,mBAAmB;IACxC,oBAAoB,mBAAmB;IACvC,kBAAkB,gBAAgB;IAClC,cAAc,oBAAoB;IAClC,WAAW,iBAAiB;IAC5B,0BAA0B,yBAAyB;IACnD,gBAAgB,uBAAuB;IACvC,eAAe,sBAAsB;IACrC,sBAAsB,6BAA6B;IACnD,aAAa,oBAAoB;CAClC;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAC7B,KAAK,UAAO,EACZ,OAAO,SAAO,EACd,YAAY,SAAM,GACjB,OAAO,CAAC,SAAS,EAAE,CAAC,CAuBtB;AAmBD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,SAAsB,GAAG,IAAI,CAU7E;AAED,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,QAAQ,EACR,OAAO,EACP,oBAAoB,EACpB,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,SAAS,EACT,QAAQ,GACT,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/cmd/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,gBAAgB;AAChB,mCAAgC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,gBAAgB;AAChB,mCAAgC;AAShC,6BAA6B;AAC7B,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,MAAM,CAAC,MAAM,GAAG,eAAM,CAAC;CACxB;AAED,qDAAuE;AAEvE,kDAA+C;AAC/C,8EAG6C;AAC7C,gEAA4D;AAC5D,kEAA+D;AAC/D,uCAAoC;AAEpC,IAAY,iBAaX;AAbD,WAAY,iBAAiB;IAC3B,2DAAsC,CAAA;IACtC,6DAAwC,CAAA;IACxC,6DAAwC,CAAA;IACxC,4DAAuC,CAAA;IACvC,uDAAkC,CAAA;IAClC,uDAAkC,CAAA;IAClC,iDAA4B,CAAA;IAC5B,wEAAmD,CAAA;IACnD,4DAAuC,CAAA;IACvC,0DAAqC,CAAA;IACrC,wEAAmD,C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ACF,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,IAAY,EAAE,EAAE,GAAG,+BAAmB;IACrE,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;QACnC,MAAM,aAAa,GAAG,IAAI,WAAW,CAAC,UAAU,EAAE;YAChD,MAAM,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;SAC/B,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,QAAQ,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC;QAC7C,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;SACtC;KACF;AACH,CAAC;AAVD,4CAUC;AAID,qCAWmB;AAJjB,kGAAA,OAAO,OAAA;AAMT,uCASoB;AARlB,oHAAA,wBAAwB,OAAA;AACxB,kHAAA,sBAAsB,OAAA;AAMtB,oGAAA,QAAQ,OAAA;AAKV,0EAAyE;AAAhE,0HAAA,mBAAmB,OAAA;AAE5B,8DAA+E;AAAtE,8GAAA,aAAa,OAAA;AAAE,iHAAA,gBAAgB,OAAA","sourcesContent":["/** Polyfills */\nimport { Buffer } from 'buffer';\n\ndeclare global {\n interface Window {\n Buffer: typeof Buffer;\n bearby?: unknown;\n }\n}\n\n// Check if we are on browser\nif (typeof window !== 'undefined') {\n window.Buffer = Buffer;\n}\n\nimport { MASSA_WINDOW_OBJECT, connector } from './connector/Connector';\nimport { IProvider } from './provider/IProvider';\nimport { Provider } from './provider/Provider';\nimport {\n MASSA_STATION_PROVIDER_NAME,\n MassaStationProvider,\n} from './massaStation/MassaStationProvider';\nimport { detectBearby } from './bearbyWallet/BearbyConnect';\nimport { BearbyProvider } from './bearbyWallet/BearbyProvider';\nimport { wait } from './utils/time';\n\nexport enum AvailableCommands {\n ProviderListAccounts = 'LIST_ACCOUNTS',\n ProviderDeleteAccount = 'DELETE_ACCOUNT',\n ProviderImportAccount = 'IMPORT_ACCOUNT',\n ProviderGetNodesUrls = 'GET_NODES_URLS',\n ProviderGetNetwork = 'GET_NETWORK',\n AccountBalance = 'ACCOUNT_BALANCE',\n AccountSign = 'ACCOUNT_SIGN',\n ProviderGenerateNewAccount = 'GENERATE_NEW_ACCOUNT',\n AccountSellRolls = 'ACCOUNT_SELL_ROLLS',\n AccountBuyRolls = 'ACCOUNT_BUY_ROLLS',\n AccountSendTransaction = 'ACCOUNT_SEND_TRANSACTION',\n AccountCallSC = 'ACCOUNT_CALL_SC',\n}\n\nexport interface ITransactionDetails {\n operationId: string;\n}\n\n/**\n * Get the list of providers that are available to interact with.\n *\n * @param retry - If true, will retry to get the list of providers if none are available.\n * @param pollInterval - The timeout in milliseconds to wait between retries. default is 2000ms.\n * @param timeout - The timeout in milliseconds to wait before giving up. default is 3000ms.\n *\n * @returns An array of providers.\n */\nexport async function providers(\n retry = true,\n timeout = 3000,\n pollInterval = 500,\n): Promise<IProvider[]> {\n const startTime = Date.now();\n\n await connector.startMassaStationDiscovery();\n\n let bearby: BearbyProvider | undefined;\n if (await detectBearby()) {\n bearby = new BearbyProvider('BEARBY');\n }\n\n while (Date.now() - startTime < timeout) {\n const providerInstances: IProvider[] = getProviderInstances();\n\n if (bearby) providerInstances.push(bearby);\n\n if (!retry || providerInstances.length > 0) {\n return providerInstances;\n }\n\n await wait(pollInterval);\n }\n\n return [];\n}\n\nfunction getProviderInstances() {\n const availableProviders = Object.keys(connector.getWalletProviders());\n\n const providerInstances: IProvider[] = availableProviders.map(\n (providerName) => {\n if (providerName === MASSA_STATION_PROVIDER_NAME) {\n return new MassaStationProvider(\n connector.getProviderInfo(providerName),\n );\n } else {\n return new Provider(providerName);\n }\n },\n );\n return providerInstances;\n}\n\n/**\n * Manually register a provider to interact with.\n *\n * @param name - The name of the provider.\n * @param id - The id of the HTML element that is used to communicate with the provider.\n */\nexport function registerProvider(name: string, id = MASSA_WINDOW_OBJECT): void {\n if (typeof document !== 'undefined') {\n const registerEvent = new CustomEvent('register', {\n detail: { providerName: name },\n });\n const element = document?.getElementById(id);\n if (element) {\n element.dispatchEvent(registerEvent);\n }\n }\n}\n\nexport { AllowedRequests, AllowedResponses } from './connector';\n\nexport {\n IAccountDetails,\n IAccountBalanceRequest,\n IAccountBalanceResponse,\n IAccountSignRequest,\n IAccountSignResponse,\n IAccount,\n Account,\n IAccountRollsRequest,\n IAccountSendTransactionRequest,\n IAccountCallSCRequest,\n} from './account';\n\nexport {\n EAccountDeletionResponse,\n EAccountImportResponse,\n IAccountDeletionRequest,\n IAccountDeletionResponse,\n IAccountImportRequest,\n IAccountImportResponse,\n IProvider,\n Provider,\n} from './provider';\n\nexport { IMassaStationWallet } from './massaStation/MassaStationProvider';\n\nexport { MassaStationAccount } from './massaStation/MassaStationAccount';\n\nexport { connectBearby, disconnectBearby } from './bearbyWallet/BearbyConnect';\n"]}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Represents the request for an AccountBalance command.
|
|
3
|
+
*
|
|
4
|
+
* address - The account address.
|
|
3
5
|
*/
|
|
4
6
|
export interface IAccountBalanceRequest {
|
|
5
7
|
address: string;
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
10
|
+
* Represents the response from an AccountBalance command.
|
|
11
|
+
*
|
|
12
|
+
* finalBalance - The account's final confirmed balance.
|
|
13
|
+
* candidateBalance - The account's pending balance.
|
|
9
14
|
*/
|
|
10
15
|
export interface IAccountBalanceResponse {
|
|
11
16
|
finalBalance: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountBalance.d.ts","sourceRoot":"","sources":["../../../src/account/AccountBalance.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"AccountBalance.d.ts","sourceRoot":"","sources":["../../../src/account/AccountBalance.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountBalance.js","sourceRoot":"","sources":["../../../src/account/AccountBalance.ts"],"names":[],"mappings":"","sourcesContent":["/**\n *
|
|
1
|
+
{"version":3,"file":"AccountBalance.js","sourceRoot":"","sources":["../../../src/account/AccountBalance.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents the request for an AccountBalance command.\n *\n * address - The account address.\n */\nexport interface IAccountBalanceRequest {\n address: string;\n}\n\n/**\n * Represents the response from an AccountBalance command.\n *\n * finalBalance - The account's final confirmed balance.\n * candidateBalance - The account's pending balance.\n */\nexport interface IAccountBalanceResponse {\n finalBalance: string;\n candidateBalance: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BearbyConnect.d.ts","sourceRoot":"","sources":["../../../src/bearbyWallet/BearbyConnect.ts"],"names":[],"mappings":"AAEA,wBAAsB,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"BearbyConnect.d.ts","sourceRoot":"","sources":["../../../src/bearbyWallet/BearbyConnect.ts"],"names":[],"mappings":"AAEA,wBAAsB,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,CAErD;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAMnD;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAGtD"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { web3 } from '@hicaru/bearby.js';
|
|
2
2
|
export async function detectBearby() {
|
|
3
|
-
|
|
4
|
-
return true;
|
|
5
|
-
}
|
|
6
|
-
return false;
|
|
3
|
+
return !!globalThis?.window?.bearby;
|
|
7
4
|
}
|
|
8
5
|
export async function connectBearby() {
|
|
9
6
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BearbyConnect.js","sourceRoot":"","sources":["../../../src/bearbyWallet/BearbyConnect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,
|
|
1
|
+
{"version":3,"file":"BearbyConnect.js","sourceRoot":"","sources":["../../../src/bearbyWallet/BearbyConnect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,OAAO,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC;AACtC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,IAAI;QACF,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;KAC7B;IAAC,OAAO,EAAE,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;KACjB;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAC/B,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;AACrC,CAAC","sourcesContent":["import { web3 } from '@hicaru/bearby.js';\n\nexport async function detectBearby(): Promise<boolean> {\n return !!globalThis?.window?.bearby;\n}\n\nexport async function connectBearby(): Promise<void> {\n try {\n await web3.wallet.connect();\n } catch (ex) {\n console.log(ex);\n }\n}\n\nexport async function disconnectBearby(): Promise<void> {\n await web3.wallet.disconnect();\n console.log('Bearby disconnected');\n}\n"]}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,gBAAgB;AAChB,OAAO,EAAE,MAAM,EAAE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B,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,SAAS,EACT,QAAQ,GACT,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAShC,6BAA6B;AAC7B,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;CACxB;AAED,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,MAAM,CAAN,IAAY,iBAaX;AAbD,WAAY,iBAAiB;IAC3B,2DAAsC,CAAA;IACtC,6DAAwC,CAAA;IACxC,6DAAwC,CAAA;IACxC,4DAAuC,C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CAAC,CACxC,CAAC;SACH;aAAM;YACL,OAAO,IAAI,QAAQ,CAAC,YAAY,CAAC,CAAC;SACnC;IACH,CAAC,CACF,CAAC;IACF,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,EAAE,GAAG,mBAAmB;IACrE,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;QACnC,MAAM,aAAa,GAAG,IAAI,WAAW,CAAC,UAAU,EAAE;YAChD,MAAM,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;SAC/B,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,QAAQ,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC;QAC7C,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;SACtC;KACF;AACH,CAAC;AAID,OAAO,EAOL,OAAO,GAIR,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EAMtB,QAAQ,GACT,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["/** Polyfills */\nimport { Buffer } from 'buffer';\n\ndeclare global {\n interface Window {\n Buffer: typeof Buffer;\n bearby?: unknown;\n }\n}\n\n// Check if we are on browser\nif (typeof window !== 'undefined') {\n window.Buffer = Buffer;\n}\n\nimport { MASSA_WINDOW_OBJECT, connector } from './connector/Connector';\nimport { IProvider } from './provider/IProvider';\nimport { Provider } from './provider/Provider';\nimport {\n MASSA_STATION_PROVIDER_NAME,\n MassaStationProvider,\n} from './massaStation/MassaStationProvider';\nimport { detectBearby } from './bearbyWallet/BearbyConnect';\nimport { BearbyProvider } from './bearbyWallet/BearbyProvider';\nimport { wait } from './utils/time';\n\nexport enum AvailableCommands {\n ProviderListAccounts = 'LIST_ACCOUNTS',\n ProviderDeleteAccount = 'DELETE_ACCOUNT',\n ProviderImportAccount = 'IMPORT_ACCOUNT',\n ProviderGetNodesUrls = 'GET_NODES_URLS',\n ProviderGetNetwork = 'GET_NETWORK',\n AccountBalance = 'ACCOUNT_BALANCE',\n AccountSign = 'ACCOUNT_SIGN',\n ProviderGenerateNewAccount = 'GENERATE_NEW_ACCOUNT',\n AccountSellRolls = 'ACCOUNT_SELL_ROLLS',\n AccountBuyRolls = 'ACCOUNT_BUY_ROLLS',\n AccountSendTransaction = 'ACCOUNT_SEND_TRANSACTION',\n AccountCallSC = 'ACCOUNT_CALL_SC',\n}\n\nexport interface ITransactionDetails {\n operationId: string;\n}\n\n/**\n * Get the list of providers that are available to interact with.\n *\n * @param retry - If true, will retry to get the list of providers if none are available.\n * @param pollInterval - The timeout in milliseconds to wait between retries. default is 2000ms.\n * @param timeout - The timeout in milliseconds to wait before giving up. default is 3000ms.\n *\n * @returns An array of providers.\n */\nexport async function providers(\n retry = true,\n timeout = 3000,\n pollInterval = 500,\n): Promise<IProvider[]> {\n const startTime = Date.now();\n\n await connector.startMassaStationDiscovery();\n\n let bearby: BearbyProvider | undefined;\n if (await detectBearby()) {\n bearby = new BearbyProvider('BEARBY');\n }\n\n while (Date.now() - startTime < timeout) {\n const providerInstances: IProvider[] = getProviderInstances();\n\n if (bearby) providerInstances.push(bearby);\n\n if (!retry || providerInstances.length > 0) {\n return providerInstances;\n }\n\n await wait(pollInterval);\n }\n\n return [];\n}\n\nfunction getProviderInstances() {\n const availableProviders = Object.keys(connector.getWalletProviders());\n\n const providerInstances: IProvider[] = availableProviders.map(\n (providerName) => {\n if (providerName === MASSA_STATION_PROVIDER_NAME) {\n return new MassaStationProvider(\n connector.getProviderInfo(providerName),\n );\n } else {\n return new Provider(providerName);\n }\n },\n );\n return providerInstances;\n}\n\n/**\n * Manually register a provider to interact with.\n *\n * @param name - The name of the provider.\n * @param id - The id of the HTML element that is used to communicate with the provider.\n */\nexport function registerProvider(name: string, id = MASSA_WINDOW_OBJECT): void {\n if (typeof document !== 'undefined') {\n const registerEvent = new CustomEvent('register', {\n detail: { providerName: name },\n });\n const element = document?.getElementById(id);\n if (element) {\n element.dispatchEvent(registerEvent);\n }\n }\n}\n\nexport { AllowedRequests, AllowedResponses } from './connector';\n\nexport {\n IAccountDetails,\n IAccountBalanceRequest,\n IAccountBalanceResponse,\n IAccountSignRequest,\n IAccountSignResponse,\n IAccount,\n Account,\n IAccountRollsRequest,\n IAccountSendTransactionRequest,\n IAccountCallSCRequest,\n} from './account';\n\nexport {\n EAccountDeletionResponse,\n EAccountImportResponse,\n IAccountDeletionRequest,\n IAccountDeletionResponse,\n IAccountImportRequest,\n IAccountImportResponse,\n IProvider,\n Provider,\n} from './provider';\n\nexport { IMassaStationWallet } from './massaStation/MassaStationProvider';\n\nexport { MassaStationAccount } from './massaStation/MassaStationAccount';\n\nexport { connectBearby, disconnectBearby } from './bearbyWallet/BearbyConnect';\n"]}
|
package/package.json
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@massalabs/wallet-provider",
|
|
3
|
-
"version": "1.4.2-dev.
|
|
3
|
+
"version": "1.4.2-dev.20230929085309",
|
|
4
4
|
"description": "massa's wallet provider",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"
|
|
5
|
+
"main": "dist/esm/index.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/esm/index.d.ts",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"up": "npm update",
|
|
9
10
|
"check": "npm outdated",
|
|
10
11
|
"upgrade": "npm run up && npm run check && npm run build",
|
|
11
12
|
"clean-dist": "rimraf dist/*",
|
|
12
|
-
"build-package": "tsc -d -p ./tsconfig.json",
|
|
13
13
|
"build-esm": "tsc --project tsconfig.esm.json",
|
|
14
14
|
"build-commonjs": "tsc --project tsconfig.commonjs.json",
|
|
15
|
-
"build-bundle": "webpack",
|
|
16
15
|
"build": "npm run fmt && npm-run-all clean-dist build-*",
|
|
17
|
-
"test-extension:serve-dapp": "
|
|
16
|
+
"test-extension:serve-dapp": "cd test-extension/dapp-vite && npm run preview",
|
|
18
17
|
"test-extension": "cd ./test-extension && npx playwright test",
|
|
19
|
-
"unit-test-package": "jest --config ./jest.config.package.js",
|
|
20
18
|
"unit-test-commonjs": "jest --config ./jest.config.commonjs.js",
|
|
21
19
|
"unit-test-esm": "jest --config ./jest.config.esm.js",
|
|
22
20
|
"unit-test": "npm-run-all unit-test-*",
|
|
@@ -51,9 +49,7 @@
|
|
|
51
49
|
"massa"
|
|
52
50
|
],
|
|
53
51
|
"files": [
|
|
54
|
-
"dist"
|
|
55
|
-
"bundle.js",
|
|
56
|
-
"bundle.min.js"
|
|
52
|
+
"dist"
|
|
57
53
|
],
|
|
58
54
|
"dependencies": {
|
|
59
55
|
"@hicaru/bearby.js": "^0.5.0",
|
|
@@ -77,7 +73,6 @@
|
|
|
77
73
|
"@types/node": "^18.13.0",
|
|
78
74
|
"@types/secp256k1": "^4.0.3",
|
|
79
75
|
"babel-jest": "^29.6.4",
|
|
80
|
-
"browserify": "^17.0.0",
|
|
81
76
|
"chai": "^4.3.7",
|
|
82
77
|
"chalk": "^4.1.0",
|
|
83
78
|
"eslint-plugin-jsdoc": "^41.1.1",
|
|
@@ -97,11 +92,7 @@
|
|
|
97
92
|
"tslib": "^2.5.0",
|
|
98
93
|
"tslint": "^6.1.3",
|
|
99
94
|
"typedoc": "^0.23.25",
|
|
100
|
-
"typescript": "^4.9.5"
|
|
101
|
-
"uglify-js": "^3.17.4",
|
|
102
|
-
"uglifyify": "^5.0.2",
|
|
103
|
-
"webpack": "^5.88.2",
|
|
104
|
-
"webpack-cli": "^5.1.4"
|
|
95
|
+
"typescript": "^4.9.5"
|
|
105
96
|
},
|
|
106
97
|
"optionalDependencies": {
|
|
107
98
|
"bufferutil": "^4.0.7",
|