@fuel-ts/account 0.0.0-pr-1699-20240202183346
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.
Potentially problematic release.
This version of @fuel-ts/account might be problematic. Click here for more details.
- package/LICENSE +201 -0
- package/README.md +70 -0
- package/dist/account.d.ts +174 -0
- package/dist/account.d.ts.map +1 -0
- package/dist/base-wallet-unlocked.d.ts +73 -0
- package/dist/base-wallet-unlocked.d.ts.map +1 -0
- package/dist/configs.d.ts +2 -0
- package/dist/configs.d.ts.map +1 -0
- package/dist/configs.global.js +6 -0
- package/dist/configs.global.js.map +1 -0
- package/dist/configs.js +31 -0
- package/dist/configs.js.map +1 -0
- package/dist/configs.mjs +6 -0
- package/dist/configs.mjs.map +1 -0
- package/dist/connectors/default-connector.d.ts +7 -0
- package/dist/connectors/default-connector.d.ts.map +1 -0
- package/dist/connectors/fixtures/generate-accounts.d.ts +2 -0
- package/dist/connectors/fixtures/generate-accounts.d.ts.map +1 -0
- package/dist/connectors/fixtures/mocked-connector.d.ts +45 -0
- package/dist/connectors/fixtures/mocked-connector.d.ts.map +1 -0
- package/dist/connectors/fixtures/promise-callback.d.ts +7 -0
- package/dist/connectors/fixtures/promise-callback.d.ts.map +1 -0
- package/dist/connectors/fuel-connector.d.ts +187 -0
- package/dist/connectors/fuel-connector.d.ts.map +1 -0
- package/dist/connectors/fuel-wallet-connector.d.ts +54 -0
- package/dist/connectors/fuel-wallet-connector.d.ts.map +1 -0
- package/dist/connectors/fuel-wallet-development-connector.d.ts +7 -0
- package/dist/connectors/fuel-wallet-development-connector.d.ts.map +1 -0
- package/dist/connectors/fuel-wallet-locked.d.ts +13 -0
- package/dist/connectors/fuel-wallet-locked.d.ts.map +1 -0
- package/dist/connectors/fuel-wallet-provider.d.ts +14 -0
- package/dist/connectors/fuel-wallet-provider.d.ts.map +1 -0
- package/dist/connectors/fuel.d.ts +129 -0
- package/dist/connectors/fuel.d.ts.map +1 -0
- package/dist/connectors/fuelet-wallet-connector.d.ts +8 -0
- package/dist/connectors/fuelet-wallet-connector.d.ts.map +1 -0
- package/dist/connectors/types/abi.d.ts +9 -0
- package/dist/connectors/types/abi.d.ts.map +1 -0
- package/dist/connectors/types/account.d.ts +23 -0
- package/dist/connectors/types/account.d.ts.map +1 -0
- package/dist/connectors/types/asset.d.ts +16 -0
- package/dist/connectors/types/asset.d.ts.map +1 -0
- package/dist/connectors/types/coin.d.ts +6 -0
- package/dist/connectors/types/coin.d.ts.map +1 -0
- package/dist/connectors/types/connection.d.ts +7 -0
- package/dist/connectors/types/connection.d.ts.map +1 -0
- package/dist/connectors/types/connector-metadata.d.ts +12 -0
- package/dist/connectors/types/connector-metadata.d.ts.map +1 -0
- package/dist/connectors/types/connector-types.d.ts +34 -0
- package/dist/connectors/types/connector-types.d.ts.map +1 -0
- package/dist/connectors/types/constants.d.ts +7 -0
- package/dist/connectors/types/constants.d.ts.map +1 -0
- package/dist/connectors/types/data-type.d.ts +46 -0
- package/dist/connectors/types/data-type.d.ts.map +1 -0
- package/dist/connectors/types/error.d.ts +18 -0
- package/dist/connectors/types/error.d.ts.map +1 -0
- package/dist/connectors/types/events.d.ts +150 -0
- package/dist/connectors/types/events.d.ts.map +1 -0
- package/dist/connectors/types/fuel-storage.d.ts +11 -0
- package/dist/connectors/types/fuel-storage.d.ts.map +1 -0
- package/dist/connectors/types/index.d.ts +15 -0
- package/dist/connectors/types/index.d.ts.map +1 -0
- package/dist/connectors/types/message.d.ts +15 -0
- package/dist/connectors/types/message.d.ts.map +1 -0
- package/dist/connectors/types/nertwork-data.d.ts +7 -0
- package/dist/connectors/types/nertwork-data.d.ts.map +1 -0
- package/dist/connectors/types/target-object.d.ts +14 -0
- package/dist/connectors/types/target-object.d.ts.map +1 -0
- package/dist/connectors/utils/cache.d.ts +14 -0
- package/dist/connectors/utils/cache.d.ts.map +1 -0
- package/dist/connectors/utils/dispatch-fuel-connector-event.d.ts +7 -0
- package/dist/connectors/utils/dispatch-fuel-connector-event.d.ts.map +1 -0
- package/dist/connectors/utils/get-asset-by-chain.d.ts +3 -0
- package/dist/connectors/utils/get-asset-by-chain.d.ts.map +1 -0
- package/dist/connectors/utils/index.d.ts +5 -0
- package/dist/connectors/utils/index.d.ts.map +1 -0
- package/dist/connectors/utils/promises.d.ts +8 -0
- package/dist/connectors/utils/promises.d.ts.map +1 -0
- package/dist/hdwallet/hdwallet.d.ts +58 -0
- package/dist/hdwallet/hdwallet.d.ts.map +1 -0
- package/dist/hdwallet/index.d.ts +2 -0
- package/dist/hdwallet/index.d.ts.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.global.js +48673 -0
- package/dist/index.global.js.map +1 -0
- package/dist/index.js +8728 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +8642 -0
- package/dist/index.mjs.map +1 -0
- package/dist/keystore-wallet.d.ts +38 -0
- package/dist/keystore-wallet.d.ts.map +1 -0
- package/dist/mnemonic/index.d.ts +3 -0
- package/dist/mnemonic/index.d.ts.map +1 -0
- package/dist/mnemonic/mnemonic.d.ts +85 -0
- package/dist/mnemonic/mnemonic.d.ts.map +1 -0
- package/dist/mnemonic/utils.d.ts +8 -0
- package/dist/mnemonic/utils.d.ts.map +1 -0
- package/dist/predicate/index.d.ts +3 -0
- package/dist/predicate/index.d.ts.map +1 -0
- package/dist/predicate/predicate.d.ts +93 -0
- package/dist/predicate/predicate.d.ts.map +1 -0
- package/dist/predicate/utils/getPredicateRoot.d.ts +12 -0
- package/dist/predicate/utils/getPredicateRoot.d.ts.map +1 -0
- package/dist/predicate/utils/index.d.ts +2 -0
- package/dist/predicate/utils/index.d.ts.map +1 -0
- package/dist/providers/__generated__/operations.d.ts +3539 -0
- package/dist/providers/__generated__/operations.d.ts.map +1 -0
- package/dist/providers/coin-quantity.d.ts +21 -0
- package/dist/providers/coin-quantity.d.ts.map +1 -0
- package/dist/providers/coin.d.ts +15 -0
- package/dist/providers/coin.d.ts.map +1 -0
- package/dist/providers/fuel-graphql-subscriber.d.ts +13 -0
- package/dist/providers/fuel-graphql-subscriber.d.ts.map +1 -0
- package/dist/providers/index.d.ts +11 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/memory-cache.d.ts +11 -0
- package/dist/providers/memory-cache.d.ts.map +1 -0
- package/dist/providers/message.d.ts +61 -0
- package/dist/providers/message.d.ts.map +1 -0
- package/dist/providers/provider.d.ts +500 -0
- package/dist/providers/provider.d.ts.map +1 -0
- package/dist/providers/resource.d.ts +37 -0
- package/dist/providers/resource.d.ts.map +1 -0
- package/dist/providers/transaction-request/create-transaction-request.d.ts +73 -0
- package/dist/providers/transaction-request/create-transaction-request.d.ts.map +1 -0
- package/dist/providers/transaction-request/errors.d.ts +25 -0
- package/dist/providers/transaction-request/errors.d.ts.map +1 -0
- package/dist/providers/transaction-request/hash-transaction.d.ts +9 -0
- package/dist/providers/transaction-request/hash-transaction.d.ts.map +1 -0
- package/dist/providers/transaction-request/index.d.ts +10 -0
- package/dist/providers/transaction-request/index.d.ts.map +1 -0
- package/dist/providers/transaction-request/input.d.ts +59 -0
- package/dist/providers/transaction-request/input.d.ts.map +1 -0
- package/dist/providers/transaction-request/output.d.ts +39 -0
- package/dist/providers/transaction-request/output.d.ts.map +1 -0
- package/dist/providers/transaction-request/script-transaction-request.d.ts +107 -0
- package/dist/providers/transaction-request/script-transaction-request.d.ts.map +1 -0
- package/dist/providers/transaction-request/scripts.d.ts +6 -0
- package/dist/providers/transaction-request/scripts.d.ts.map +1 -0
- package/dist/providers/transaction-request/storage-slot.d.ts +10 -0
- package/dist/providers/transaction-request/storage-slot.d.ts.map +1 -0
- package/dist/providers/transaction-request/transaction-request.d.ts +267 -0
- package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -0
- package/dist/providers/transaction-request/types.d.ts +10 -0
- package/dist/providers/transaction-request/types.d.ts.map +1 -0
- package/dist/providers/transaction-request/utils.d.ts +4 -0
- package/dist/providers/transaction-request/utils.d.ts.map +1 -0
- package/dist/providers/transaction-request/witness.d.ts +5 -0
- package/dist/providers/transaction-request/witness.d.ts.map +1 -0
- package/dist/providers/transaction-response/getDecodedLogs.d.ts +5 -0
- package/dist/providers/transaction-response/getDecodedLogs.d.ts.map +1 -0
- package/dist/providers/transaction-response/index.d.ts +3 -0
- package/dist/providers/transaction-response/index.d.ts.map +1 -0
- package/dist/providers/transaction-response/transaction-response.d.ts +106 -0
- package/dist/providers/transaction-response/transaction-response.d.ts.map +1 -0
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts +20 -0
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts.map +1 -0
- package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts +21 -0
- package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts.map +1 -0
- package/dist/providers/transaction-summary/call.d.ts +18 -0
- package/dist/providers/transaction-summary/call.d.ts.map +1 -0
- package/dist/providers/transaction-summary/date.d.ts +3 -0
- package/dist/providers/transaction-summary/date.d.ts.map +1 -0
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts +31 -0
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +1 -0
- package/dist/providers/transaction-summary/index.d.ts +11 -0
- package/dist/providers/transaction-summary/index.d.ts.map +1 -0
- package/dist/providers/transaction-summary/input.d.ts +21 -0
- package/dist/providers/transaction-summary/input.d.ts.map +1 -0
- package/dist/providers/transaction-summary/operations.d.ts +42 -0
- package/dist/providers/transaction-summary/operations.d.ts.map +1 -0
- package/dist/providers/transaction-summary/output.d.ts +15 -0
- package/dist/providers/transaction-summary/output.d.ts.map +1 -0
- package/dist/providers/transaction-summary/receipt.d.ts +7 -0
- package/dist/providers/transaction-summary/receipt.d.ts.map +1 -0
- package/dist/providers/transaction-summary/status.d.ts +9 -0
- package/dist/providers/transaction-summary/status.d.ts.map +1 -0
- package/dist/providers/transaction-summary/types.d.ts +147 -0
- package/dist/providers/transaction-summary/types.d.ts.map +1 -0
- package/dist/providers/utils/auto-retry-fetch.d.ts +36 -0
- package/dist/providers/utils/auto-retry-fetch.d.ts.map +1 -0
- package/dist/providers/utils/block-explorer.d.ts +14 -0
- package/dist/providers/utils/block-explorer.d.ts.map +1 -0
- package/dist/providers/utils/gas.d.ts +38 -0
- package/dist/providers/utils/gas.d.ts.map +1 -0
- package/dist/providers/utils/index.d.ts +7 -0
- package/dist/providers/utils/index.d.ts.map +1 -0
- package/dist/providers/utils/json.d.ts +7 -0
- package/dist/providers/utils/json.d.ts.map +1 -0
- package/dist/providers/utils/merge-quantities.d.ts +3 -0
- package/dist/providers/utils/merge-quantities.d.ts.map +1 -0
- package/dist/providers/utils/receipts.d.ts +10 -0
- package/dist/providers/utils/receipts.d.ts.map +1 -0
- package/dist/providers/utils/sleep.d.ts +3 -0
- package/dist/providers/utils/sleep.d.ts.map +1 -0
- package/dist/providers/utils/time.d.ts +40 -0
- package/dist/providers/utils/time.d.ts.map +1 -0
- package/dist/signer/index.d.ts +2 -0
- package/dist/signer/index.d.ts.map +1 -0
- package/dist/signer/signer.d.ts +64 -0
- package/dist/signer/signer.d.ts.map +1 -0
- package/dist/test-utils/generateTestWallet.d.ts +4 -0
- package/dist/test-utils/generateTestWallet.d.ts.map +1 -0
- package/dist/test-utils/launchNode.d.ts +54 -0
- package/dist/test-utils/launchNode.d.ts.map +1 -0
- package/dist/test-utils/seedTestWallet.d.ts +4 -0
- package/dist/test-utils/seedTestWallet.d.ts.map +1 -0
- package/dist/test-utils.d.ts +4 -0
- package/dist/test-utils.d.ts.map +1 -0
- package/dist/test-utils.global.js +51455 -0
- package/dist/test-utils.global.js.map +1 -0
- package/dist/test-utils.js +7885 -0
- package/dist/test-utils.js.map +1 -0
- package/dist/test-utils.mjs +7890 -0
- package/dist/test-utils.mjs.map +1 -0
- package/dist/utils/formatTransferToContractScriptData.d.ts +15 -0
- package/dist/utils/formatTransferToContractScriptData.d.ts.map +1 -0
- package/dist/wallet-manager/index.d.ts +3 -0
- package/dist/wallet-manager/index.d.ts.map +1 -0
- package/dist/wallet-manager/storages/memory-storage.d.ts +10 -0
- package/dist/wallet-manager/storages/memory-storage.d.ts.map +1 -0
- package/dist/wallet-manager/types.d.ts +44 -0
- package/dist/wallet-manager/types.d.ts.map +1 -0
- package/dist/wallet-manager/vaults/mnemonic-vault.d.ts +33 -0
- package/dist/wallet-manager/vaults/mnemonic-vault.d.ts.map +1 -0
- package/dist/wallet-manager/vaults/privatekey-vault.d.ts +33 -0
- package/dist/wallet-manager/vaults/privatekey-vault.d.ts.map +1 -0
- package/dist/wallet-manager/wallet-manager.d.ts +104 -0
- package/dist/wallet-manager/wallet-manager.d.ts.map +1 -0
- package/dist/wallet.d.ts +69 -0
- package/dist/wallet.d.ts.map +1 -0
- package/dist/wallets.d.ts +76 -0
- package/dist/wallets.d.ts.map +1 -0
- package/dist/wordlists/index.d.ts +5 -0
- package/dist/wordlists/index.d.ts.map +1 -0
- package/dist/wordlists/words/english.d.ts +2 -0
- package/dist/wordlists/words/english.d.ts.map +1 -0
- package/package.json +91 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"gas.d.ts","sourceRoot":"","sources":["../../../src/providers/utils/gas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAe,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,EACV,wBAAwB,EAEzB,MAAM,yBAAyB,CAAC;AAEjC,cAAc;AACd,eAAO,MAAM,wBAAwB,QAAS,EAAE,YAAY,EAAE,eAAe,EAAE,KAAG,EACZ,CAAC;AAEvE,cAAc;AACd,eAAO,MAAM,sBAAsB,aAAc,MAAM,wBAAwB,CAAC,KAAG,EAQlF,CAAC;AAEF,w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AAkB,CAAC;AACjC,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/providers/utils/json.ts"],"names":[],"mappings":"AAkCA;;;GAGG;AACH,cAAc;AACd,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,OAKtC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"merge-quantities.d.ts","sourceRoot":"","sources":["../../../src/providers/utils/merge-quantities.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,eAAO,MAAM,eAAe,SAAU,YAAY,EAAE,QAAQ,YAAY,EAAE,KAAG,YAAY,EAiBxF,CAAC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { ReceiptBurn, ReceiptCall, ReceiptLog, ReceiptLogData, ReceiptMessageOut, ReceiptMint, ReceiptPanic, ReceiptReturn, ReceiptReturnData, ReceiptRevert, ReceiptScriptResult, ReceiptTransfer, ReceiptTransferOut } from '@fuel-ts/transactions';
|
2
|
+
import type { GqlReceipt } from '../__generated__/operations';
|
3
|
+
import type { TransactionResultReceipt } from '../transaction-response';
|
4
|
+
/** @hidden */
|
5
|
+
export declare const getReceiptsWithMissingData: (receipts: Array<TransactionResultReceipt>) => {
|
6
|
+
missingOutputVariables: Array<ReceiptRevert>;
|
7
|
+
missingOutputContractIds: Array<ReceiptPanic>;
|
8
|
+
};
|
9
|
+
export declare function assembleReceiptByType(receipt: GqlReceipt): ReceiptCall | ReceiptReturn | ReceiptReturnData | ReceiptPanic | ReceiptRevert | ReceiptLog | ReceiptLogData | ReceiptTransfer | ReceiptTransferOut | ReceiptScriptResult | ReceiptMessageOut | ReceiptMint | ReceiptBurn;
|
10
|
+
//# sourceMappingURL=receipts.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"receipts.d.ts","sourceRoot":"","sources":["../../../src/providers/utils/receipts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAU/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAgBxE,cAAc;AACd,eAAO,MAAM,0BAA0B,aAAc,MAAM,wBAAwB,CAAC;4BAExD,MAAM,aAAa,CAAC;8BAClB,MAAM,YAAY,CAAC;CAe9C,CAAC;AAIJ,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,UAAU,6NA+MxD"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../../src/providers/utils/sleep.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,oBAMjC"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
/**
|
2
|
+
* @hidden
|
3
|
+
*
|
4
|
+
* Converts a TAI64 timestamp to a Unix timestamp in milliseconds.
|
5
|
+
*
|
6
|
+
* TAI64 is a 64-bit unsigned integer format that represents a point in time
|
7
|
+
* as the number of TAI seconds elapsed since 00:00:00 TAI, January 1, 1970.
|
8
|
+
*
|
9
|
+
* Unix timestamp, on the other hand, represents the number of milliseconds
|
10
|
+
* elapsed since 00:00:00 UTC, January 1, 1970.
|
11
|
+
*
|
12
|
+
* To convert a TAI64 timestamp to a Unix timestamp, we need to subtract the
|
13
|
+
* TAI64 epoch time (00:00:00 TAI, January 1, 1970) from the TAI64 timestamp
|
14
|
+
* and then add the Unix epoch time (00:00:00 UTC, January 1, 1970). The epoch
|
15
|
+
* time difference between TAI64 and Unix is 2 ** 62 + 10.
|
16
|
+
*
|
17
|
+
* @param tai64Timestamp - The TAI64 timestamp to convert.
|
18
|
+
* @returns - The Unix timestamp in milliseconds.
|
19
|
+
*/
|
20
|
+
export declare const fromTai64ToUnix: (tai64Timestamp: string) => number;
|
21
|
+
/**
|
22
|
+
* @hidden
|
23
|
+
*
|
24
|
+
* Converts a Unix timestamp in milliseconds to a TAI64 timestamp.
|
25
|
+
*
|
26
|
+
* Unix timestamp represents the number of milliseconds elapsed since
|
27
|
+
* 00:00:00 UTC, January 1, 1970. TAI64 timestamp is a 64-bit unsigned
|
28
|
+
* integer format that represents a point in time as the number of TAI
|
29
|
+
* seconds elapsed since 00:00:00 TAI, January 1, 1970.
|
30
|
+
*
|
31
|
+
* To convert a Unix timestamp to a TAI64 timestamp, we need to add the
|
32
|
+
* TAI64 epoch time (00:00:00 TAI, January 1, 1970) to the Unix timestamp
|
33
|
+
* and then subtract the Unix epoch time (00:00:00 UTC, January 1, 1970).
|
34
|
+
* The epoch time difference between TAI64 and Unix is 2 ** 62 + 10.
|
35
|
+
*
|
36
|
+
* @param unixTimestampMs - The Unix timestamp in milliseconds to convert.
|
37
|
+
* @returns - The TAI64 timestamp as a string.
|
38
|
+
*/
|
39
|
+
export declare const fromUnixToTai64: (unixTimestampMs: number) => string;
|
40
|
+
//# sourceMappingURL=time.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../src/providers/utils/time.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe,mBAAoB,MAAM,WACS,CAAC;AAEhE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,oBAAqB,MAAM,WACc,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/signer/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { Address } from '@fuel-ts/address';
|
2
|
+
import type { BytesLike } from 'ethers';
|
3
|
+
export declare class Signer {
|
4
|
+
readonly address: Address;
|
5
|
+
readonly publicKey: string;
|
6
|
+
readonly compressedPublicKey: string;
|
7
|
+
readonly privateKey: string;
|
8
|
+
/**
|
9
|
+
* Create a Signer instance from a given private key
|
10
|
+
*
|
11
|
+
* @param privateKey - The private key to use for signing
|
12
|
+
* @returns A new Signer instance
|
13
|
+
*/
|
14
|
+
constructor(privateKey: BytesLike);
|
15
|
+
/**
|
16
|
+
* Sign data using the Signer instance
|
17
|
+
*
|
18
|
+
* Signature is a 64 byte array of the concatenated r and s values with the compressed recoveryParam byte.
|
19
|
+
* @ignore
|
20
|
+
* [Read more](FuelLabs/fuel-specs/specs/protocol/cryptographic_primitives.md#public-key-cryptography)
|
21
|
+
*
|
22
|
+
* @param data - The data to be sign
|
23
|
+
* @returns hashed signature
|
24
|
+
*/
|
25
|
+
sign(data: BytesLike): string;
|
26
|
+
/**
|
27
|
+
* Add point on the current elliptic curve
|
28
|
+
*
|
29
|
+
* @param point - Point to add on the curve
|
30
|
+
* @returns compressed point on the curve
|
31
|
+
*/
|
32
|
+
addPoint(point: BytesLike): string;
|
33
|
+
/**
|
34
|
+
* Recover the public key from a signature performed with [`sign`](#sign).
|
35
|
+
*
|
36
|
+
* @param data - Data
|
37
|
+
* @param signature - hashed signature
|
38
|
+
* @returns public key from signature from the
|
39
|
+
*/
|
40
|
+
static recoverPublicKey(data: BytesLike, signature: BytesLike): string;
|
41
|
+
/**
|
42
|
+
* Recover the address from a signature performed with [`sign`](#sign).
|
43
|
+
*
|
44
|
+
* @param data - Data
|
45
|
+
* @param signature - Signature
|
46
|
+
* @returns Address from signature
|
47
|
+
*/
|
48
|
+
static recoverAddress(data: BytesLike, signature: BytesLike): Address;
|
49
|
+
/**
|
50
|
+
* Generate a random privateKey
|
51
|
+
*
|
52
|
+
* @param entropy - Adds extra entropy to generate the privateKey
|
53
|
+
* @returns random 32-byte hashed
|
54
|
+
*/
|
55
|
+
static generatePrivateKey(entropy?: BytesLike): string | Uint8Array;
|
56
|
+
/**
|
57
|
+
* Extended publicKey from a compact publicKey
|
58
|
+
*
|
59
|
+
* @param publicKey - Compact publicKey
|
60
|
+
* @returns extended publicKey
|
61
|
+
*/
|
62
|
+
static extendPublicKey(publicKey: BytesLike): string;
|
63
|
+
}
|
64
|
+
//# sourceMappingURL=signer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../src/signer/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAK3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGxC,qBAAa,MAAM;IACjB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IAErC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;;;;OAKG;gBACS,UAAU,EAAE,SAAS;IAoBjC;;;;;;;;;OASG;IACH,IAAI,CAAC,IAAI,EAAE,SAAS;IAYpB;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS;IAOzB;;;;;;OAMG;IACH,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM;IAiBtE;;;;;;OAMG;IACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO;IAIrE;;;;;OAKG;IACH,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,SAAS;IAI7C;;;;;OAKG;IACH,MAAM,CAAC,eAAe,CAAC,SAAS,EAAE,SAAS;CAI5C"}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import type { Provider, CoinQuantityLike } from '../providers';
|
2
|
+
import type { WalletUnlocked } from '../wallets';
|
3
|
+
export declare const generateTestWallet: (provider: Provider, quantities?: CoinQuantityLike[]) => Promise<WalletUnlocked>;
|
4
|
+
//# sourceMappingURL=generateTestWallet.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generateTestWallet.d.ts","sourceRoot":"","sources":["../../src/test-utils/generateTestWallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjD,eAAO,MAAM,kBAAkB,aACnB,QAAQ,eACL,gBAAgB,EAAE,KAC9B,QAAQ,cAAc,CAMxB,CAAC"}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import type { ChildProcessWithoutNullStreams } from 'child_process';
|
3
|
+
import { Provider } from '../providers';
|
4
|
+
import type { WalletUnlocked } from '../wallets';
|
5
|
+
export type LaunchNodeOptions = {
|
6
|
+
ip?: string;
|
7
|
+
port?: string;
|
8
|
+
args?: string[];
|
9
|
+
useSystemFuelCore?: boolean;
|
10
|
+
loggingEnabled?: boolean;
|
11
|
+
debugEnabled?: boolean;
|
12
|
+
basePath?: string;
|
13
|
+
};
|
14
|
+
export type LaunchNodeResult = Promise<{
|
15
|
+
cleanup: () => void;
|
16
|
+
ip: string;
|
17
|
+
port: string;
|
18
|
+
chainConfigPath: string;
|
19
|
+
}>;
|
20
|
+
export type KillNodeParams = {
|
21
|
+
child: ChildProcessWithoutNullStreams;
|
22
|
+
configPath: string;
|
23
|
+
killFn: (pid: number) => void;
|
24
|
+
state: {
|
25
|
+
isDead: boolean;
|
26
|
+
};
|
27
|
+
};
|
28
|
+
export declare const killNode: (params: KillNodeParams) => void;
|
29
|
+
/**
|
30
|
+
* Launches a fuel-core node.
|
31
|
+
* @param ip - the ip to bind to. (optional, defaults to 0.0.0.0)
|
32
|
+
* @param port - the port to bind to. (optional, defaults to 4000 or the next available port)
|
33
|
+
* @param args - additional arguments to pass to fuel-core.
|
34
|
+
* @param useSystemFuelCore - whether to use the system fuel-core binary or the one provided by the \@fuel-ts/fuel-core package.
|
35
|
+
* @param loggingEnabled - whether the node should output logs. (optional, defaults to true)
|
36
|
+
* @param debugEnabled - whether the node should log debug messages. (optional, defaults to false)
|
37
|
+
* @param basePath - the base path to use for the temporary folder. (optional, defaults to os.tmpdir())
|
38
|
+
* */
|
39
|
+
export declare const launchNode: ({ ip, port, args, useSystemFuelCore, loggingEnabled, debugEnabled, basePath, }: LaunchNodeOptions) => LaunchNodeResult;
|
40
|
+
export type LaunchNodeAndGetWalletsResult = Promise<{
|
41
|
+
wallets: WalletUnlocked[];
|
42
|
+
stop: () => void;
|
43
|
+
provider: Provider;
|
44
|
+
}>;
|
45
|
+
/**
|
46
|
+
* Launches a fuel-core node and returns a provider, 10 wallets, and a cleanup function to stop the node.
|
47
|
+
* @param launchNodeOptions - options to launch the fuel-core node with.
|
48
|
+
* @param walletCount - the number of wallets to generate. (optional, defaults to 10)
|
49
|
+
* */
|
50
|
+
export declare const launchNodeAndGetWallets: ({ launchNodeOptions, walletCount, }?: {
|
51
|
+
launchNodeOptions?: Partial<LaunchNodeOptions> | undefined;
|
52
|
+
walletCount?: number | undefined;
|
53
|
+
}) => LaunchNodeAndGetWalletsResult;
|
54
|
+
//# sourceMappingURL=launchNode.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"launchNode.d.ts","sourceRoot":"","sources":["../../src/test-utils/launchNode.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAC;AAUpE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,KA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"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGrD,eAAO,MAAM,cAAc,WAAkB,OAAO,cAAc,gBAAgB,EAAE,kBAuBnF,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../src/test-utils.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC"}
|