profile
viewpoint

tc39/proposal-error-stacks 126

ECMAScript Proposal, specs, and reference implementation for Error.prototype.stack / System.getStack

dtribble/agendas 0

TC39 meeting agendas

dtribble/ecma262 0

Status, process, and documents for ECMA262

dtribble/moz-sandbox 0

Sandbox for mozilla work (benchmarks etc)

dtribble/pdf.js 0

PDF Reader in JavaScript

dtribble/quasiParserGenerator 0

A template string tag for generating template string tags.

dtribble/react 0

React is a JavaScript library for building user interfaces. It's declarative, efficient, and extremely flexible. What's more, it works with the libraries and frameworks that you already know.

dtribble/the_next_big_thing 0

Sample Rails app using vendored engines and gems to provide functionality

dtribble/weakrefs 0

JavaScript WeakRefs proposal for TC39

push eventAgoric/agoric-sdk

Dean Tribble

commit sha 6c98cc461b4f51aee56e15e490802f3d5428a00c

chore: es-lint cleanup

view details

push time in 4 days

issue commentAgoric/documentation

struggling to build mental model of deploying contracts in the Agoric SDK

and the application user's wallet.

Which application user? (another unbound definite description). There's always exactly one user?

The user account for the application, e.g., "zot app user" above, who is the party that is building and deploying the application, and running an ag-solo with the private keys of the application.

The deploy.js scripts run in an ephemeral Node.js outside of the Swingset kernel.

Is "the Swingset kernel" a 7th name for the same thing?

This is more an internal technical detail, but is close enough to another use to need to change. I think the important thing is that the deploy script is just running as a standalone JS program in node. (It may then bundle stuff to be run in the ag-solo to do various tasks on-chain).

The spawner runs within ag-solo

Which spawner? (another unbound definite description). Suggest: "ag-solo includes a spawner ...".

Agreed. Hmm. That word should be in the glossary. Will get it added.

I eventually found Agoric's Cosmic SwingSet which seems to cover much of the same material, though some parts of it seem out of date. Please do use figures like the ones there, though; they help a lot!

Agreed. Yes it's the original that supports many other running scenarios. Those diagrams are new! Will appropriate them :)

dckc

comment created time in 4 days

issue commentAgoric/documentation

struggling to build mental model of deploying contracts in the Agoric SDK

Start the Agoric VM.

Is that the same thing or something else?

Same thing as "local server process". Clearly too many names. This arises because you can get the local server process in various ways, but it always fulfills the same role. It's enlightening to see all these juxtaposed. We will name the role of that process.

As a fallback, I will call it the ag-solo for now, where agoric start may launch an ag-solo with an attached fake chain for ease of debugging.

Its registry key is written to a config file in the ui directory.

Which ui directory? Another unbound definite description.

The UI directory sitting in the very same directory you ran deploy from. Is that not straightforward?

Bundle the api code and deploy it to the running "api" process (e.g., the local ag-solo process)

Now the ag-solo process is called the api process? (with "api" in quotes?)

Yes. As a developer/deployer of an application, the "user" is really the application user, so that user's a-ag-solo is the api server for the application. Definitely needs some clarification. When I'm developing the "zot" application, the default user is the "zot" application user, not "dean", and so the wallet and purses and ag-solo are for the application.

that communicates with either a locally running or remote chain.

So there's always a chain? I didn't see one in Starting a Project. Did I miss it?

It's a "fake" chain running in the same processes as the ag-solo so make debugging easier. You can also run in "separate local chain mode", but we need to document how.

The local process has ...

Now it's the "local process"? I think this is the 6th term so far, if my understanding is correct, i.e. that these all refer to the same thing. (Maybe I lost count.)

You are correct, though they loosely refer to either ag-solo or ag-solo + fake-chain.

dckc

comment created time in 4 days

issue commentAgoric/documentation

struggling to build mental model of deploying contracts in the Agoric SDK

I'll answer questions here, and we can then figure out what to update in the doc.

Deploy and setup an application program to the local server What does "the local server" refer to? No fair using definite descriptions ("the ...") before introducing the referent.

The "local server" is the api server (currently a node process) running on behalf of the user. In development, it's typically the process launched with agoric start, which effectively includes an api server and a fake chain implementation for local debugging.

If you are running with local or test chain, then it's the api server (the ag-solo process) which has the user's keys, runs on the user's machines, and connects to the chain via IBC-like protocols. You don't need to worry about this until you are deploying processes in more complicated configurations.

All deployment happens via the local running Agoric process (specifically, the ag-solo process) Is "the local running Agoric / ag-solo process" the same as "the local server"? If so, use the same term, please.

OK

dckc

comment created time in 4 days

PR opened Agoric/agoric-sdk

Reviewers
fix: deposit should return the deposited amount

closes #1104 Also fixes test to test deposit on a non-empty purse.

+26 -18

0 comment

2 changed files

pr created time in 5 days

create barnchAgoric/agoric-sdk

branch : 1104_deposit_fix

created branch time in 5 days

Pull request review commentAgoric/agoric-sdk

[Zoe] Split opera ticket contract into a generic `sellItems` contract and a contract for minting tickets

+/* eslint-disable no-use-before-define */+// @ts-check++import harden from '@agoric/harden';+import produceIssuer from '@agoric/ertp';+import { makeGetInstanceHandle } from '../clientSupport';++/** @typedef {import('../zoe').ContractFacet} ContractFacet */++// zcf is the Zoe Contract Facet, i.e. the contract-facing API of Zoe+export const makeContract = harden(+  /** @param {ContractFacet} zcf */ zcf => {+    // Create the internal ticket mint+    const { issuer, mint, amountMath: ticketAmountMath } = produceIssuer(+      'operaTickets',

almost everything else here is now agnostic to "opera tickets". could that too be provided by the creator of this?

katelynsills

comment created time in 5 days

Pull request review commentAgoric/agoric-sdk

[Zoe] Split opera ticket contract into a generic `sellItems` contract and a contract for minting tickets

+/* eslint-disable no-use-before-define */+// @ts-check++import harden from '@agoric/harden';+import { makeZoeHelpers, defaultAcceptanceMsg } from '../contractSupport';++/** @typedef {import('../zoe').ContractFacet} ContractFacet */++// zcf is the Zoe Contract Facet, i.e. the contract-facing API of Zoe

There should be a comment describing what this is all for?

katelynsills

comment created time in 5 days

Pull request review commentAgoric/agoric-sdk

[Zoe] Split opera ticket contract into a generic `sellItems` contract and a contract for minting tickets

+/* eslint-disable no-use-before-define */+// @ts-check++import harden from '@agoric/harden';+import { makeZoeHelpers, defaultAcceptanceMsg } from '../contractSupport';++/** @typedef {import('../zoe').ContractFacet} ContractFacet */++// zcf is the Zoe Contract Facet, i.e. the contract-facing API of Zoe+export const makeContract = harden(+  /** @param {ContractFacet} zcf */ zcf => {+    const { assertKeywords, rejectOffer, checkHook } = makeZoeHelpers(zcf);+    assertKeywords(harden(['Items', 'Money']));++    const { terms } = zcf.getInstanceRecord();+    const { pricePerItem } = terms;++    let sellerOfferHandle;++    const sellerOfferHook = offerHandle => {+      sellerOfferHandle = offerHandle;+      return defaultAcceptanceMsg;+    };++    const buyerOfferHook = buyerOfferHandle => {+      const sellerAllocation = zcf.getCurrentAllocation(sellerOfferHandle);

I was originally thinking that I wanted to see this fetch when the seller is setup, but of course that's ridivulous, since this needs to get the allocation now. Are we in position to break an allocation description after it's obsolete, so that instead of making a bad trade against data from a prior turn, we actaully require that code retrieve it from handles from scratch?

katelynsills

comment created time in 5 days

Pull request review commentAgoric/agoric-sdk

[Zoe] Split opera ticket contract into a generic `sellItems` contract and a contract for minting tickets

+/* eslint-disable no-use-before-define */+// @ts-check++import harden from '@agoric/harden';+import { makeZoeHelpers, defaultAcceptanceMsg } from '../contractSupport';++/** @typedef {import('../zoe').ContractFacet} ContractFacet */++// zcf is the Zoe Contract Facet, i.e. the contract-facing API of Zoe+export const makeContract = harden(+  /** @param {ContractFacet} zcf */ zcf => {+    const { assertKeywords, rejectOffer, checkHook } = makeZoeHelpers(zcf);+    assertKeywords(harden(['Items', 'Money']));++    const { terms } = zcf.getInstanceRecord();+    const { pricePerItem } = terms;++    let sellerOfferHandle;++    const sellerOfferHook = offerHandle => {+      sellerOfferHandle = offerHandle;+      return defaultAcceptanceMsg;+    };++    const buyerOfferHook = buyerOfferHandle => {

Since this is touching the seller's state that is only available if another hook had gotten run, it should have a comment about why that's guaranteed to have happened first. Is there a way to have that be structurally obvious (like the buyer hook is allocated in teh invocation of the seller hook or something).

katelynsills

comment created time in 5 days

Pull request review commentAgoric/agoric-sdk

[Zoe] Split opera ticket contract into a generic `sellItems` contract and a contract for minting tickets

+/* eslint-disable no-use-before-define */+// @ts-check++import harden from '@agoric/harden';+import { makeZoeHelpers, defaultAcceptanceMsg } from '../contractSupport';++/** @typedef {import('../zoe').ContractFacet} ContractFacet */++// zcf is the Zoe Contract Facet, i.e. the contract-facing API of Zoe+export const makeContract = harden(+  /** @param {ContractFacet} zcf */ zcf => {+    const { assertKeywords, rejectOffer, checkHook } = makeZoeHelpers(zcf);+    assertKeywords(harden(['Items', 'Money']));++    const { terms } = zcf.getInstanceRecord();+    const { pricePerItem } = terms;++    let sellerOfferHandle;++    const sellerOfferHook = offerHandle => {+      sellerOfferHandle = offerHandle;+      return defaultAcceptanceMsg;+    };++    const buyerOfferHook = buyerOfferHandle => {+      const sellerAllocation = zcf.getCurrentAllocation(sellerOfferHandle);+      const buyerAllocation = zcf.getCurrentAllocation(buyerOfferHandle);+      const currentItemsForSale = sellerAllocation.Items;+      const providedMoney = buyerAllocation.Money;++      const { proposal } = zcf.getOffer(buyerOfferHandle);+      const wantedItems = proposal.want.Items;+      const numItemsWanted = wantedItems.extent.length;+      const amountMaths = zcf.getAmountMaths(['Items', 'Money']);+      const totalCostExtent = pricePerItem.extent * numItemsWanted;+      const totalCost = amountMaths.Money.make(totalCostExtent);++      // Check that the wanted items are still for sale.+      if (!amountMaths.Items.isGTE(currentItemsForSale, wantedItems)) {+        return rejectOffer(+          buyerOfferHandle,+          `Some of the wanted items were not available for sale`,+        );+      }++      // Check that the money provided to pay for the items is greater than the totalCost.+      if (!amountMaths.Money.isGTE(providedMoney, totalCost)) {+        return rejectOffer(+          buyerOfferHandle,+          `More money (${pricePerItem.extent}) is required to buy these items`,+        );+      }++      // Reallocate and complete the buyer offer.+      const newSellerAllocation = {

This is not for change now, but it seems wrong to have this much boilerplate for a transfer. It seems like ti could too easily get out of whack. It's protected by offer safety but evenso. Perhaps a helper method to take some allocations and a delta and produce the new allocations? (give me buyer and seller with x swapped for y).

katelynsills

comment created time in 5 days

Pull request review commentAgoric/documentation

Wallet api doc added and put under Guides in menubar

+# Wallet API++This document lists and describes the API commands available to the wallet.++## Petnames++The Agoric wallet uses *petnames* for issuers and purses.++Petnames are your personal names for objects. No one else can see or+modify a petname without your permission. You can think of them as+your phone's contacts list. The actual phone number is what your phone+uses to call someone, but for you to more easily tell who a number is+associated with, you've assigned a petname to it, such as Mom,+Grandpa, Kate S., etc.++## Overview++Wallet API commands work with the following object types:+- `purse`: Stores assets until you withdraw them into a payment for use +- `issuer`: Creates empty purses and payments and maps minted assets+  to them when assets are added or removed. Issuers verify and move+  digital assets.+- `offer`: Consists of what amount of what brand you're willing to+  give, and what amount of what brand you want, as well as the+  conditions under which the offer holder can cancel it.++## Purse API Methods++### `deposit()`+- **Function:**+  - Deposits a payment into the specified purse in the wallet. Returns the deposited amount.+- **Required Arguments:**+  - `pursePetname`+    - **String**. The petname of the purse in which to deposit the specified payment.+  - `payment`+    - **Object**. A payment object, which is deposited into the specified purse.+- **Optional Arguments:**+  - None.++### `getPurses()`+- **Function:**+  - Returns all purse objects and their petnames in the wallet. They are returned as an array of [petname, purseObject] arrays which can be turned into a `Map` (`new Map(getPurses())`)

bah. no idea how I typed those words. "it actually returns promises for purses rather than direct references...". I was thinking about the purse deletion and my brain swapped words around.

tyg

comment created time in 10 days

Pull request review commentAgoric/documentation

Wallet api doc added and put under Guides in menubar

+# Wallet API++This document lists and describes the API commands available to the wallet.++## Petnames++The Agoric wallet uses *petnames* for issuers and purses.++Petnames are your personal names for objects. No one else can see or+modify a petname without your permission. You can think of them as+your phone's contacts list. The actual phone number is what your phone+uses to call someone, but for you to more easily tell who a number is+associated with, you've assigned a petname to it, such as Mom,+Grandpa, Kate S., etc.++## Overview++Wallet API commands work with the following object types:+- `purse`: Stores assets until you withdraw them into a payment for use +- `issuer`: Creates empty purses and payments and maps minted assets+  to them when assets are added or removed. Issuers verify and move+  digital assets.+- `offer`: Consists of what amount of what brand you're willing to+  give, and what amount of what brand you want, as well as the+  conditions under which the offer holder can cancel it.++## Purse API Methods++### `deposit()`+- **Function:**+  - Deposits a payment into the specified purse in the wallet. Returns the deposited amount.+- **Required Arguments:**+  - `pursePetname`+    - **String**. The petname of the purse in which to deposit the specified payment.+  - `payment`+    - **Object**. A payment object, which is deposited into the specified purse.+- **Optional Arguments:**

That's not typical for JS apis; there's too many variants (e.g., required objects with optional subfields, arguments that default, etc.)

tyg

comment created time in 10 days

Pull request review commentAgoric/documentation

Wallet api doc added and put under Guides in menubar

+# Wallet API++This document lists and describes the API commands available to the wallet.++## Petnames++The Agoric wallet uses *petnames* for issuers and purses.++Petnames are your personal names for objects. No one else can see or+modify a petname without your permission. You can think of them as+your phone's contacts list. The actual phone number is what your phone+uses to call someone, but for you to more easily tell who a number is+associated with, you've assigned a petname to it, such as Mom,+Grandpa, Kate S., etc.++## Overview++Wallet API commands work with the following object types:+- `purse`: Stores assets until you withdraw them into a payment for use +- `issuer`: Creates empty purses and payments and maps minted assets+  to them when assets are added or removed. Issuers verify and move+  digital assets.+- `offer`: Consists of what amount of what brand you're willing to+  give, and what amount of what brand you want, as well as the+  conditions under which the offer holder can cancel it.++## Purse API Methods++### `deposit()`+- **Function:**+  - Deposits a payment into the specified purse in the wallet. Returns the deposited amount.+- **Required Arguments:**+  - `pursePetname`+    - **String**. The petname of the purse in which to deposit the specified payment.+  - `payment`+    - **Object**. A payment object, which is deposited into the specified purse.+- **Optional Arguments:**+  - None.++### `getPurses()`+- **Function:**+  - Returns all purse objects and their petnames in the wallet. They are returned as an array of [petname, purseObject] arrays which can be turned into a `Map` (`new Map(getPurses())`)+- **Required Arguments:**+  - None.+- **Optional Arguments:**+  - None.++### `getPurse(pursePetname)`+- **Function:**+  - Returns the `purse` object with the given petname+- **Required Arguments:**+  - `pursePetName`  +    - **String**. A purse's petname.+- **Optional Arguments:**+  - None.+- **Errors**+  - Throws an error if there is no purse with the given petname.++### `getPurseIssuer(pursePetname)`+- **Function:**+  - Given a purse's petname, returns the `issuer` object associated+    with the purse.+- **Required Arguments:**+  - **String**. `petname`, a purse's petname+- **Optional Arguments:**+  - None.+- **Errors**+  - Throws and error if given an invalid purse petname. ++### `makeEmptyPurse(issuerPetname, pursePetname)`+- **Function:**+  - Creates and returns a new, empty, purse object with a petname specified by the command. +- **Required Arguments:**+  - `issuerPetname`+    - **String**. The petname you've assigned to the `issuer` the new purse uses.+  - `pursePetname`+    - **String**. The petname assigned to the new purse.	+- **Optional Arguments:**+ - None.+- **Errors:**+  - There is already a purse in this wallet with the name of `pursePetname`'s value.   +++## Issuer API Methods++### `addIssuer()`+- **Function:**+  -  Assigns the given petname to a given`issuer` object and adds the issuer to the wallet. +- **Required Arguments:**+  - `issuerPetname`+    - **String**. The petname assigned to the `issuer` object.+  - `issuer`+    - **Object**. An `issuer` object.+- **Optional Arguments:**+  - `brandRegKey`+    - **String**. A key in the Registry, whose value is the `brand` object associated with the issuer.++### `getIssuers()`+- **Function:**+  - Returns all issuers associated with the wallet and their petnames as an array of arrays of the format `[[issuerPetname, issuer], ...]`. You can use it to make a new map of petnames to issuers by doing `new Map(getIssuer())` +- **Required Arguments:**+  - None.+- **Optional Arguments:**+  - None.++### `getIssuerNames(issuer)`+- **Function:**+  - Returns the petname and brandRegKey of a particular issuer object+- **Required Arguments:**+  - `issuer`+    - An issuer object+- **Optional Arguments:**+  - None.++## Offer API Methods++### `acceptOffer()`+- **Function:**+  - Changes the specified offer's status to "accepted".+- **Required Arguments:**+  - `id`+    - **String**: An offer id.+- **Optional Arguments:**+  - None.+- **Errors:**+  - If the offer has already been resolved or rejected. ++### `addOffer()`  +- **Function:**+  - Adds a new offer to the wallet's inbox, returning the offer's id.+- **Required Arguments:**+  - `rawOffer` +    - **Object**: The potential offer sent from the Dapp UI to be looked at by the user.+- **Optional Arguments:**+  - `hooks`+    - Instructs the wallet to do actions before or after the offer is made, such as getting an invite from the `publicAPI` in order to make an offer. ++`hooks` format is ++`hooks[targetName][hookName] = [hookMethod, ...hookArgs]`++It’s called within the wallet as+`E(target)[hookMethod](...hookArgs)`++`hooks: {+     publicAPI: {+        getInvite: ['makeInvite'], // E(publicAPI).makeInvite()+     },+}`+  +### `cancelOffer()`+- **Function:**+  - Changes the status of the specified offer in the wallet inbox to

The "changes the status" is not the important thing. It's "transition the state" by e.g., submitting or canceling the offer in the contract.

tyg

comment created time in 11 days

Pull request review commentAgoric/documentation

Wallet api doc added and put under Guides in menubar

+# Wallet API++This document lists and describes the API commands available to the wallet.++## Petnames++The Agoric wallet uses *petnames* for issuers and purses.++Petnames are your personal names for objects. No one else can see or+modify a petname without your permission. You can think of them as+your phone's contacts list. The actual phone number is what your phone+uses to call someone, but for you to more easily tell who a number is+associated with, you've assigned a petname to it, such as Mom,+Grandpa, Kate S., etc.++## Overview++Wallet API commands work with the following object types:+- `purse`: Stores assets until you withdraw them into a payment for use +- `issuer`: Creates empty purses and payments and maps minted assets+  to them when assets are added or removed. Issuers verify and move+  digital assets.+- `offer`: Consists of what amount of what brand you're willing to+  give, and what amount of what brand you want, as well as the+  conditions under which the offer holder can cancel it.++## Purse API Methods++### `deposit()`+- **Function:**+  - Deposits a payment into the specified purse in the wallet. Returns the deposited amount.+- **Required Arguments:**+  - `pursePetname`+    - **String**. The petname of the purse in which to deposit the specified payment.+  - `payment`+    - **Object**. A payment object, which is deposited into the specified purse.+- **Optional Arguments:**+  - None.++### `getPurses()`+- **Function:**+  - Returns all purse objects and their petnames in the wallet. They are returned as an array of [petname, purseObject] arrays which can be turned into a `Map` (`new Map(getPurses())`)+- **Required Arguments:**+  - None.+- **Optional Arguments:**+  - None.++### `getPurse(pursePetname)`+- **Function:**+  - Returns the `purse` object with the given petname+- **Required Arguments:**+  - `pursePetName`  +    - **String**. A purse's petname.+- **Optional Arguments:**+  - None.+- **Errors**+  - Throws an error if there is no purse with the given petname.++### `getPurseIssuer(pursePetname)`+- **Function:**+  - Given a purse's petname, returns the `issuer` object associated+    with the purse.+- **Required Arguments:**+  - **String**. `petname`, a purse's petname+- **Optional Arguments:**+  - None.+- **Errors**+  - Throws and error if given an invalid purse petname. ++### `makeEmptyPurse(issuerPetname, pursePetname)`+- **Function:**+  - Creates and returns a new, empty, purse object with a petname specified by the command. +- **Required Arguments:**+  - `issuerPetname`+    - **String**. The petname you've assigned to the `issuer` the new purse uses.+  - `pursePetname`+    - **String**. The petname assigned to the new purse.	+- **Optional Arguments:**+ - None.+- **Errors:**+  - There is already a purse in this wallet with the name of `pursePetname`'s value.   +++## Issuer API Methods++### `addIssuer()`+- **Function:**+  -  Assigns the given petname to a given`issuer` object and adds the issuer to the wallet. +- **Required Arguments:**+  - `issuerPetname`+    - **String**. The petname assigned to the `issuer` object.+  - `issuer`+    - **Object**. An `issuer` object.+- **Optional Arguments:**+  - `brandRegKey`+    - **String**. A key in the Registry, whose value is the `brand` object associated with the issuer.++### `getIssuers()`+- **Function:**+  - Returns all issuers associated with the wallet and their petnames as an array of arrays of the format `[[issuerPetname, issuer], ...]`. You can use it to make a new map of petnames to issuers by doing `new Map(getIssuer())` +- **Required Arguments:**+  - None.+- **Optional Arguments:**+  - None.++### `getIssuerNames(issuer)`+- **Function:**+  - Returns the petname and brandRegKey of a particular issuer object+- **Required Arguments:**+  - `issuer`+    - An issuer object+- **Optional Arguments:**+  - None.++## Offer API Methods++### `acceptOffer()`+- **Function:**+  - Changes the specified offer's status to "accepted".+- **Required Arguments:**+  - `id`+    - **String**: An offer id.+- **Optional Arguments:**+  - None.+- **Errors:**+  - If the offer has already been resolved or rejected. ++### `addOffer()`  

This really just adds a proposal that the user may approve to actually make an offer to the contract invitation.

tyg

comment created time in 11 days

Pull request review commentAgoric/documentation

Wallet api doc added and put under Guides in menubar

+# Wallet API++This document lists and describes the API commands available to the wallet.++## Petnames++The Agoric wallet uses *petnames* for issuers and purses.++Petnames are your personal names for objects. No one else can see or+modify a petname without your permission. You can think of them as+your phone's contacts list. The actual phone number is what your phone+uses to call someone, but for you to more easily tell who a number is+associated with, you've assigned a petname to it, such as Mom,+Grandpa, Kate S., etc.++## Overview++Wallet API commands work with the following object types:+- `purse`: Stores assets until you withdraw them into a payment for use +- `issuer`: Creates empty purses and payments and maps minted assets+  to them when assets are added or removed. Issuers verify and move+  digital assets.+- `offer`: Consists of what amount of what brand you're willing to+  give, and what amount of what brand you want, as well as the+  conditions under which the offer holder can cancel it.++## Purse API Methods++### `deposit()`+- **Function:**+  - Deposits a payment into the specified purse in the wallet. Returns the deposited amount.+- **Required Arguments:**+  - `pursePetname`+    - **String**. The petname of the purse in which to deposit the specified payment.+  - `payment`+    - **Object**. A payment object, which is deposited into the specified purse.+- **Optional Arguments:**+  - None.++### `getPurses()`+- **Function:**+  - Returns all purse objects and their petnames in the wallet. They are returned as an array of [petname, purseObject] arrays which can be turned into a `Map` (`new Map(getPurses())`)+- **Required Arguments:**+  - None.+- **Optional Arguments:**+  - None.++### `getPurse(pursePetname)`+- **Function:**+  - Returns the `purse` object with the given petname+- **Required Arguments:**+  - `pursePetName`  +    - **String**. A purse's petname.+- **Optional Arguments:**+  - None.+- **Errors**+  - Throws an error if there is no purse with the given petname.++### `getPurseIssuer(pursePetname)`+- **Function:**+  - Given a purse's petname, returns the `issuer` object associated+    with the purse.+- **Required Arguments:**+  - **String**. `petname`, a purse's petname+- **Optional Arguments:**+  - None.+- **Errors**+  - Throws and error if given an invalid purse petname. ++### `makeEmptyPurse(issuerPetname, pursePetname)`+- **Function:**+  - Creates and returns a new, empty, purse object with a petname specified by the command. +- **Required Arguments:**+  - `issuerPetname`+    - **String**. The petname you've assigned to the `issuer` the new purse uses.+  - `pursePetname`+    - **String**. The petname assigned to the new purse.	+- **Optional Arguments:**+ - None.+- **Errors:**+  - There is already a purse in this wallet with the name of `pursePetname`'s value.   +++## Issuer API Methods++### `addIssuer()`+- **Function:**+  -  Assigns the given petname to a given`issuer` object and adds the issuer to the wallet. +- **Required Arguments:**+  - `issuerPetname`+    - **String**. The petname assigned to the `issuer` object.+  - `issuer`+    - **Object**. An `issuer` object.+- **Optional Arguments:**+  - `brandRegKey`+    - **String**. A key in the Registry, whose value is the `brand` object associated with the issuer.++### `getIssuers()`+- **Function:**+  - Returns all issuers associated with the wallet and their petnames as an array of arrays of the format `[[issuerPetname, issuer], ...]`. You can use it to make a new map of petnames to issuers by doing `new Map(getIssuer())` +- **Required Arguments:**+  - None.+- **Optional Arguments:**+  - None.++### `getIssuerNames(issuer)`+- **Function:**+  - Returns the petname and brandRegKey of a particular issuer object+- **Required Arguments:**+  - `issuer`+    - An issuer object+- **Optional Arguments:**+  - None.++## Offer API Methods++### `acceptOffer()`+- **Function:**+  - Changes the specified offer's status to "accepted".

This actually makes the offer to the target contract. It approves the "proposal" by submitting the real offer on behaf of the user.

tyg

comment created time in 11 days

Pull request review commentAgoric/documentation

Wallet api doc added and put under Guides in menubar

+# Wallet API++This document lists and describes the API commands available to the wallet.++## Petnames++The Agoric wallet uses *petnames* for issuers and purses.++Petnames are your personal names for objects. No one else can see or+modify a petname without your permission. You can think of them as+your phone's contacts list. The actual phone number is what your phone+uses to call someone, but for you to more easily tell who a number is+associated with, you've assigned a petname to it, such as Mom,+Grandpa, Kate S., etc.++## Overview++Wallet API commands work with the following object types:+- `purse`: Stores assets until you withdraw them into a payment for use +- `issuer`: Creates empty purses and payments and maps minted assets+  to them when assets are added or removed. Issuers verify and move+  digital assets.+- `offer`: Consists of what amount of what brand you're willing to+  give, and what amount of what brand you want, as well as the+  conditions under which the offer holder can cancel it.++## Purse API Methods++### `deposit()`+- **Function:**+  - Deposits a payment into the specified purse in the wallet. Returns the deposited amount.+- **Required Arguments:**+  - `pursePetname`+    - **String**. The petname of the purse in which to deposit the specified payment.+  - `payment`+    - **Object**. A payment object, which is deposited into the specified purse.+- **Optional Arguments:**+  - None.++### `getPurses()`+- **Function:**+  - Returns all purse objects and their petnames in the wallet. They are returned as an array of [petname, purseObject] arrays which can be turned into a `Map` (`new Map(getPurses())`)+- **Required Arguments:**+  - None.+- **Optional Arguments:**+  - None.++### `getPurse(pursePetname)`+- **Function:**+  - Returns the `purse` object with the given petname+- **Required Arguments:**+  - `pursePetName`  +    - **String**. A purse's petname.+- **Optional Arguments:**+  - None.+- **Errors**+  - Throws an error if there is no purse with the given petname.++### `getPurseIssuer(pursePetname)`+- **Function:**+  - Given a purse's petname, returns the `issuer` object associated+    with the purse.+- **Required Arguments:**+  - **String**. `petname`, a purse's petname+- **Optional Arguments:**+  - None.+- **Errors**+  - Throws and error if given an invalid purse petname. ++### `makeEmptyPurse(issuerPetname, pursePetname)`+- **Function:**+  - Creates and returns a new, empty, purse object with a petname specified by the command. +- **Required Arguments:**+  - `issuerPetname`+    - **String**. The petname you've assigned to the `issuer` the new purse uses.+  - `pursePetname`+    - **String**. The petname assigned to the new purse.	+- **Optional Arguments:**+ - None.+- **Errors:**+  - There is already a purse in this wallet with the name of `pursePetname`'s value.   +++## Issuer API Methods++### `addIssuer()`

missing arguments in template

tyg

comment created time in 11 days

Pull request review commentAgoric/documentation

Wallet api doc added and put under Guides in menubar

+# Wallet API++This document lists and describes the API commands available to the wallet.++## Petnames++The Agoric wallet uses *petnames* for issuers and purses.++Petnames are your personal names for objects. No one else can see or+modify a petname without your permission. You can think of them as+your phone's contacts list. The actual phone number is what your phone+uses to call someone, but for you to more easily tell who a number is+associated with, you've assigned a petname to it, such as Mom,+Grandpa, Kate S., etc.++## Overview++Wallet API commands work with the following object types:+- `purse`: Stores assets until you withdraw them into a payment for use +- `issuer`: Creates empty purses and payments and maps minted assets+  to them when assets are added or removed. Issuers verify and move+  digital assets.+- `offer`: Consists of what amount of what brand you're willing to+  give, and what amount of what brand you want, as well as the+  conditions under which the offer holder can cancel it.++## Purse API Methods++### `deposit()`+- **Function:**+  - Deposits a payment into the specified purse in the wallet. Returns the deposited amount.+- **Required Arguments:**+  - `pursePetname`+    - **String**. The petname of the purse in which to deposit the specified payment.+  - `payment`+    - **Object**. A payment object, which is deposited into the specified purse.+- **Optional Arguments:**+  - None.++### `getPurses()`+- **Function:**+  - Returns all purse objects and their petnames in the wallet. They are returned as an array of [petname, purseObject] arrays which can be turned into a `Map` (`new Map(getPurses())`)+- **Required Arguments:**+  - None.+- **Optional Arguments:**+  - None.++### `getPurse(pursePetname)`+- **Function:**+  - Returns the `purse` object with the given petname

Rather than "with", it's really that one assigned to that pet name. It's more that the petname has a purse, rather than the purse having a petname. I'm a little unsure about how we want this usage, so if wallet comments speak to it, use that slant.

tyg

comment created time in 11 days

Pull request review commentAgoric/documentation

Wallet api doc added and put under Guides in menubar

+# Wallet API++This document lists and describes the API commands available to the wallet.++## Petnames++The Agoric wallet uses *petnames* for issuers and purses.++Petnames are your personal names for objects. No one else can see or+modify a petname without your permission. You can think of them as+your phone's contacts list. The actual phone number is what your phone+uses to call someone, but for you to more easily tell who a number is+associated with, you've assigned a petname to it, such as Mom,+Grandpa, Kate S., etc.++## Overview++Wallet API commands work with the following object types:+- `purse`: Stores assets until you withdraw them into a payment for use +- `issuer`: Creates empty purses and payments and maps minted assets+  to them when assets are added or removed. Issuers verify and move+  digital assets.+- `offer`: Consists of what amount of what brand you're willing to+  give, and what amount of what brand you want, as well as the+  conditions under which the offer holder can cancel it.++## Purse API Methods++### `deposit()`

This should list the arguments (see example ERTP methods)

tyg

comment created time in 11 days

Pull request review commentAgoric/documentation

Wallet api doc added and put under Guides in menubar

+# Wallet API++This document lists and describes the API commands available to the wallet.++## Petnames++The Agoric wallet uses *petnames* for issuers and purses.++Petnames are your personal names for objects. No one else can see or+modify a petname without your permission. You can think of them as+your phone's contacts list. The actual phone number is what your phone+uses to call someone, but for you to more easily tell who a number is+associated with, you've assigned a petname to it, such as Mom,+Grandpa, Kate S., etc.++## Overview++Wallet API commands work with the following object types:+- `purse`: Stores assets until you withdraw them into a payment for use +- `issuer`: Creates empty purses and payments and maps minted assets+  to them when assets are added or removed. Issuers verify and move+  digital assets.+- `offer`: Consists of what amount of what brand you're willing to+  give, and what amount of what brand you want, as well as the+  conditions under which the offer holder can cancel it.++## Purse API Methods++### `deposit()`+- **Function:**

this is different in format from the rest of our API docs. Why?

tyg

comment created time in 11 days

Pull request review commentAgoric/documentation

Wallet api doc added and put under Guides in menubar

+# Wallet API++This document lists and describes the API commands available to the wallet.++## Petnames++The Agoric wallet uses *petnames* for issuers and purses.++Petnames are your personal names for objects. No one else can see or+modify a petname without your permission. You can think of them as+your phone's contacts list. The actual phone number is what your phone+uses to call someone, but for you to more easily tell who a number is+associated with, you've assigned a petname to it, such as Mom,+Grandpa, Kate S., etc.++## Overview++Wallet API commands work with the following object types:+- `purse`: Stores assets until you withdraw them into a payment for use +- `issuer`: Creates empty purses and payments and maps minted assets+  to them when assets are added or removed. Issuers verify and move+  digital assets.+- `offer`: Consists of what amount of what brand you're willing to+  give, and what amount of what brand you want, as well as the+  conditions under which the offer holder can cancel it.++## Purse API Methods++### `deposit()`+- **Function:**+  - Deposits a payment into the specified purse in the wallet. Returns the deposited amount.+- **Required Arguments:**+  - `pursePetname`+    - **String**. The petname of the purse in which to deposit the specified payment.+  - `payment`+    - **Object**. A payment object, which is deposited into the specified purse.+- **Optional Arguments:**

Delete these sections. Just use "optional" in the description for such arguments e.g., burn.

tyg

comment created time in 11 days

Pull request review commentAgoric/documentation

Wallet api doc added and put under Guides in menubar

+# Wallet API++This document lists and describes the API commands available to the wallet.++## Petnames++The Agoric wallet uses *petnames* for issuers and purses.++Petnames are your personal names for objects. No one else can see or+modify a petname without your permission. You can think of them as+your phone's contacts list. The actual phone number is what your phone+uses to call someone, but for you to more easily tell who a number is+associated with, you've assigned a petname to it, such as Mom,+Grandpa, Kate S., etc.++## Overview++Wallet API commands work with the following object types:+- `purse`: Stores assets until you withdraw them into a payment for use +- `issuer`: Creates empty purses and payments and maps minted assets+  to them when assets are added or removed. Issuers verify and move+  digital assets.+- `offer`: Consists of what amount of what brand you're willing to+  give, and what amount of what brand you want, as well as the+  conditions under which the offer holder can cancel it.++## Purse API Methods++### `deposit()`+- **Function:**+  - Deposits a payment into the specified purse in the wallet. Returns the deposited amount.+- **Required Arguments:**+  - `pursePetname`+    - **String**. The petname of the purse in which to deposit the specified payment.+  - `payment`+    - **Object**. A payment object, which is deposited into the specified purse.+- **Optional Arguments:**+  - None.++### `getPurses()`+- **Function:**+  - Returns all purse objects and their petnames in the wallet. They are returned as an array of [petname, purseObject] arrays which can be turned into a `Map` (`new Map(getPurses())`)

it's actually remove references for purses. I don't know that we need to say that here. Check out other examples?

tyg

comment created time in 11 days

Pull request review commentAgoric/documentation

Wallet api doc added and put under Guides in menubar

+# Wallet API++This document lists and describes the API commands available to the wallet.++## Petnames++The Agoric wallet uses *petnames* for issuers and purses.++Petnames are your personal names for objects. No one else can see or+modify a petname without your permission. You can think of them as+your phone's contacts list. The actual phone number is what your phone+uses to call someone, but for you to more easily tell who a number is+associated with, you've assigned a petname to it, such as Mom,+Grandpa, Kate S., etc.++## Overview++Wallet API commands work with the following object types:+- `purse`: Stores assets until you withdraw them into a payment for use +- `issuer`: Creates empty purses and payments and maps minted assets+  to them when assets are added or removed. Issuers verify and move+  digital assets.+- `offer`: Consists of what amount of what brand you're willing to

uses the term "brand" here, so need to define that before it. Lift or point at ERTP definitions? or glossary?

tyg

comment created time in 11 days

Pull request review commentAgoric/documentation

Wallet api doc added and put under Guides in menubar

+# Wallet API++This document lists and describes the API commands available to the wallet.++## Petnames

Move this after the overview section.

tyg

comment created time in 11 days

create barnchAgoric/documentation

branch : deploy_debug

created branch time in 11 days

push eventAgoric/documentation

Dean Tribble

commit sha 90c4d2836031344253ce11ff58582ffd4a53333e

docs: add initial depoyment explanation

view details

Dean Tribble

commit sha 29cbe881f6af7676fcfe9035d7b1348666e2f25f

docs: review updates and wire deployment info into menus

view details

Dean Tribble

commit sha e00a379fa6012b6a679f6274c623e133ea632c80

docs: minor last review comment

view details

Dean Tribble

commit sha 8bd5eaeb0500a45a7d4c19094fa526d1972fb1aa

Merge pull request #196 from Agoric/deploy_debug docs: add initial depoyment explanation

view details

push time in 12 days

delete branch Agoric/documentation

delete branch : deploy_debug

delete time in 12 days

PR merged Agoric/documentation

Reviewers
docs: add initial depoyment explanation
+114 -10

0 comment

4 changed files

dtribble

pr closed time in 12 days

push eventAgoric/documentation

Dean Tribble

commit sha e00a379fa6012b6a679f6274c623e133ea632c80

docs: minor last review comment

view details

push time in 12 days

push eventAgoric/documentation

Dean Tribble

commit sha 29cbe881f6af7676fcfe9035d7b1348666e2f25f

docs: review updates and wire deployment info into menus

view details

push time in 12 days

PR opened Agoric/documentation

docs: add initial depoyment explanation
+85 -0

0 comment

1 changed file

pr created time in 12 days

create barnchAgoric/documentation

branch : deploy_debug

created branch time in 12 days

push eventAgoric/dapp-encouragement

Dean Tribble

commit sha 4113c4ff6511aca68c10c0dfab05bd2f7cb98501

chore: switch to `makeInvitation` from `inviteAnOffer`

view details

Dean Tribble

commit sha cbc38f84be0d8adc3810cb7b220604e4ce049b27

Merge pull request #35 from Agoric/use_makeInvitation chore: switch to `makeInvitation` from `inviteAnOffer`

view details

push time in 15 days

PR opened Agoric/agoric-sdk

Reviewers
docs: declare `sparseKeywords` as optional in `getCurrentAllocation`

A TypeScript declaration update.

+2 -2

0 comment

1 changed file

pr created time in 16 days

create barnchAgoric/agoric-sdk

branch : optional_sparseKeywords

created branch time in 16 days

pull request commentAgoric/dapp-encouragement

chore: switch to `makeInvitation` from `inviteAnOffer`

Oops. Still needs manual testing.

dtribble

comment created time in 16 days

PR opened Agoric/dapp-encouragement

Reviewers
chore: switch to `makeInvitation` from `inviteAnOffer`

A trivial cleanup to the dapp

+3 -13

0 comment

1 changed file

pr created time in 16 days

create barnchAgoric/dapp-encouragement

branch : use_makeInvitation

created branch time in 16 days

issue commentAgoric/agoric-sdk

Revisions to Notifier design

WRT nagling, I note that batching within a turn is not sufficient. We want to batch across multiple messages queued to deliver to this vat, so that might even be beyond a crank. The technique of sending a message out to the kernel to be delivered "in order" which will naturally put it after other messages queued for this vat should give better nagling.

But the Proxy trick is cute.

Chris-Hibbert

comment created time in 16 days

Pull request review commentAgoric/documentation

Docs: Notifier documentation, both general and zoe API

 corresponding methods. It performs the communication asynchronously. Method calls can take arguments that are objects in the current vat or presences for objects in other vats. +### Notifiers++DApps and other tools may want to be notified about changes to the state of a Zoe+contract or a particular offer. We support this with a Notifier tool based on Promises,+which allows many parties to subscribe to be notified without requiring that the+publisher track a subscription list.++This is currently supported by Zoe itself, which publishes updates to the state of+offers (reallocations and completions), and by some contracts, which can publish+current prices or other details specific to the contract.++#### Getting Notifications++Zoe has a public method `getOfferNotifier()`, and contracts will have similar+methods. This provides a long-lived notifier object associated with a particular+stream of updates. At any time, you can call `notifier.getUpdateSince()`, and it will+return a record `{ value, updateHandle, done }`. `value` is the current state,+according to the source. `done` will be false until the stream reaches a final state,+after which `value` will never change, and the same record will always be+returned. `updateHandle` allows you to ask to be notified the next time there's a+change to the state.++If you call `getUpdateSince(oldUpdateHandle)` with no handle, or any `updateHandle`+other than the most recent one, the notifier will immediately return a record with+the current state. If you call `getUpdateSince(updateHandle)` with the most-recently+issued `updateHandle`, you'll get a promise for the next record, which will be+resolved the next time there's a change in the state.++This approach to notification doesn't give any way to get a list of all state+changes, but we don't know of any way to do that that doesn't require someone to hold+onto unbounded amounts of state for clients that might have disappeared.++A common pattern for following updates to the notifier until it's done looks like this:++```

Yes!

Chris-Hibbert

comment created time in 19 days

Pull request review commentAgoric/documentation

Docs: Notifier documentation, both general and zoe API

 corresponding methods. It performs the communication asynchronously. Method calls can take arguments that are objects in the current vat or presences for objects in other vats. +### Notifiers++DApps and other tools may want to be notified about changes to the state of a Zoe+contract or a particular offer. We support this with a Notifier tool based on Promises,+which allows many parties to subscribe to be notified without requiring that the+publisher track a subscription list.++This is currently supported by Zoe itself, which publishes updates to the state of+offers (reallocations and completions), and by some contracts, which can publish+current prices or other details specific to the contract.++#### Getting Notifications++Zoe has a public method `getOfferNotifier()`, and contracts will have similar+methods. This provides a long-lived notifier object associated with a particular+stream of updates. At any time, you can call `notifier.getUpdateSince()`, and it will+return a record `{ value, updateHandle, done }`. `value` is the current state,+according to the source. `done` will be false until the stream reaches a final state,+after which `value` will never change, and the same record will always be+returned. `updateHandle` allows you to ask to be notified the next time there's a+change to the state.++If you call `getUpdateSince(oldUpdateHandle)` with no handle, or any `updateHandle`+other than the most recent one, the notifier will immediately return a record with+the current state. If you call `getUpdateSince(updateHandle)` with the most-recently+issued `updateHandle`, you'll get a promise for the next record, which will be+resolved the next time there's a change in the state.++This approach to notification doesn't give any way to get a list of all state

There are 3 cases, and they are largely based on the model rather than the client:

  1. the model needs all deltas
  2. the model needs only the last state 3 the model needs the last state but it's big and deltas may be better

For 1, the deltas should just be part of the model's state, and not somehow magic in the notification architecture; e.g., the edit history for multi-master editing and undos.

For 2, the value is just the lastest state.

For 3, we have a couple of options, and the fact that we provide a record is interesting. First, all this is out of scope for our current work! :) The model can keep as much memory of the last N edits as it wants, associated with the update handle for them. Any particular notifier update can provide either the full state or a description of the set of deltas from the provided updateHandle. This could be done by an app (e.g., pixel demo) by open-coding it's own notifier, but could someday be supported generically. Because we pass a record, adding an alternative deltas keyword instead of value is an option. Details TBD :).

Chris-Hibbert

comment created time in 19 days

issue commentiqlusioninc/relayer

Cannot use tokens from expired clients

A closed channel should be specified to timeout all unacknowledged packets. That way there is a single pathway for recovery (esp. recovery of assets embedded in packets).

anilCSE

comment created time in 19 days

issue commentAgoric/agoric-sdk

[Zoe] Reallocate only for Keyword not in user's `give` or `want`

Since this is a bug report, can you add "expected" and "actual" sections in the initial report. I cannot quite tell whether the attempted reallocate has both "Simoleans" and "Freebies", and the "Freebies" aren't passing through. If it's only Freebies, then I would expect the reallocate to fail. If it's both, then I would expect it to succeed with both payouts.

katelynsills

comment created time in 19 days

issue commentiqlusioninc/relayer

Cannot use tokens from expired clients

Shouldn't timeout of the packets in the dead channel result in return of the tokens in timed-out packets?

anilCSE

comment created time in 19 days

PR opened Agoric/agoric-sdk

Reviewers
feat: Optionally suppress wallet

feat: Enables and optional URL argument to suppress rendering the wallet to just show the REPL for demos.

Add w=0 to suppress the wallet rendering

+14 -11

0 comment

1 changed file

pr created time in 20 days

push eventAgoric/agoric-sdk

Dean Tribble

commit sha ceae9e65cf4ece932d1f565c74afeec06c9074cb

feat: Optionally suppress wallet Enables and optional URL argument to suppress rendering the wallet to just show the REPL for demos. Add `w=0` to suppress the wallet rendering

view details

push time in 20 days

create barnchAgoric/agoric-sdk

branch : optional_wallet

created branch time in 20 days

issue commentAgoric/agoric-sdk

Mutually referential promises in arrays causes infinite kernel recursion

Three options to generally resolve this

drop references that have no embedded promises

drop reference that have no already exported promises

add support for explicit dropping of references, possibly as part of the deterministic GC scheme

FUDCo

comment created time in 22 days

push eventAgoric/dapp-encouragement

Dean Tribble

commit sha bcc19043175c4e97eecbeb52a32b59c17dfa9ad5

fix: use ibcport[1] to work with an array of ports fix: bring up the wallet with REPL docs: improve examples and support multichain

view details

push time in 23 days

push eventAgoric/agoric-sdk

Dean Tribble

commit sha 567f71318d5c3bdbf7a6ed620610790dd7cd3c22

fix: missed a change in refactoring One usage of `idToCancel` did not get renamed `idToComplete`.

view details

Dean Tribble

commit sha 039ea335699fdd09da35bcc0d889005dcee41494

Merge pull request #1046 from Agoric/h7_idToCancel_fix fix: missed a change in refactoring "cancel" to "complete"

view details

push time in 24 days

delete branch Agoric/agoric-sdk

delete branch : h7_idToCancel_fix

delete time in 24 days

PR merged Agoric/agoric-sdk

fix: missed a change in refactoring "cancel" to "complete"

Fixes hackathon#7.

Description

One usage of idToCancel did not get renamed idToComplete.

Testing

Manually tested in Kevin McCabe's environment

+1 -1

0 comment

1 changed file

dtribble

pr closed time in 24 days

issue closedAgoric/cross-chain-hackathon

cloned dapp bug

Platform: WSL Ubuntu (Windows on Linux) "before Using Agoric" and "Starting a Project" followed.

closed time in 24 days

dtribble

PR opened Agoric/agoric-sdk

Reviewers
fix: missed a change in refactoring "cancel" to "complete"

Fixes hackathon#7.

Description

One usage of idToCancel did not get renamed idToComplete.

Testing

Manually tested in Kevin McCabe's environment

+1 -1

0 comment

1 changed file

pr created time in 24 days

create barnchAgoric/agoric-sdk

branch : h7_idToCancel_fix

created branch time in 24 days

Pull request review commentAgoric/agoric-sdk

Zoe v0.6.0

 export async function makeWallet(       const inviteP = invite || E(publicAPIHooks).getInvite(publicAPI);       const {         depositedP,-        cancelObj,+        completeObj,         outcome,         offerHandle,       } = await executeOffer(compiledOffer, inviteP);        idToCancel.set(id, () => {

Should be idToComplete.

katelynsills

comment created time in 24 days

issue commentAgoric/cross-chain-hackathon

cloned dapp bug

idToCancel only appears in lib-wallet.js, and "cancel" was renamed to "complete", so I speculate that it should have been another usage of idToComplete. Kevin is trying that.

dtribble

comment created time in 24 days

issue openedAgoric/cross-chain-hackathon

cloned dapp bug

Platform: WSL Ubuntu (Windows on Linux) "before Using Agoric" and "Starting a Project" followed.

created time in 24 days

issue closedAgoric/agoric-sdk

Dean's metering-limit crash

@dtribble told us he saw a cosmic-swingset crash with a metering-limit error yesterday. He said he'd done a few normal contract things, and then left it idle overnight. The next morning it had halted.

We're guessing that something (triggered by a timer) is running wild, maybe a sorcerors-apprentice -type bug or O(n^2) kind of thing. The first step will be to add a diagnostic that displays some basic info on each block, something like:

  • number of timer events fired
  • number of cranks run
  • number of syscalls made

closed time in a month

warner

issue commentAgoric/agoric-sdk

Dean's metering-limit crash

The system has changed a lot since this. Closing util we see a repro

warner

comment created time in a month

issue openedAgoric/agoric-sdk

[Zoe] Extend offer hooks with hook helpers

Zoe currently has a offerAnInvite hook to add support for checking properties of invites. This has a similar signatures to zcf.makeInvitation, and so could be confusing to developers. This proposed a more orthogonal approach: use helpers to enhance the offer hooks with additional functionality that will e.g., reject an offer if it doesn't have amounts for the correct issuer.

A specific replacement for inviteAnOffer would be:

  function checkedHook(offerHook, expected) {
      return offerHandle => {
        helpers.rejectIfNotProposal(offerHandle, expected);
        return offerHook(offerHandle);
      };
   },

Further such hooks could be added for checking expirations, minimum amounts, etc. Usage might be something like:

In order to simplify the setup of such hooks, we should consider providing the zcf itself as a second argument to the hook. Then more helpers like this can be built without needing to close over zcf.

created time in a month

pull request commentAgoric/agoric-sdk

Don't use the (nonexistent) _agstate/agoric-wallet anymore

Modulo a test that would have detected this, LGTM.

michaelfig

comment created time in a month

pull request commentAgoric/agoric-sdk

Don't use the (nonexistent) _agstate/agoric-wallet anymore

Is there a test for this?

Also, why did the integration test not find this?

michaelfig

comment created time in a month

issue commentcosmos/ics

IBC ecosystem working group call for April 23rd

Where to accumulate videos of demos? scripts for doing them? webinars?

cwgoes

comment created time in a month

push eventAgoric/dapp-encouragement

Dean Tribble

commit sha 54797ad941974bca1fcdf406d474404b5c6a720e

chore: remove a local conf file from the repository

view details

push time in a month

issue commentAgoric/documentation

Zoe API doc should always describe method calls as E(zoe).blabla

I updated a lot of doc for this. did you find any specific examples?

DavidBruant

comment created time in a month

issue commentAgoric/documentation

Reference to quatloo and simoleans

"quatloo" is I think a Star Trek reference. But saying random things about fictitious assets seems a little strange regardless. "sheep" for "wood" is a Setllers of Catan reference, basically.

I feel like we should minimize or avoid using physical goods in our examples, because of course, we do not and cannot actually ship those around. Hence concert tickets and digital currencies. We should at least have something like "imagine a currency named "simolean".

DavidBruant

comment created time in a month

delete branch Agoric/documentation

delete branch : guide-menu

delete time in a month

push eventAgoric/documentation

Dean Tribble

commit sha c1e223f99baccedb3364f052f0a94408fce1f175

docs: Add Keybase link

view details

Dean Tribble

commit sha 2fb04fea19d232b73954c83c76be82018848c5ac

Merge pull request #153 from Agoric/guide-menu docs: Add Keybase link

view details

push time in a month

PR merged Agoric/documentation

docs: Add Keybase link
+1 -1

0 comment

1 changed file

dtribble

pr closed time in a month

PR opened Agoric/documentation

docs: Add Keybase link
+1 -1

0 comment

1 changed file

pr created time in a month

create barnchAgoric/documentation

branch : guide-menu

created branch time in a month

push eventAgoric/documentation

Dean Tribble

commit sha c0be771625f0c459ab916efd11e575addc01703b

docs: guide menu and better hackathon announce

view details

Dean Tribble

commit sha fcf0ac16eb173c68e63ce63b03b2dd7b4b5960a3

docs: chagne "dapp guide" name from review.

view details

Dean Tribble

commit sha bea3bc825626d19b255d549a09cb343c6003f650

Merge pull request #152 from Agoric/guide-menu docS: doc menu improvement

view details

push time in a month

delete branch Agoric/documentation

delete branch : guide-menu

delete time in a month

PR merged Agoric/documentation

Reviewers
doc menu improvement

docs: guide menu and better hackathon announce

+40 -6

0 comment

2 changed files

dtribble

pr closed time in a month

push eventAgoric/documentation

Dean Tribble

commit sha fcf0ac16eb173c68e63ce63b03b2dd7b4b5960a3

docs: chagne "dapp guide" name from review.

view details

push time in a month

PR opened Agoric/documentation

doc menu improvement

docs: guide menu and better hackathon announce

+40 -6

0 comment

2 changed files

pr created time in a month

create barnchAgoric/documentation

branch : guide-menu

created branch time in a month

delete branch Agoric/documentation

delete branch : revert-144-tyg-patch-5

delete time in a month

create barnchAgoric/documentation

branch : revert-144-tyg-patch-5

created branch time in a month

Pull request review commentAgoric/documentation

Minor fixes on Yarn install.

 software, you need to install the following.   </tr>   <tr>     <td><center>2</center></td>-    <td><a href="https://classic.yarnpkg.com/en/docs/install#mac-stable">Install Yarn 1</a></td>+    <td><a href="https://classic.yarnpkg.com/en/docs/install">Install Yarn 1</a><br>+    (Yes, Yarn 1, not Yarn 2 or anything higher)</td>

I would just put "yes, yarn version 1". The other is a little too snarky.

tyg

comment created time in a month

Pull request review commentAgoric/documentation

Update start-a-project.md

 Also, for what needs to be done after you modify a project's code, see   </th>   <tr>     <td><center>1</center></td>-    <td>Go to or open a shell and <code>cd ~/agoric-sdk</code></td>-    <td>Go to the directory where you copied the latest Agoric SDK-	    from the Agoric GitHub repository in Step 4 of <a href="https://agoric.com/documentation/getting-started/before-using-agoric/">Before Using Agoric</a>.</td>+    <td>Go to or open a shell and <code>cd &lt;directory-where-you-want-to-install-Dapp-code&gt;</code></td>+    <td>When you initialize your project/Dapp in the next step, its initial code is copied into your current directory (permissions allowing).</td>   </tr>   <tr>     <td><center>2</center></td>     <td>Run <code>agoric init demo</code>     <td>Initializes a <i>Dapp</i> (<i>Distributed application</i>) 	project. 	<br><br>-    <code>init</code> creates a folder with the specified name+    <code>init</code> creates a sub-directory with the specified name     (<code>demo</code> in this case) in your current directory and copies an existing project's files     into it. You can give the project any name you like. This     documentation assumes you used <code>demo</code>.      <br><br>     There are optional arguments that let you specify which project     you want copied into the specified directory. By default, their values are set to-    use a Dapp we wrote to introduce you to Agoric smart+    use the Encouragement Dapp we wrote to introduce you to Agoric smart

"we wrote to provide a simple skeleton for a smart contract." this is because encouragement doesn't really introduce much about smart contracts, but it does show a lot about how to set up the pieces.

tyg

comment created time in a month

Pull request review commentAgoric/documentation

Update start-a-project.md

 Also, for what needs to be done after you modify a project's code, see   </th>   <tr>     <td><center>1</center></td>-    <td>Go to or open a shell and <code>cd ~/agoric-sdk</code></td>-    <td>Go to the directory where you copied the latest Agoric SDK-	    from the Agoric GitHub repository in Step 4 of <a href="https://agoric.com/documentation/getting-started/before-using-agoric/">Before Using Agoric</a>.</td>+    <td>Go to or open a shell and <code>cd &lt;directory-where-you-want-to-install-Dapp-code&gt;</code></td>+    <td>When you initialize your project/Dapp in the next step, its initial code is copied into your current directory (permissions allowing).</td>

This seems random. there's no "initialize" operation. The init operation does copy code into the current directory. It creates a new named directory and copies it into there.

tyg

comment created time in a month

Pull request review commentAgoric/documentation

point folks at hackathon branch of github repo

 software, you need to install the following.   </tr>   <tr>     <td><center>4</center></td>-    <td>Run <code>git clone+    <td>Run <code>git clone --branch hackathon-2020-04       https://github.com/Agoric/agoric-sdk</code></td>      <td>Get the latest Agoric SDK from the Agoric GitHub-  repository. It goes into the (created, if necessary)-      <code>agoric-sdk</code> sub-directory of your home directory.</td>+      repository. It goes into the (created, if necessary)+      <code>agoric-sdk</code> sub-directory of your home directory.+      We we be using the <code>hackathon-2020-04</code> branch

duplicate word: "We we"

warner

comment created time in a month

pull request commentAgoric/dapp-encouragement

Add a little dynamic IBC for flavour

I totally agree we shouldn't merge it, but it's great! I'd really like it side-by-side: "And now for something completely different: let's do this between chains!". Let's make it an official branch for a while of "dibc-encouragement".

michaelfig

comment created time in a month

Pull request review commentAgoric/documentation

Minor housekeeping on links

 What you need to do before installing Agoric software and installing the Agoric   briefly explains the concepts and components of Agoric's Electronic   Rights Transfer Protocol (ERTP) which is the heart of Agoric   software.-4. **[Zoe Introduction](https://agoric.com/documentation/getting-started/zoe-introduction)**: -  A Getting Started document that+4. **Zoe Introduction**: +  **[IN PROGRESS]** A Getting Started document that

Any reason for this not to be a link to the https://agoric.com/documentation/zoe/guide/ in the meantime? Rather than a dead link?

tyg

comment created time in a month

Pull request review commentAgoric/documentation

fix: change seat to outcome, reword, change zoe.redeem to E(zoe).offer

 An implementation of [UniSwap](https://uniswap.org/).  ## Initialization -Create an instance of an autoswap invite:+Create an instance of the Autoswap code, and receive an invite that+when redeemed, will let you add liquidity to Autoswap.  ```js const issuerKeywordRecord = harden({   TokenA: moolaIssuer,   TokenB: simoleanIssuer, }); -const aliceInvite = zoe.makeInstance(+const addLiquidityInvite = await E(zoe).makeInstance(   autoswapInstallationHandle,   issuerKeywordRecord, ); ```  ## Adding liquidity to the pool -The moola<->simolean autoswap invite that we just created has a number of-methods available:--#### Invite API:-1. `addLiquidity`-2. `removeLiquidity`-3. `swap`--We can contribute to the autoswap liquidity pool by calling `addLiquidity` on a seat. For instance,-let's say that Alice creates a proposal with the associated payments of moola and simoleans and-escrows them by redeeming her invite:+We can contribute to the Autoswap liquidity pool by making an offer by+redeeming an addLiquidityInvite. For instance, let's say that Alice+creates a proposal with the associated payments of moola and simoleans+and escrows them by redeeming her invite:

delete everything after "by"

katelynsills

comment created time in a month

Pull request review commentAgoric/documentation

fix: change seat to outcome, reword, change zoe.redeem to E(zoe).offer

 const daveSwapProposal = harden({  const daveSwapPayments = harden({ Price: daveBucksPayment }); -const { seat: daveSwapSeat, payout: daveSwapPayoutP } = await zoe.redeem(+const { outcome, payout: daveSwapPayoutP } = await E(zoe).offer(   daveSwapInvite,   daveSwapProposal,   daveSwapPayments, ); -// Dave completes the swap and awaits his payout-const daveSwapOutcome = await daveSwapSeat.matchOffer();- const daveSwapPayout = await daveSwapPayoutP; const daveOption = await daveSwapPayout.Asset; const daveBucksPayout = await daveSwapPayout.Price; ```  ## Exercising the Option -Now that Dave owns the option he can exercise the option by making and completing a proposal to the covered call. First, he escrows with Zoe, then he calls the `exercise` method to complete the proposal:+Now that Dave owns the option he can exercise the option. He can do by+redeeming the option (an invite) and making an offer:

"...he can exercise the option by submitting an offer that pays the required exercise price in exchange for the underlying asset:"

katelynsills

comment created time in a month

Pull request review commentAgoric/documentation

fix: change seat to outcome, reword, change zoe.redeem to E(zoe).offer

 const aliceProposal = harden({  const alicePayments = { UnderlyingAsset: aliceMoolaPayment }; -  // Alice redeems her invite for a seat-const { seat: aliceSeat, payout: alicePayoutP } = await zoe.redeem(+  // Alice makes an offer and gets an option as the outcome+const { outcome: optionP, payout: alicePayoutP } = await E(zoe).offer(   aliceInvite,   aliceProposal,   alicePayments, ); -// Alice uses her seat to create an invite for the call option-const option = aliceSeat.makeCallOption();+const option = await optionP;

Is this copied from real code? Since the prior code doesn't have an await, I presume this was never actually executed? Do we need a bug to do that eventually?

katelynsills

comment created time in a month

Pull request review commentAgoric/documentation

fix: change seat to outcome, reword, change zoe.redeem to E(zoe).offer

 An implementation of [UniSwap](https://uniswap.org/).  ## Initialization -Create an instance of an autoswap invite:+Create an instance of the Autoswap code, and receive an invite that+when redeemed, will let you add liquidity to Autoswap.  ```js const issuerKeywordRecord = harden({   TokenA: moolaIssuer,   TokenB: simoleanIssuer, }); -const aliceInvite = zoe.makeInstance(+const addLiquidityInvite = await E(zoe).makeInstance(   autoswapInstallationHandle,   issuerKeywordRecord, ); ```  ## Adding liquidity to the pool -The moola<->simolean autoswap invite that we just created has a number of-methods available:--#### Invite API:-1. `addLiquidity`-2. `removeLiquidity`-3. `swap`--We can contribute to the autoswap liquidity pool by calling `addLiquidity` on a seat. For instance,-let's say that Alice creates a proposal with the associated payments of moola and simoleans and-escrows them by redeeming her invite:+We can contribute to the Autoswap liquidity pool by making an offer by+redeeming an addLiquidityInvite. For instance, let's say that Alice

"making an offer using an ..."

katelynsills

comment created time in a month

Pull request review commentAgoric/documentation

fix: change seat to outcome, reword, change zoe.redeem to E(zoe).offer

 An implementation of [UniSwap](https://uniswap.org/).  ## Initialization -Create an instance of an autoswap invite:+Create an instance of the Autoswap code, and receive an invite that+when redeemed, will let you add liquidity to Autoswap.

just replace "redeemed" with "used"? or "receive an invite that will let you..."

katelynsills

comment created time in a month

Pull request review commentAgoric/documentation

fix: change seat to outcome, reword, change zoe.redeem to E(zoe).offer

 const aliceProposal = harden({ const alicePayments = { Asset: aliceMoolaPayment } ``` -In order for Alice to escrow with Zoe she needs to redeem her invite. Once Alice redeems her invite she will receive a `seat` and a promise that resolves to her payout.+In order for Alice to escrow with Zoe she needs to redeem her invite.

This still has "redeem". I have some thoughts on rewrite, but I'll just make the comments here.

katelynsills

comment created time in a month

Pull request review commentAgoric/documentation

fix: change seat to outcome, reword, change zoe.redeem to E(zoe).offer

 that is escrowed with Zoe, Zoe guarantees that the user will either get back why they said they wanted, or the user will get back what they originally offered. -When a user escrows with Zoe, they get two things back immediately: a-`seat`, and a JavaScript promise for a future payout. This `seat` has-methods that the user can call to take action in the smart contract on-Zoe, without the smart contract ever having access to the underlying-digital assets. Let's look a particular example to see how this works.+When a user escrows with Zoe, they get a few things back immediately:+an `outcome`, and a JavaScript promise for a future payout. The+`outcome` is the return value of making the offer. Let's look a

It's actually a promise for the outcome? Or the outcome is a promise returned by the contract?

katelynsills

comment created time in a month

push eventAgoric/documentation

Dean Tribble

commit sha 016b29221b83c763646899b9bf13eceed52c1455

docs: Add E references and fix up helpers.

view details

Dean Tribble

commit sha a396345dcb2e6078240b444718578f4564d04f15

docs: update the Zoe guide contracts to use current code and api

view details

Dean Tribble

commit sha 1e170f003c7cff62e80e6a94449bea4cf626690e

docs: convert all inviteHandle references to offerHandle docs: fixes from review

view details

Dean Tribble

commit sha d66de227c69501c843b612630677cc7aa5ba2851

Merge pull request #139 from Agoric/933-more-docs-update docs: More API docs improvements

view details

push time in a month

PR merged Agoric/documentation

More API docs improvements

docs: Add E references and fix up helpers.

+162 -113

0 comment

6 changed files

dtribble

pr closed time in a month

push eventAgoric/documentation

Dean Tribble

commit sha 1e170f003c7cff62e80e6a94449bea4cf626690e

docs: convert all inviteHandle references to offerHandle docs: fixes from review

view details

push time in a month

Pull request review commentAgoric/documentation

More API docs improvements

  <Zoe-Version/> -Zoe is a long-lived and well-trusted contract that enforces offer safety for the contracts that use it. Zoe has a single `inviteIssuer` for the entirety of its lifetime. By having a reference to Zoe, a user can get the `inviteIssuer` and thus validate any `invite` they receive from someone else.--## zoe.getInviteIssuer()+Zoe provides a framework for deploying and working with smart contracts. It is accessed +as a long-lived and well-trusted service that enforces offer safety for the contracts that use it. Zoe has a single `inviteIssuer` for the entirety of its lifetime. By having a reference to Zoe, a user can get the `inviteIssuer` and thus validate any `invite` they receive from someone else.++::: tip Zoe is accessed asynchronously+The Zoe service is accessed asynchronously, using a standards-track library extension+to JavaScript that uses promises as remote references. In code, the Zoe service instance +is refered to via `zoe`, whcih only supports asynchronous invocation. Operations are 

done

dtribble

comment created time in a month

Pull request review commentAgoric/documentation

More API docs improvements

 import { makeZoeHelpers } from '@agoric/zoe/src/contractSupport/zoeHelpers';  const { swap } = makeZoeHelpers(zoe); -  const seat = harden({-    matchOffer: () => swap(firstInviteHandle, inviteHandle),-  });+  // `firstOfferHandle` is from a prior offer to the contract+  const hook = newHandle => swap(firstInviteHandle, newHandle);+  return zcf.makeInvitation(hook);+```++## zoeHelper.inviteAnOffer(options)+- `options` `{offerHook, customProperties, expected}` Optional name +  properties of the +- Returns: a promise for the new inviteHandle++Make an invitation to submit an Offer to this contract. This+invitation can be given to a client, granting them the ability to+participate in the contract.++If "offerHook" is provided, it will be called when the invitation is exercised

Done

dtribble

comment created time in a month

Pull request review commentAgoric/documentation

More API docs improvements

 import { makeZoeHelpers } from '@agoric/zoe/src/contractSupport/zoeHelpers';  const { swap } = makeZoeHelpers(zoe); -  const seat = harden({-    matchOffer: () => swap(firstInviteHandle, inviteHandle),-  });+  // `firstOfferHandle` is from a prior offer to the contract+  const hook = newHandle => swap(firstInviteHandle, newHandle);

Done

dtribble

comment created time in a month

more