Skip to content

Commit

Permalink
Merge pull request #99 from ar-io/alpha
Browse files Browse the repository at this point in the history
chore: release v1.1.0
  • Loading branch information
dtfiedler authored Jun 3, 2024
2 parents e80bd34 + b56bc42 commit acd4355
Show file tree
Hide file tree
Showing 21 changed files with 1,241 additions and 465 deletions.
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@

* **api:** add getPriceForInteration api to ario contract ([3b8083c](https://github.com/ar-io/ar-io-sdk/commit/3b8083c173bd35f7332c68dc094b092adedaf8e7))
* **bundle:** minify web bundle ([9266676](https://github.com/ar-io/ar-io-sdk/commit/9266676cc6cc26cc6829ef902329879e6f179fc4))
* **method:** use function map for method name ([439ec1f](https://github.com/ar-io/ar-io-sdk/commit/439ec1f649c2f54d6e1516ec4e7af5e8a080c2ed))
* **release:** push a commit to release v1.0.8.alpha-3 ([2cf0d9e](https://github.com/ar-io/ar-io-sdk/commit/2cf0d9e444d74c75cd18f4577c2ecb33ed84cc5e))
* **api:** use function map for method name ([439ec1f](https://github.com/ar-io/ar-io-sdk/commit/439ec1f649c2f54d6e1516ec4e7af5e8a080c2ed))
* **reserved:** add reserved arns name get methods ([ad203ef](https://github.com/ar-io/ar-io-sdk/commit/ad203ef22402851d28643630243716465b2ce030))
* **signer:** check if method is property of signer before using ([c52783c](https://github.com/ar-io/ar-io-sdk/commit/c52783c86bfa4019bc565dd457d7f14defdd1129))
* **signing:** modify signer to assume the signer type based on public key being undefined ([b775c96](https://github.com/ar-io/ar-io-sdk/commit/b775c9672ad68ac987bf37ec1cf0d7c625c9c426))
* **signer:** modify signer to assume the signer type based on public key being undefined ([b775c96](https://github.com/ar-io/ar-io-sdk/commit/b775c9672ad68ac987bf37ec1cf0d7c625c9c426))
* **test:** add dockerfile for running tests in certain node environments ([86cf2ad](https://github.com/ar-io/ar-io-sdk/commit/86cf2ad51d09e88c13bdd0ba0e8a3a2b23b9d395))

## [1.0.7](https://github.com/ar-io/ar-io-sdk/compare/v1.0.6...v1.0.7) (2024-05-23)
Expand Down
117 changes: 87 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,11 @@ const joinNetworkParams = {
const signer = new ArweaveSigner(jwk);
// signer required for write interactions APIs
const authenticatedArIO = ArIO.init({ signer });
const { id: txId } = await authenticatedArIO.joinNetwork(joinNetworkParams);
const { id: txId } = await authenticatedArIO.joinNetwork(
joinNetworkParams,
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
```

#### `updateGatewaySettings(gatewaySettings)`
Expand All @@ -856,6 +860,8 @@ const signer = new ArweaveSigner(jwk);
const authenticatedArIO = ArIO.init({ signer });
const { id: txId } = await authenticatedArIO.updateGatewaySettings(
updateGatewaySettingsParams,
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
```

Expand All @@ -872,7 +878,11 @@ const params = {
const signer = new ArweaveSigner(jwk);
// signer required for write interactions APIs
const authenticatedArIO = ArIO.init({ signer });
const { id: txId } = await authenticatedArIO.increaseDelegateStake(params);
const { id: txId } = await authenticatedArIO.increaseDelegateStake(
params,
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
```

#### `decreaseDelegateStake({ target, qty })`
Expand All @@ -888,7 +898,9 @@ const params = {
const signer = new ArweaveSigner(jwk);
// signer required for write interactions APIs
const authenticatedArIO = ArIO.init({ signer });
const { id: txId } = await authenticatedArIO.decreaseDelegateStake(params);
const { id: txId } = await authenticatedArIO.decreaseDelegateStake(params, {
tags: [{ name: 'App-Name', value: 'My-Awesome-App' }],
});
```

#### `increaseOperatorStake({ qty })`
Expand All @@ -903,7 +915,9 @@ const params = {
const signer = new ArweaveSigner(jwk);
// signer required for write interactions APIs
const authenticatedArIO = ArIO.init({ signer });
const { id: txId } = await authenticatedArIO.increaseOperatorStake(params);
const { id: txId } = await authenticatedArIO.increaseOperatorStake(params, {
tags: [{ name: 'App-Name', value: 'My-Awesome-App' }],
});
```

#### `decreaseOperatorStake({ qty })`
Expand All @@ -918,7 +932,9 @@ const params = {
const signer = new ArweaveSigner(jwk);
// signer required for write interactions APIs
const authenticatedArIO = ArIO.init({ signer });
const { id: txId } = await authenticatedArIO.decreaseOperatorStake(params);
const { id: txId } = await authenticatedArIO.decreaseOperatorStake(params, {
tags: [{ name: 'App-Name', value: 'My-Awesome-App' }],
});
```

#### `saveObservations({ reportTxId, failedGateways })`
Expand All @@ -934,7 +950,9 @@ const params = {
const signer = new ArweaveSigner(jwk);
// signer required for write interactions APIs
const authenticatedArIO = ArIO.init({ signer });
const { id: txId } = await authenticatedArIO.saveObservations(params);
const { id: txId } = await authenticatedArIO.saveObservations(params, {
tags: [{ name: 'App-Name', value: 'My-Awesome-App' }],
});
```

#### `transfer({ target, qty, denomination })`
Expand All @@ -944,11 +962,15 @@ Transfers `IO` or `mIO` depending on the `denomination` selected, defaulting as
```typescript
// signer required for write interactions APIs
const authenticatedArIO = ArIO.init({ signer });
const { id: txId } = await authenticatedArIO.transfer({
target: '-5dV7nk7waR8v4STuwPnTck1zFVkQqJh5K9q9Zik4Y5',
qty: new IOToken(1000).toMIO(),
denomination: 'IO',
});
const { id: txId } = await authenticatedArIO.transfer(
{
target: '-5dV7nk7waR8v4STuwPnTck1zFVkQqJh5K9q9Zik4Y5',
qty: new IOToken(1000).toMIO(),
denomination: 'IO',
},
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
```

#### `increaseUndernameLimit({ domain, qty })`
Expand All @@ -957,10 +979,14 @@ Increases the undername support of a domain up to a maximum of 10k. Domains, by

```typescript
const authenticatedArIO = ArIO.init({ signer });
const { id: txId } = await authenticatedArIO.increaseUndernameLimit({
domain: 'ar-io',
qty: 420,
});
const { id: txId } = await authenticatedArIO.increaseUndernameLimit(
{
domain: 'ar-io',
qty: 420,
},
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
```

#### `extendLease({ domain, years })`
Expand All @@ -969,10 +995,14 @@ Extends the lease of a registered ArNS domain, with an extension of 1-5 years de

```typescript
const authenticatedArIO = ArIO.init({ signer });
const { id: txId } = await authenticatedArIO.extendLease({
domain: 'ar-io',
years: 1,
});
const { id: txId } = await authenticatedArIO.extendLease(
{
domain: 'ar-io',
years: 1,
},
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
```

### Custom Contracts
Expand Down Expand Up @@ -1244,7 +1274,11 @@ Transfers ownership of the ANT to a new target address. Target MUST be an Arweav
const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
const ant = ANT.init({ contractTxId });
const recipient = 'aGzM_yjralacHIUo8_nQXMbh9l1cy0aksiL_x9M359f';
const { id: txId } = await ant.transfer({ target: recipient });
const { id: txId } = await ant.transfer(
{ target: recipient },
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
```

#### `setController({ controller })`
Expand All @@ -1255,7 +1289,11 @@ Adds a new controller to the list of approved controllers on the ANT. Controller
const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
const ant = ANT.init({ contractTxId });
const controller = 'aGzM_yjralacHIUo8_nQXMbh9l1cy0aksiL_x9M359f';
const { id: txId } = await ant.setController({ controller });
const { id: txId } = await ant.setController(
{ controller },
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
```

#### `removeController({ controller })`
Expand All @@ -1266,7 +1304,11 @@ Removes a controller from the list of approved controllers on the ANT.
const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
const ant = ANT.init({ contractTxId });
const controller = 'aGzM_yjralacHIUo8_nQXMbh9l1cy0aksiL_x9M359f';
const { id: txId } = await ant.removeController({ controller });
const { id: txId } = await ant.removeController(
{ controller },
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
```

#### `setRecord({ subDomain, transactionId, ttlSeconds })`
Expand All @@ -1281,11 +1323,15 @@ const ant = ANT.init({ contractTxId });
const subDomain = 'test-domain';
const transactionId = '432l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
const ttlSeconds = 900;
const { id: txId } = await ant.setRecord({
subDomain,
transactionId,
ttlSeconds,
});
const { id: txId } = await ant.setRecord(
{
subDomain,
transactionId,
ttlSeconds,
},
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
```

#### `removeRecord({ subDomain })`
Expand All @@ -1296,7 +1342,11 @@ Removes a record from the ANT contract.
const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
const ant = ANT.init({ contractTxId });
const subDomain = 'test-domain';
const { id: txId } = await ant.removeRecord({ subDomain });
const { id: txId } = await ant.removeRecord(
{ subDomain },
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
```

#### `setName({ name })`
Expand All @@ -1307,7 +1357,11 @@ Sets the name of the ANT contract.
const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
const ant = ANT.init({ contractTxId });
const name = 'chumbawumba';
const { id: txId } = await ant.setName({ name });
const { id: txId } = await ant.setName(
{ name },
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
```

#### `setTicker({ ticker })`
Expand All @@ -1318,7 +1372,10 @@ Sets the ticker of the ANT contract.
const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
const ant = ANT.init({ contractTxId });
const ticker = 'ANT-WUMBA';
const { id: txId } = await ant.setTicker({ ticker });
const { id: txId } = await ant.setTicker(
{ ticker },
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
```

### Configuration
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
services:
arlocal:
image: textury/arlocal:v1.1.66
command: ['node', 'bin/index.js', '--hidelogs']
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:1984']
interval: 10s
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ar.io/sdk",
"version": "1.0.8",
"version": "1.1.0-alpha.11",
"repository": {
"type": "git",
"url": "git+https://github.com/ar-io/ar-io-sdk.git"
Expand Down Expand Up @@ -119,9 +119,9 @@
"dependencies": {
"arbundles": "0.11.0",
"arweave": "1.14.4",
"axios": "1.4.0",
"axios": "1.6.0",
"axios-retry": "^4.3.0",
"bunyan": "^1.8.15",
"warp-arbundles": "^1.0.4",
"warp-contracts": "1.4.45"
},
"lint-staged": {
Expand Down
Loading

0 comments on commit acd4355

Please sign in to comment.