@notabene/javascript-sdk 2.21.0 → 2.22.0-next.1
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/README.md +4 -0
- package/dist/cjs/notabene.d.ts +14 -0
- package/dist/cjs/package.json +1 -1
- package/dist/esm/notabene.d.ts +14 -0
- package/dist/esm/package.json +1 -1
- package/dist/notabene.d.ts +14 -0
- package/package.json +1 -1
- package/src/types.ts +14 -0
- package/src/utils/arbitraries.ts +3 -0
package/README.md
CHANGED
|
@@ -377,15 +377,19 @@ The Connect Wallet component helps you collect and verify the address of your us
|
|
|
377
377
|
### Parameters
|
|
378
378
|
|
|
379
379
|
- `asset`: The cryptocurrency or token being transferred. See [Asset Specification](#asset-specification)
|
|
380
|
+
- `address`: Optional account to collect a proof for, as a blockchain address or CAIP-10 identifier. When set, the component narrows the connected wallet to this account and only offers to verify that one; connecting fails if the wallet does not hold it. When omitted, the user chooses which of their addresses to prove.
|
|
380
381
|
|
|
381
382
|
```js
|
|
382
383
|
const connect = notabene.createConnectWallet({
|
|
383
384
|
asset: 'ETH',
|
|
385
|
+
address: '0x...',
|
|
384
386
|
});
|
|
385
387
|
|
|
386
388
|
const { proof, txCreate } = await connect.openModal();
|
|
387
389
|
```
|
|
388
390
|
|
|
391
|
+
The proved account is returned on `proof.address` as a CAIP-10 identifier.
|
|
392
|
+
|
|
389
393
|
## Deposit Request
|
|
390
394
|
|
|
391
395
|
The Deposit Request lets your customers request deposits that are fully Travel Rule compliant.
|
package/dist/cjs/notabene.d.ts
CHANGED
|
@@ -710,6 +710,20 @@ export declare type ConnectionOptions = Omit<TransactionOptions, 'allowedAgentTy
|
|
|
710
710
|
*/
|
|
711
711
|
export declare interface ConnectionRequest extends ComponentRequest {
|
|
712
712
|
asset: TransactionAsset;
|
|
713
|
+
/**
|
|
714
|
+
* The account to collect a proof for.
|
|
715
|
+
*
|
|
716
|
+
* @remarks
|
|
717
|
+
* When set, the component narrows the connected wallet to this account and
|
|
718
|
+
* only offers to verify that one, instead of letting the user pick any
|
|
719
|
+
* address the wallet reports. Connecting fails if the wallet does not hold
|
|
720
|
+
* it. When omitted, the user chooses which of their addresses to prove.
|
|
721
|
+
*
|
|
722
|
+
* A bare blockchain address is resolved against the chain of {@link ConnectionRequest.asset}.
|
|
723
|
+
*
|
|
724
|
+
* @see {@link OwnershipProof.address} For the proved account on the response
|
|
725
|
+
*/
|
|
726
|
+
address?: BlockchainAddress | CAIP10;
|
|
713
727
|
}
|
|
714
728
|
|
|
715
729
|
export declare interface ConnectionResponse<T extends ComponentRequest> {
|
package/dist/cjs/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Notabene <developers@notabene.id>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"packageManager": "yarn@4.5.1",
|
|
13
|
-
"version": "2.
|
|
13
|
+
"version": "2.22.0-next.1",
|
|
14
14
|
"source": "src/notabene.ts",
|
|
15
15
|
"main": "dist/cjs/notabene.cjs",
|
|
16
16
|
"module": "dist/esm/notabene.js",
|
package/dist/esm/notabene.d.ts
CHANGED
|
@@ -710,6 +710,20 @@ export declare type ConnectionOptions = Omit<TransactionOptions, 'allowedAgentTy
|
|
|
710
710
|
*/
|
|
711
711
|
export declare interface ConnectionRequest extends ComponentRequest {
|
|
712
712
|
asset: TransactionAsset;
|
|
713
|
+
/**
|
|
714
|
+
* The account to collect a proof for.
|
|
715
|
+
*
|
|
716
|
+
* @remarks
|
|
717
|
+
* When set, the component narrows the connected wallet to this account and
|
|
718
|
+
* only offers to verify that one, instead of letting the user pick any
|
|
719
|
+
* address the wallet reports. Connecting fails if the wallet does not hold
|
|
720
|
+
* it. When omitted, the user chooses which of their addresses to prove.
|
|
721
|
+
*
|
|
722
|
+
* A bare blockchain address is resolved against the chain of {@link ConnectionRequest.asset}.
|
|
723
|
+
*
|
|
724
|
+
* @see {@link OwnershipProof.address} For the proved account on the response
|
|
725
|
+
*/
|
|
726
|
+
address?: BlockchainAddress | CAIP10;
|
|
713
727
|
}
|
|
714
728
|
|
|
715
729
|
export declare interface ConnectionResponse<T extends ComponentRequest> {
|
package/dist/esm/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Notabene <developers@notabene.id>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"packageManager": "yarn@4.5.1",
|
|
13
|
-
"version": "2.
|
|
13
|
+
"version": "2.22.0-next.1",
|
|
14
14
|
"source": "src/notabene.ts",
|
|
15
15
|
"main": "dist/cjs/notabene.cjs",
|
|
16
16
|
"module": "dist/esm/notabene.js",
|
package/dist/notabene.d.ts
CHANGED
|
@@ -710,6 +710,20 @@ export declare type ConnectionOptions = Omit<TransactionOptions, 'allowedAgentTy
|
|
|
710
710
|
*/
|
|
711
711
|
export declare interface ConnectionRequest extends ComponentRequest {
|
|
712
712
|
asset: TransactionAsset;
|
|
713
|
+
/**
|
|
714
|
+
* The account to collect a proof for.
|
|
715
|
+
*
|
|
716
|
+
* @remarks
|
|
717
|
+
* When set, the component narrows the connected wallet to this account and
|
|
718
|
+
* only offers to verify that one, instead of letting the user pick any
|
|
719
|
+
* address the wallet reports. Connecting fails if the wallet does not hold
|
|
720
|
+
* it. When omitted, the user chooses which of their addresses to prove.
|
|
721
|
+
*
|
|
722
|
+
* A bare blockchain address is resolved against the chain of {@link ConnectionRequest.asset}.
|
|
723
|
+
*
|
|
724
|
+
* @see {@link OwnershipProof.address} For the proved account on the response
|
|
725
|
+
*/
|
|
726
|
+
address?: BlockchainAddress | CAIP10;
|
|
713
727
|
}
|
|
714
728
|
|
|
715
729
|
export declare interface ConnectionResponse<T extends ComponentRequest> {
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Notabene <developers@notabene.id>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"packageManager": "yarn@4.5.1",
|
|
13
|
-
"version": "2.
|
|
13
|
+
"version": "2.22.0-next.1",
|
|
14
14
|
"source": "src/notabene.ts",
|
|
15
15
|
"main": "dist/cjs/notabene.cjs",
|
|
16
16
|
"module": "dist/esm/notabene.js",
|
package/src/types.ts
CHANGED
|
@@ -641,6 +641,20 @@ export interface InvoiceReaderResponse {
|
|
|
641
641
|
*/
|
|
642
642
|
export interface ConnectionRequest extends ComponentRequest {
|
|
643
643
|
asset: TransactionAsset;
|
|
644
|
+
/**
|
|
645
|
+
* The account to collect a proof for.
|
|
646
|
+
*
|
|
647
|
+
* @remarks
|
|
648
|
+
* When set, the component narrows the connected wallet to this account and
|
|
649
|
+
* only offers to verify that one, instead of letting the user pick any
|
|
650
|
+
* address the wallet reports. Connecting fails if the wallet does not hold
|
|
651
|
+
* it. When omitted, the user chooses which of their addresses to prove.
|
|
652
|
+
*
|
|
653
|
+
* A bare blockchain address is resolved against the chain of {@link ConnectionRequest.asset}.
|
|
654
|
+
*
|
|
655
|
+
* @see {@link OwnershipProof.address} For the proved account on the response
|
|
656
|
+
*/
|
|
657
|
+
address?: BlockchainAddress | CAIP10;
|
|
644
658
|
}
|
|
645
659
|
|
|
646
660
|
/**
|
package/src/utils/arbitraries.ts
CHANGED
|
@@ -125,6 +125,9 @@ export const arbitraryConnectionRequest = (): fc.Arbitrary<ConnectionRequest> =>
|
|
|
125
125
|
asset: arbitraryTransactionAsset(),
|
|
126
126
|
requestId: fc.option(fc.uuid()),
|
|
127
127
|
customer: fc.option(arbitraryCounterparty()),
|
|
128
|
+
address: fc.option(
|
|
129
|
+
fc.oneof(arbitraryBlockchainAddress(), arbitraryCAIP10()),
|
|
130
|
+
),
|
|
128
131
|
});
|
|
129
132
|
|
|
130
133
|
// Helper for ISO date format
|