Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/components/built/SmartObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function MetaData({ smartObject, prev, next }) {
${next
? 'bg-white text-black border-gray-300 hover:bg-gray-100 focus:ring-4 focus:ring-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-700'
: 'bg-gray-200 text-gray-400 cursor-not-allowed dark:bg-gray-700 dark:text-gray-500'}`, "aria-disabled": !next, children: "Next" }), _jsx("button", { onClick: toggleVisibility, className: `flex items-center justify-center px-4 h-10 ms-3 text-sm font-medium border rounded-lg transition
bg-white text-black border-gray-300 hover:bg-gray-100 focus:ring-4 focus:ring-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-700`, children: isVisible ? 'Hide Metadata' : 'Show Metadata' })] }) }), isVisible && (_jsxs("table", { className: "w-full mt-4 mb-8 text-[12px] text-left text-gray-500 dark:text-gray-400", children: [_jsx("thead", { className: "text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400", children: _jsxs("tr", { children: [_jsx("th", { scope: "col", className: "px-4 py-2", children: "Key" }), _jsx("th", { scope: "col", className: "px-4 py-2", children: "Short" }), _jsx("th", { scope: "col", className: "px-4 py-2", children: "Value" })] }) }), _jsxs("tbody", { children: [_jsxs("tr", { className: "bg-white border-b dark:bg-gray-800 dark:border-gray-700", children: [_jsx("td", { className: "px-4 py-2", children: "Identity" }), _jsx("td", { className: "px-4 py-2", children: _jsx("pre", { children: "_id" }) }), _jsxs("td", { className: "px-4 py-2", children: [_jsx(Link, { to: `/objects/${smartObject?._id}`, className: "font-medium text-blue-600 dark:text-blue-500 hover:underline", children: smartObject?._id }), _jsx(Copy, { text: smartObject?._id })] })] }), _jsxs("tr", { className: "bg-white border-b dark:bg-gray-800 dark:border-gray-700", children: [_jsx("td", { className: "px-4 py-2", children: "Revision" }), _jsx("td", { className: "px-4 py-2", children: _jsx("pre", { children: "_rev" }) }), _jsxs("td", { className: "px-4 py-2", children: [_jsx(Link, { to: `/objects/${smartObject?._rev}`, className: "font-medium text-blue-600 dark:text-blue-500 hover:underline", children: smartObject?._rev }), _jsx(Copy, { text: smartObject?._rev })] })] }), _jsxs("tr", { className: "bg-white border-b dark:bg-gray-800 dark:border-gray-700", children: [_jsx("td", { className: "px-4 py-2", children: "Root" }), _jsx("td", { className: "px-4 py-2", children: _jsx("pre", { children: "_root" }) }), _jsxs("td", { className: "px-4 py-2", children: [_jsx(Link, { to: `/objects/${smartObject?._root}`, className: "font-medium text-blue-600 dark:text-blue-500 hover:underline", children: smartObject?._root }), _jsx(Copy, { text: smartObject?._root })] })] }), _jsxs("tr", { className: "bg-white border-b dark:bg-gray-800 dark:border-gray-700", children: [_jsx("td", { className: "px-4 py-2", children: "Owners" }), _jsx("td", { className: "px-4 py-2", children: _jsx("pre", { children: "_owners" }) }), _jsxs("td", { className: "px-4 py-2", children: [_jsx("span", { className: "font-medium text-gray-900 dark:text-white", children: smartObject?._owners }), _jsx(Copy, { text: JSON.stringify(smartObject?._owners) })] })] }), _jsxs("tr", { className: "bg-white border-b dark:bg-gray-800 dark:border-gray-700", children: [_jsx("td", { className: "px-4 py-2", children: "Amount" }), _jsx("td", { className: "px-4 py-2", children: _jsx("pre", { children: "_satoshis" }) }), _jsxs("td", { className: "px-4 py-2", children: [_jsxs("span", { className: "font-medium text-gray-900 dark:text-white", children: [smartObject?._satoshis, " Satoshi"] }), _jsx(Copy, { text: smartObject?._satoshis })] })] })] })] }))] }));
bg-white text-black border-gray-300 hover:bg-gray-100 focus:ring-4 focus:ring-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-700`, children: isVisible ? 'Hide Metadata' : 'Show Metadata' })] }) }), isVisible && (_jsxs("table", { className: "w-full mt-4 mb-8 text-[12px] text-left text-gray-500 dark:text-gray-400", children: [_jsx("thead", { className: "text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400", children: _jsxs("tr", { children: [_jsx("th", { scope: "col", className: "px-4 py-2", children: "Key" }), _jsx("th", { scope: "col", className: "px-4 py-2", children: "Short" }), _jsx("th", { scope: "col", className: "px-4 py-2", children: "Value" })] }) }), _jsxs("tbody", { children: [_jsxs("tr", { className: "bg-white border-b dark:bg-gray-800 dark:border-gray-700", children: [_jsx("td", { className: "px-4 py-2", children: "Identity" }), _jsx("td", { className: "px-4 py-2", children: _jsx("pre", { children: "_id" }) }), _jsxs("td", { className: "px-4 py-2", children: [_jsx(Link, { to: `/objects/${smartObject?._id}`, className: "font-medium text-blue-600 dark:text-blue-500 hover:underline", children: smartObject?._id }), _jsx(Copy, { text: smartObject?._id })] })] }), _jsxs("tr", { className: "bg-white border-b dark:bg-gray-800 dark:border-gray-700", children: [_jsx("td", { className: "px-4 py-2", children: "Revision" }), _jsx("td", { className: "px-4 py-2", children: _jsx("pre", { children: "_rev" }) }), _jsxs("td", { className: "px-4 py-2", children: [_jsx(Link, { to: `/objects/${smartObject?._rev}`, className: "font-medium text-blue-600 dark:text-blue-500 hover:underline", children: smartObject?._rev }), _jsx(Copy, { text: smartObject?._rev })] })] }), _jsxs("tr", { className: "bg-white border-b dark:bg-gray-800 dark:border-gray-700", children: [_jsx("td", { className: "px-4 py-2", children: "Root" }), _jsx("td", { className: "px-4 py-2", children: _jsx("pre", { children: "_root" }) }), _jsxs("td", { className: "px-4 py-2", children: [_jsx(Link, { to: `/objects/${smartObject?._root}`, className: "font-medium text-blue-600 dark:text-blue-500 hover:underline", children: smartObject?._root }), _jsx(Copy, { text: smartObject?._root })] })] }), _jsxs("tr", { className: "bg-white border-b dark:bg-gray-800 dark:border-gray-700", children: [_jsx("td", { className: "px-4 py-2", children: "Owners" }), _jsx("td", { className: "px-4 py-2", children: _jsx("pre", { children: "_owners" }) }), _jsxs("td", { className: "px-4 py-2", children: [_jsx("span", { className: "font-medium text-gray-900 dark:text-white", children: smartObject?._owners }), _jsx(Copy, { text: JSON.stringify(smartObject?._owners) })] })] }), _jsxs("tr", { className: "bg-white border-b dark:bg-gray-800 dark:border-gray-700", children: [_jsx("td", { className: "px-4 py-2", children: "Amount" }), _jsx("td", { className: "px-4 py-2", children: _jsx("pre", { children: "_satoshis" }) }), _jsxs("td", { className: "px-4 py-2", children: [_jsx("span", { className: "font-medium text-gray-900 dark:text-white", children: smartObject?._satoshis.toString() }), _jsx(Copy, { text: smartObject?._satoshis.toString() })] })] })] })] }))] }));
}
function Component({ title }) {
const location = useLocation();
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/SmartObject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ function MetaData({ smartObject, prev, next }: any) {
</td>
<td className="px-4 py-2">
<span className="font-medium text-gray-900 dark:text-white">
{smartObject?._satoshis} Satoshi
{smartObject?._satoshis.toString()}
</span>
<Copy text={smartObject?._satoshis} />
<Copy text={smartObject?._satoshis.toString()} />
</td>
</tr>
</tbody>
Expand Down
12 changes: 11 additions & 1 deletion packages/docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,14 @@ icon: beaker

# Development

Documentation coming soon.
## Troubleshooting

### Common Issues

#### `min relay fee not met` error

This error is thrown by the Bitcoin node. This error occurs when the transaction fee is lower than the minimum required by the network. In general, the parameter `satPerByte` is considered to build the transaction, but in some scenarios the mempool may require a higher fee to accept the transaction (e.g., large transactions with multiple signature operations). To resolve this, you can increase the transaction fee, modify the `satPerByte` parameter in your configuration.

#### `bad-txns-inputs-missingorspent` error

This error is thrown by the Bitcoin node. This error indicates that the transaction is missing an input or the input has already been spent. To fix this, ensure that all inputs are valid and not previously used in another transaction.
1 change: 1 addition & 0 deletions packages/lib/computer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ declare class Wallet {
derive(subpath?: string): Wallet
getBalance(address?: string): Promise<_Balance>
getUtxos(address?: string): Promise<_Unspent[]>
getUtxosByPublicKey(publicKey: string): Promise<_Unspent[]>
getDustThreshold(isWitnessProgram: boolean, script?: Buffer): number
getAmountThreshold(script: Buffer, isWitnessProgram?: boolean): number
getUtxosWithOpts({ include, exclude }?: FundOptions): Promise<_Unspent[]>
Expand Down
20 changes: 10 additions & 10 deletions packages/lib/dist/bc-lib.browser.min.mjs

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions packages/lib/dist/bc-lib.commonjs.min.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/lib/dist/bc-lib.main.es.mjs

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions packages/lib/test/lib/computer/deploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ describe('deploy', () => {

// Modules stored in multisig scripts
it('Should deploy a module using multisig', async () => {
const multisigComputer = new Computer({ chain, network, url, moduleStorageType: 'multisig' })
await multisigComputer.faucet(1730000)
const big = `x`.repeat(18262) // ~ 18KB
const multisigComputer = new Computer({
chain,
network,
url,
moduleStorageType: 'multisig',
satPerByte: 4,
})
await multisigComputer.faucet(1721382) // 1.7M sats
const big = `x`.repeat(12155) // ~ 12KB ==>> Each stored byte costs 142 satoshis aprox

const rev = await multisigComputer.deploy(big)
expect(rev).to.not.equal(undefined)
Expand Down
2 changes: 1 addition & 1 deletion packages/node/dist/bcn.es.mjs

Large diffs are not rendered by default.